https://sourceware.org/bugzilla/show_bug.cgi?id=18855
Bug ID: 18855 Summary: String constants mixed up when linked with gold on Linux/sparc64 Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: critical Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: atar4qemu at gmail dot com CC: ian at airs dot com Target Milestone: --- Created attachment 8538 --> https://sourceware.org/bugzilla/attachment.cgi?id=8538&action=edit gcc -v -Wl,--verbose log with -Wl,-fuse-ld=gold Systemd components linked with gold fail under sparc(64). I can't reproduce the bug with a smaller test case, but it's 100% reproducible with building systemd: # First, try linking with bfd: $ gcc -pipe -Wall -Wextra -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=shadow -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -flto -ffunction-sections -fdata-sections -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=bfd -Wl,-z -Wl,relro -o udevadm src/udev/udevadm.o src/udev/udevadm-info.o src/udev/udevadm-control.o src/udev/udevadm-monitor.o src/udev/udevadm-hwdb.o src/udev/udevadm-settle.o src/udev/udevadm-trigger.o src/udev/udevadm-test.o src/udev/udevadm-test-builtin.o src/udev/udevadm-util.o ./.libs/libudev-core.a -lselinux -ldl -lrt -lm -lresolv -llzma -lgcrypt -lacl -lblkid -lkmod -lcap -pthread -v -Wl,--verbose -v > ../bfd.log 2>&1 # Save the binary mv udevadm udevadm-bfd # Link with gold gcc -pipe -Wall -Wextra -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=shadow -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -flto -ffunction-sections -fdata-sections -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=gold -Wl,-z -Wl,relro -o udevadm src/udev/udevadm.o src/udev/udevadm-info.o src/udev/udevadm-control.o src/udev/udevadm-monitor.o src/udev/udevadm-hwdb.o src/udev/udevadm-settle.o src/udev/udevadm-trigger.o src/udev/udevadm-test.o src/udev/udevadm-test-builtin.o src/udev/udevadm-util.o ./.libs/libudev-core.a -lselinux -ldl -lrt -lm -lresolv -llzma -lgcrypt -lacl -lblkid -lkmod -lcap -pthread -v -Wl,--verbose -v > ../gold.log 2>&1 # Now try the binaries: $ ./udevadm-bfd --version 224 $ ./udevadm --version %-6s[%li.%06ld] %-8s %s (%s) As you see the binary linked with gold takes a wrong string for the version. Some other strings are mixed up as well. ( Debian Bug#790560 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790560 ) At least the binutils versions 2.24, 2.25, 2.25.1 and HEAD are affected. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils