diff options
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/scripttempl/mmo.sc | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-mmix/bpo-9m.d | 12 |
3 files changed, 17 insertions, 12 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 3d8b8d6..32b4616 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-07-17 Hans-Peter Nilsson <hp@bitrange.com> + + * scripttempt/mmo.sc: Move .init first in .text output section. + * testsuite/ld-mmix/bpo-9m.d: Adjust accordingly. + 2020-07-15 Jan Beulich <jbeulich@suse.com> * testsuite/ld-i386/ibt-plt-1.d, testsuite/ld-i386/ibt-plt-2a.d, diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc index c399278..354a769 100644 --- a/ld/scripttempl/mmo.sc +++ b/ld/scripttempl/mmo.sc @@ -24,6 +24,12 @@ SECTIONS { .text ${RELOCATING+ ${TEXT_START_ADDR}}: { + /* FIXME: Move .init, .fini, .ctors and .dtors to their own sections. */ + ${RELOCATING+ PROVIDE (_init_start = .);} + ${RELOCATING+ PROVIDE (_init = .);} + ${RELOCATING+ KEEP (*(SORT_NONE(.init)))} + ${RELOCATING+ PROVIDE (_init_end = .);} + *(.text) ${RELOCATING+*(.text.*)} ${RELOCATING+*(.gnu.linkonce.t*)} @@ -31,12 +37,6 @@ SECTIONS ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} - /* FIXME: Move .init, .fini, .ctors and .dtors to their own sections. */ - ${RELOCATING+ PROVIDE (_init_start = .);} - ${RELOCATING+ PROVIDE (_init = .);} - ${RELOCATING+ KEEP (*(SORT_NONE(.init)))} - ${RELOCATING+ PROVIDE (_init_end = .);} - ${RELOCATING+ PROVIDE (_fini_start = .);} ${RELOCATING+ PROVIDE (_fini = .);} ${RELOCATING+ KEEP (*(SORT_NONE(.fini)))} diff --git a/ld/testsuite/ld-mmix/bpo-9m.d b/ld/testsuite/ld-mmix/bpo-9m.d index fa3f97c..eb53f6b 100644 --- a/ld/testsuite/ld-mmix/bpo-9m.d +++ b/ld/testsuite/ld-mmix/bpo-9m.d @@ -11,12 +11,12 @@ .*: file format mmo SYMBOL TABLE: -0+ g \.text Main -0+4 g \.text x -0+ g \.text x2 +0+ g .* Main +0+14 g \.text x +0+10 g \.text x2 Contents of section \.text: - 0000 232dfe00 232dfd00 00000000 0000002d .* - 0010 00000000 0000002a .* + 0004 0000003d 00000000 0000003a 232dfe00 .* + 0014 232dfd00 .* Contents of section \.MMIX\.reg_contents: - 07e8 00000000 0000106c 00000000 0000a410 .* + 07e8 00000000 0000107c 00000000 0000a420 .* |