binutils 2.26.1 fatal linker error / elf hack

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
assemblerhead

binutils 2.26.1 fatal linker error / elf hack

Unread post by assemblerhead » 2017-03-12, 18:33

If the Gentoo user has or is using "sys-devel/binutils-2.26.1", this error occurs compiling any version of "www-client/palemoon".

Code: Select all

10:07.49 ===
10:07.49 === If you get failures below, please file a bug describing the error
10:07.49 === and your environment (compiler and linker versions), and use
10:07.50 === --disable-elf-hack until this is fixed.
10:07.50 ===
10:07.50  0x000000000000000c (INIT)               0x4030
10:07.51 elfhack: /var/tmp/portage/www-client/palemoon-27.1.2/work/palemoon-27.1.2/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
10:07.51 gmake[5]: *** [Makefile:29: test-ctors.so] Aborted
10:07.51 gmake[5]: *** Waiting for unfinished jobs....
10:07.57 gmake[4]: *** [/var/tmp/portage/www-client/palemoon-27.1.2/work/palemoon-27.1.2/config/recurse.mk:82: build/unix/elfhack/libs] Error 2
10:07.57 gmake[3]: *** [/var/tmp/portage/www-client/palemoon-27.1.2/work/palemoon-27.1.2/config/recurse.mk:37: libs] Error 2
10:07.57 gmake[2]: *** [/var/tmp/portage/www-client/palemoon-27.1.2/work/palemoon-27.1.2/config/rules.mk:541: default] Error 2
10:07.57 gmake[1]: *** [/var/tmp/portage/www-client/palemoon-27.1.2/work/palemoon-27.1.2/client.mk:398: realbuild] Error 2
10:07.57 gmake: *** [client.mk:171: build] Error 2
10:07.57 222 compiler warnings present.
"sys-devel/binutils-2.25.1" works just fine / no fatal error.
( tested v26.5.0, v27.0.3, v27.1.0, v27.1.2 )

Requested compilier information :

Code: Select all

# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.4/work/gcc-4.9.4/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.4/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.4/python --enable-objc-gc --enable-languages=c,c++,java,objc,obj-c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.4 p1.0, pie-0.6.4' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-vtable-verify --enable-libvtv --enable-lto --with-cloog --disable-isl-version-check --enable-libsanitizer
Thread model: posix
gcc version 4.9.4 (Gentoo 4.9.4 p1.0, pie-0.6.4) 
Requested linker infromation :

Code: Select all

( binutils-2.25.1 )
# ld -v
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1

( binutils-2.26.1 )
# ld -v
GNU ld (Gentoo 2.26.1 p1.0) 2.26.1

ajmacleod

Re: binutils 2.26.1 fatal linker error / elf hack

Unread post by ajmacleod » 2017-03-24, 16:20

I've just come across this one myself today - I had thought it might be a change between 27.2.0 and 27.2.1 but I recall having upgraded binutils very recently. Build (of PM 27.2.1) fails using binutils-2.26.1, gcc-4.9.4

Locked