trying to build a debian package with gold; the packaging strips each binary before building the final package; about 3000 packages fail to build with this or a similiar error: strip --remove-section=.comment --remove-section=.note debian/a2ps/usr/bin/a2ps BFD: debian/a2ps/usr/bin/stgTUPUK: section `.dynsym' can't be allocated in segment 3 LOAD: .dynsym .dynstr .hash .gnu.hash .interp .gnu.version .gnu.version_r strip:debian/a2ps/usr/bin/stgTUPUK[.text]: Bad value BFD: debian/a2ps/usr/bin/stgTUPUK: section `.dynsym' can't be allocated in segment 3 LOAD: .dynsym .dynstr .hash .gnu.hash .interp .gnu.version .gnu.version_r strip:debian/a2ps/usr/bin/stgTUPUK: Bad value
Created attachment 2727 [details] test binary
This is a known bug when using old versions of strip on x86_64. It happens because the default page size for gold for x86_64 is 0x1000. The default page size for old versions of the GNU binutils for x86_64 was 0x100000. Using an old version of strip on an executable with a page size smaller than the default would fail. I believe this bug was fixed in the GNU binutils on 2006-05-27 (i.e., long before gold was released) with this patch: http://sourceware.org/ml/binutils/2006-05/msg00476.html If you still see failures with a version of strip built after that date (i.e., binutils 2.18 or later), please reopen this bug. Thanks for reporting it.