Hit a segfault in ld on an armv7h board:

$ touch foo.dat
$ /usr/bin/ld -r -b binary -o /tmp/foo.o foo.dat
Segmentation fault (core dumped)

(gdb) bt
#0  0xb6f2ca94 in ?? () from /usr/lib/libbfd-2.27.so
#1  0xb6f66ad0 in bfd_elf_final_link () from /usr/lib/libbfd-2.27.so

Also segfaults for a non-empty input file in 'binary' format,
but not including it, since reproduced on empty file.

The above works fine on i686 (same ld version).
Also, no problem with ld.gold. (Current workaround.)
This problem appeared after a system update.

$ ld --version
GNU ld (GNU Binutils) 2.27

$ uname -a
Linux bmsyncarm 4.4.8-std-1 #1 SMP Mon Apr 25 17:18:53 UTC 2016 armv7l
GNU/Linux

ld from binutils 2.27-1 from Arch Linux ARM distro.
Build details:
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/core/binutils/PKGBUILD
Patch applied:
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/core/binutils/binutils-e9c1bdad.patch

Sidenote: Reporting here even though help/info say to report bugs to
distro, because apparently they no longer accept issues on their github:
https://github.com/archlinuxarm/PKGBUILDs/issues

Please let me know if more information is needed. Thank you.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to