diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2020-07-19 06:08:07 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2020-07-19 06:08:07 +0200 |
commit | 4609ada49f559880e85aecc2f37f377e5bff8696 (patch) | |
tree | ba1f1bf3860b622dc0388ec9264be13775c31c32 /ld/testsuite/ld-mmix | |
parent | e10a07b32dc1faed25b5bbcbbc47d68e2ff537b9 (diff) | |
download | binutils-4609ada49f559880e85aecc2f37f377e5bff8696.zip binutils-4609ada49f559880e85aecc2f37f377e5bff8696.tar.gz binutils-4609ada49f559880e85aecc2f37f377e5bff8696.tar.bz2 |
ld: optionally emit _etext last, before .data
So, here's my suggestion for making _init .. __etext cover .text +
.rodata (including things like the read-only exception tables) for
elf64mmix. A quick web search gives that __etext (and friends) isn't
well defined, so each target can interpret the "end of text segment"
to their own liking. It seems likely this change is also a better fit
than the default for other ports, at least those with .rodata after
.text in the same segment.
The presence of a separate rodata-segment is optional (and not true
for elf64mmix). This is reflected in the name as SEPARATE_TEXT /
SEPARATE_CODE isn't considered, to keep it simple; each target has to
make sure their settings of variables make sense.
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.
Diffstat (limited to 'ld/testsuite/ld-mmix')
-rw-r--r-- | ld/testsuite/ld-mmix/sec-1.d | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/testsuite/ld-mmix/sec-1.d b/ld/testsuite/ld-mmix/sec-1.d index 5e31b3f..6f82c8e 100644 --- a/ld/testsuite/ld-mmix/sec-1.d +++ b/ld/testsuite/ld-mmix/sec-1.d @@ -24,7 +24,7 @@ Idx Name Size VMA LMA File off Algn SYMBOL TABLE: #... -0+1d g +\*ABS\* _etext +0+30 g +\*ABS\* _etext #... 2000000000000013 g +\*ABS\* __bss_start 2000000000000013 g +\*ABS\* _edata |