[Bug ld/3206] New: Segmentation fault when using Linux kernel link script
When objects have been built with gcc's "-fasynchronous-unwind-tables" option, linking them can produce a segfault in ld. This occurred when trying to build a recent Linux kernel with frame unwinding information. I've narrowed it down to a simpler test case, which uses the kernel's link script and a couple of test C files. Enabling "-fasynchronous-unwind-tables" when building the objects causes a subsequent link to crash ld, while disabling that option causes ld to continue successfully (giving the user an error and then exiting). ARM EABI toolchain: binutils 2.17, gcc 4.1.1, built with CrossTool 0.42 Also tried CodeSourcery's 2006q1-6 toolchain (uses binutils 2.16.91), which experiences the same problem Will follow up with test files -- Summary: Segmentation fault when using Linux kernel link script Product: binutils Version: 2.17 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: MatthewLCreech at eaton dot com CC: bug-binutils at gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: arm-none-linux-gnueabi http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3206] Segmentation fault when using Linux kernel link script
--- Additional Comments From MatthewLCreech at eaton dot com 2006-09-14 17:49 --- Created an attachment (id=1296) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1296&action=view) Tarball of test files 1. Install arm[-none]-linux-gnueabi toolchain 2. Extract tarball contents 3. Set CROSS_COMPILE appropriately 4. Type 'make' to build and attempt to link the objects You should see a segfault at the link stage. Note that changing the CFLAGS to omit "-fasynchronous-unwind-tables" will stop the segfault from occurring. -- http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3206] Segmentation fault when using Linux kernel link script
--- Additional Comments From MatthewLCreech at eaton dot com 2006-09-14 18:30 --- Additional info. provided by Kevin Kilman at MontaVista: [Quote] FYI... I've seen the same thing using a MontaVista gcc 4.1.2, ld 2.17. However, after a binutils update to 2.17.50 20060808, it no longer segfaults, but fails to link with the following error: LD init/built-in.o LD .tmp_vmlinux1 /opt/fdb060906_0601451/montavista/foundation/devkit/arm/xscale_be/bin/xscale_be\-ld: .tmp_vmlinux1: sh_link of section `.ARM.exidx.exit.text' points to discard\ed section `.exit.text' of `arch/arm/kernel/built-in.o' /opt/fdb060906_0601451/montavista/foundation/devkit/arm/xscale_be/bin/xscale_be\-ld: final link failed: Bad value I also noted that gcc-3.4.3/ldd-2.15.94 compiled and linked the same kernel and .config just fine. -- http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3206] Segmentation fault when using Linux kernel link script
--- Additional Comments From MatthewLCreech at eaton dot com 2006-09-14 20:09 --- I tried both: *(.exit.text) *(.ARM.exidx.exit.text) *(.exit.data) *(.exitcall.exit) as well as *(.ARM.exidx.exit.text) *(.exit.data) *(.exitcall.exit) and both still trigger a segfault. -- http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3206] Segmentation fault when using Linux kernel link script
--- Additional Comments From MatthewLCreech at eaton dot com 2006-09-14 21:10 --- Interestingly, though, if I change this portion to: *(.exit.text) *(.ARM.exidx) *(.ARM.extab) *(.exit.data) *(.exitcall.exit) it no longer segfaults for this test case. This isn't a proper fix, though, as within the larger kernel build the segfault still occurs. -- http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3206] Segmentation fault when using Linux kernel link script
--- Additional Comments From MatthewLCreech at eaton dot com 2006-09-15 13:55 --- Okay, I got around to building a binutils snapshot (9/13), and I now get the behavior described by Kevin Hilman: LD .tmp_vmlinux1 arm-linux-gnueabi-ld: .tmp_vmlinux1: sh_link of section `.ARM.exidx.exit.text' points to discarded section `.exit.text' of `fs/built-in.o' arm-linux-gnueabi-ld: final link failed: Bad value So it's still not working, but no more segfault, so the ball now seems to be back in the kernel guys' court. Thanks for the help -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=3206 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils