https://sourceware.org/bugzilla/show_bug.cgi?id=32580
Bug ID: 32580 Summary: [2.44 regression] Non-bash shell breaks many default linker scripts Product: binutils Version: 2.44 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: ro at gcc dot gnu.org CC: nickc at redhat dot com Target Milestone: --- Target: *-*-solaris2.11 When trying the binutils 2.44 branch on Solaris, I found that roughly half the ld test FAIL with ./ld-new:built in linker script:0: syntax error While this error is as useless as it gets, it turns out that the same problem happens with the default linker script files, too. In particular, a link with gcc -shared fails as above, while without it it works. Comparing the generated linker scripts between 2.43 and 2.44, I see that e.g elf_i386_sol2.xs is heavily truncated, like @@ -94,144 +94,3 @@ /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); - /* Exception handling. */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } - .sframe : ONLY_IF_RW { *(.sframe) *(.sframe.*) } [...] As it turns out, this only happens when CONFIG_SHELL is /bin/ksh (or /bin/sh), which is ksh93. With /bin/bash, the linker scripts are generated correctly. This is a regression from 2.43. I'm still trying to figure out what exactly caused this. So far I've found that the the problem started with commit fe217087a4b8aa214a221ca9f033c5fcdbcee90e Author: Nick Clifton <ni...@redhat.com> Date: Wed Nov 27 11:23:38 2024 +0000 Tidy up the default ELF linker script One thing I noticed is that in two places (emit_noinit, emit_persistent) the cat <<EOF construct has trailing whitespace. However, this doesn't seem to be the problem. -- You are receiving this mail because: You are on the CC list for the bug.