ld: optionally emit _etext last, before .data

Hans-Peter Nilsson hp@bitrange.com
Sat Jul 18 01:13:49 GMT 2020


On Fri, 17 Jul 2020, Hans-Peter Nilsson wrote:

> So, here's my suggestion for making _init .. __etext cover .text +
> .rodata (including things like the read-only exception tables) for
> elf64mmix.

I forgot to mention that I re-built cris-elf and diff'd the
ldscripts to smoke test that this patch has absolutely no effect
there or for any other target not setting
ETEXT_LAST_IN_RODATA_SEGMENT and of course I redid the
"original" gcc test (building for elf, objcopying to mmo,
before/after patch) to check that it had the intended effect for
elf64mmix.  If the test-suite adjustment wasn't convincing...

>
> ld:
> 	* scripttempl/elf.sc (ETEXT_LAST_IN_RODATA_SEGMENT): New variable.
> 	* emulparams/elf64mmix.sh (ETEXT_LAST_IN_RODATA_SEGMENT): Define.
> 	* testsuite/ld-mmix/sec-1.d: Adjust.

brgds, H-P


More information about the Binutils mailing list