|
From: | kallisti5 at unixzen dot com |
Subject: | [Bug ld/24426] Binutils 2.28.1 segfault when presented (any) linker script on riscv64 |
Date: | Tue, 09 Apr 2019 17:24:46 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24426 --- Comment #4 from Alexander von Gluck IV <kallisti5 at unixzen dot com> --- Here's our riscv config for Haiku: https://git.haiku-os.org/buildtools/tree/gcc/gcc/config/riscv/haiku.h Anything beyond that is "stuff working on other architectures" The linker script definitely needs work (and is likely wrong), however passing an empty file to --script results in a segfault. Test file: $ cat test.c #include <stdio.h> int main() { printf("hi!\n"); return 0; } Linux x86: $ gcc test.c -o test.o $ touch test.ld $ ld --script=test.ld test.o -o test ld: error in test.o(.eh_frame); no .eh_frame_hdr table will be created ld: test: not enough room for program headers, try linking with -N ld: final link failed: bad value SiFive toolchain (2.29) $ ./Code/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin/riscv64-unknown-elf-gcc test.c -o test.o $ ./Code/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin/riscv64-unknown-elf-ld --script=test.ld test.o -o test -verbose GNU ld (GNU Binutils) 2.29 Supported emulations: elf64lriscv elf32lriscv using external linker script: ================================================== ================================================== attempt to open test.o succeeded test.o -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |