I tried linking the compat libs with the legacy binutils linker. The failing command (called from libtool) was: gcc -shared -fPIC -DPIC .libs/libsystemd_login_la-libsystemd-login.o -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/systemd-209/.libs -Wl,-rpath -Wl,/usr/lib64 ./.libs/libsystemd.so -L/usr/lib64 -llzma -lgcrypt -lgpg-error -lrt -lresolv -ldl -flto -O2 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--version-script=./src/compat-libs/libsystemd-login.sym -pthread -Wl,-soname -Wl,libsystemd-login.so.0 -o .libs/libsystemd-login.so.0.9.2 It fails with: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: internal error, aborting at elf64-x86-64.c line 3219 in elf_x86_64_relocate_section I have instrumented the abort with some additional output, which prints the section flags and plt offset: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: .libs/libsystemd_login_la-libsystemd-login.o: Error with relocation R_X86_64_GOTPCREL against STT_GNU_IFUNC flags: 0x20011f offset 0xffffffffffffffff Tested binutils 2.23.2 and 2.24.0. Linking with gold works fine.
Yep, compat-libs code uncovered a bunch of bugs: https://sourceware.org/bugzilla/show_bug.cgi?id=16467 https://sourceware.org/bugzilla/show_bug.cgi?id=16504 http://llvm.org/bugs/show_bug.cgi?id=11897 The first will be fixed in bintuils 2.25. The default flags are set so that the compliation works.
And last but not least: https://bugzilla.redhat.com/show_bug.cgi?id=1067245
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.