diff options
author | DJ Delorie <dj@redhat.com> | 2010-01-14 04:56:12 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2010-01-14 04:56:12 +0000 |
commit | b5f14a6dffb53245e454ebeb1a353a42d02dfc04 (patch) | |
tree | e1b66d5c9a817b328932a970ecb305ce71d3b3fc /ld/testsuite | |
parent | 62fb9fe1fcde9fd534fdc4f284257212804bb1fe (diff) | |
download | gdb-b5f14a6dffb53245e454ebeb1a353a42d02dfc04.zip gdb-b5f14a6dffb53245e454ebeb1a353a42d02dfc04.tar.gz gdb-b5f14a6dffb53245e454ebeb1a353a42d02dfc04.tar.bz2 |
* emultempl/elf32.em (_place_orphan): If an input section doesn't
match an existing output section, but an unused output section
statement does match, use it.
* emultempl/pe.em (_place_orphan): Likewise.
* emultempl/pep.em (_place_orphan): Likewise.
* ld-elf/orphan4.d: New.
* ld-elf/orphan4.ld: New.
* ld-elf/orphan4.s: New.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-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 |
4 files changed, 30 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 414df4e..a0aa58a 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-01-13 DJ Delorie <dj@redhat.com> + + * ld-elf/orphan4.d: New. + * ld-elf/orphan4.ld: New. + * ld-elf/orphan4.s: New. + 2010-01-13 Chao-ying Fu <fu@mips.com> * ld-mips-elf/jr-to-b-1.d, ld-mips-elf/jr-to-b-2.d: New tests. 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 |