Adding -feliminate-dwarf2-dups to FULL_OPTIMIZATION which are the flags passed to the compiler and rebuilding libnfsidmap results in a segfault at rootfs construction time of poky-image-sato on qemux86: Size before prelinking 323300. | /media/build2/builds/rptest/b2/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/lib/libnfsidmap.so.0.3.0: Symbol section index outside of section numbers | /media/build2/builds/rptest/b2/tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/temp/run.do_rootfs.17151: line 138: 23698 Segmentation fault (core dumped) /media/build2/builds/rptest/b2/tmp/sysroots/x86_64-linux/usr/sbin/prelink --root /media/build2/builds/rptest/b2/tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs -amR This isn't the only binary affected, its just an easy to reproduce test case. It appears prelink has some problem with the -feliminate-dwarf2-dups optimisation flag.
In master we've dropped the problematic compiler flag for now but we should still figure out this problem...
Update. I've not yet reproduced this. However, since the issue was filed a number of fixes for dwarf2 issues have gone into the prelinker.
current testing on head of poky indicates an internal compiler error: /home/mhatle/git/oss/poky/build-test/tmp/work/x86_64-poky-linux/gcc-runtime-4.6.2+svnr181430-r20/gcc-4_6-branch/build.x86_64-poky-linux.x86_64-poky-linux/libstdc++-v3/include/bits/unordered_set.h:398:1: internal compiler error: in build_abbrev_table, at dwarf2out.c:10534 Unable to reproduce this issue due to the ICE...
-feliminate-dwarf2-dups is "iffy" with the current version of gcc. It is likely addressed in gcc 4.7. We need to wait until that has been released/update before work can result on this item.
Uprev to gcc 4.7 is a prerequisite to this item. It is expected most of the work is simply validation and that 4.7 will correct the issue.
It is believed now that we have the new gcc this is fixed, it should be retested.