diff options
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/orphan4.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/orphan4.ld | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/orphan4.s | 4 |
3 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/orphan4.d b/ld/testsuite/ld-elf/orphan4.d new file mode 100644 index 0000000..85ebf64 --- /dev/null +++ b/ld/testsuite/ld-elf/orphan4.d @@ -0,0 +1,7 @@ +#source: orphan4.s +#ld: -T orphan4.ld +#objdump: -h + +#... + 1 \.foo 00000001 00001000 00001000 00000080 2\*\*0 +#pass diff --git a/ld/testsuite/ld-elf/orphan4.ld b/ld/testsuite/ld-elf/orphan4.ld new file mode 100644 index 0000000..ab9bc9c --- /dev/null +++ b/ld/testsuite/ld-elf/orphan4.ld @@ -0,0 +1,13 @@ +/* The .foo section doesn't specify *any* objects, but the object + we're linking has sections named ".foo". Make sure these sections + are linked into the .foo output section anyway. The bug that was + fixed was that a new .foo output section would be created at + address 0. */ + +SECTIONS { + .foo 0x00001000 : { + } + .text 0x00002000 : { + *(.text); + } +} diff --git a/ld/testsuite/ld-elf/orphan4.s b/ld/testsuite/ld-elf/orphan4.s new file mode 100644 index 0000000..1f07646 --- /dev/null +++ b/ld/testsuite/ld-elf/orphan4.s @@ -0,0 +1,4 @@ + .section ".foo", "ax" + .byte 45 + .text + .byte 15 |