icc -o latency -m64 latency.o walk.o -L../tools -l_tools -lnuma -B /usr/local/share/libhugetlbfs -Wl,-hugetlbfs-align
ipo: warning #11015: Warning unknown option --hugetlbfs-align
/usr/bin/ld: latency: section .ctors vma 0xfffffffffffffdb8 overlaps previous sections
/usr/bin/ld: latency: section .dtors vma 0xfffffffffffffdc8 overlaps previous sections
/usr/bin/ld: latency: section .jcr vma 0xfffffffffffffdd8 overlaps previous sections
/usr/bin/ld: latency: section .dynamic vma 0xfffffffffffffde0 overlaps previous sections
/usr/bin/ld: latency: section .got vma 0xffffffffffffffd0 overlaps previous sections
/usr/bin/ld: latency: section .got.plt vma 0xffffffffffffffe8 overlaps previous sections
/usr/bin/ld: latency: section `.ctors' can't be allocated in segment 3
LOAD: .interp .note.ABI-tag .note.SuSE .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .ctors .dtors .jc
r .dynamic .got .got.plt
/usr/bin/ld: final link failed: Bad value
make: *** [latency] Error 1
The problem is -hugetlbfs-align. hugetlbfs is installed and it is worked with 'cc'. How to fix it?
cc often is a symlink to gcc. Maybe you mean some other proprietary compiler.
Did you shut off the ipo option for icc? I suppose you didn't use the analogous LTO option for gcc. The reference to ipo is worrisome, but it may simply mean that icc is searching for ipo objects when building the ld script. You might want to check what is going in the ld script (by setting -#).
You could try using gcc to link your non-ipo icc .o files, by specifically including the necessary icc library references (static or dynamic choice preferably same as you made before).
(note the missing l before the library name).
Otherwise -hugetbfs-align is the name of the option told instead of -l.
you must disable ipo option. icc can't pass --hugetlbfs-align option to libhugetlbfs ld when use object files.
icc -ggdb -gdwarf-3 -c RegExp.c
icc RegExp.o -o RegExp.static -no-ipo -ggdb -gdwarf-3 -B/usr/share/libhugetlbfs/ -Wl,--hugetlbfs-align
Single source file example:
icc RegExp.c -o RegExp -ggdb -gdwarf-3 -B/usr/share/libhugetlbfs/ -Wl,--hugetlbfs-align -lippch
Is there now a version of icc which allows compiling/linking with '-B/usr/share/libhugetlbfs/ -Wl,--hugetlbfs-align' w/o requiring that I disable inter-procedural optimization with '-no-ipo'?
For several years, linux distributions have implemented transparent huge pages, which often is superior to working with hugetlbfs, as well as happening automatically. On an application I worked on recently, this produces a 25% performance improvement on a Nehalem test platform. The next-page hardware prefetch introduced in Haswell CPUs should reduce the importance of hugetlb.