Hide Forgot
Description of problem: systemd-39-1.fc17 fails to build on ppc64 with a linker error: /bin/sh ./libtool --silent --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -include ./config.h -DSYSTEM_CONFIG_FILE=\"/etc/systemd/system.conf\" -DSYSTEM_CONFIG_UNIT_PATH=\"/etc/systemd/system\" -DSYSTEM_DATA_UNIT_PATH=\"/lib/systemd/system\" -DSYSTEM_SYSVINIT_PATH=\"/etc/rc.d/init.d\" -DSYSTEM_SYSVRCND_PATH=\"/etc/rc.d\" -DUSER_CONFIG_FILE=\"/etc/systemd/user.conf\" -DUSER_CONFIG_UNIT_PATH=\"/etc/systemd/user\" -DUSER_DATA_UNIT_PATH=\"/usr/lib/systemd/user\" -DSYSTEMD_CGROUP_AGENT_PATH=\"/lib/systemd/systemd-cgroups-agent\" -DSYSTEMD_BINARY_PATH=\"/bin/systemd\" -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"/lib/systemd/systemd-shutdown\" -DSYSTEMCTL_BINARY_PATH=\"/bin/systemctl\" -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"/bin/systemd-tty-ask-password-agent\" -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"/usr/bin/systemd-stdio-bridge\" -DROOTPREFIX=\"\" -DRUNTIME_DIR=\"/run\" -DRANDOM_SEED=\"/var/lib/random-seed\" -DSYSTEMD_CRYPTSETUP_PATH=\"/lib/systemd/systemd-cryptsetup\" -DSYSTEM_GENERATOR_PATH=\"/lib/systemd/system-generators\" -DUSER_GENERATOR_PATH=\"/usr/libexec/systemd/user-generators\" -DSYSTEM_SHUTDOWN_PATH=\"/lib/systemd/system-shutdown\" -DSYSTEMD_KBD_MODEL_MAP=\"/usr/share/systemd/kbd-model-map\" -DX_SERVER=\"/usr/bin/X\" -I ./src -I ./src/readahead -I ./src/login -I ./src/journal -I ./src/systemd -DKBD_LOADKEYS=\"/bin/loadkeys\" -DKBD_SETFONT=\"/bin/setfont\" -DDEFAULT_FONT=\"latarcyrheb-sun16\" -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -pipe -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow -Wp,-D_FORTIFY_SOURCE=2 -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -ffunction-sections -fdata-sections -Wl,--as-needed -Wl,--gc-sections -c -o src/libsystemd_core_la-load-fragment-gperf-nulstr.lo `test -f 'src/load-fragment-gperf-nulstr.c' || echo './'`src/load-fragment-gperf-nulstr.c CCLD pam_systemd.la CCLD systemd-cgls CCLD systemd-cgtop /usr/bin/ld: BFD version 2.22.52.0.1-2.fc17 20120131 internal error, aborting at elf64-ppc.c line 13530 in ppc64_elf_relocate_section /usr/bin/ld: Please report this bug. collect2: error: ld returned 1 exit status Version-Release number of selected component (if applicable): binutils-2.22.52.0.1-2.fc17 How reproducible: always Actual results: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=370197
Karsten, can you attach the preprocessed source file. Alan, can you please have a look?
gcc bug => want preprocessed source ld bug => want object files, libraries and linker scripts
Created attachment 560084 [details] compressed tar file with object files, library and command line used
Reproduced. Looks like a generic elf linker bug. Index: bfd/elflink.c =================================================================== RCS file: /cvs/src/src/bfd/elflink.c,v retrieving revision 1.432 diff -u -p -r1.432 elflink.c --- bfd/elflink.c 7 Dec 2011 12:15:54 -0000 1.432 +++ bfd/elflink.c 8 Feb 2012 05:18:15 -0000 @@ -11575,6 +11575,8 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_i || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; h->mark = 1; + if (h->u.weakdef != NULL) + h->u.weakdef->mark = 1; return (*gc_mark_hook) (sec, info, cookie->rel, h, NULL); }
Fixed in binutils-2.22.52.0.1-4.
works for me, closing....