PR ld/21529: Use a linker script to limit output with the test case
authorMaciej W. Rozycki <macro@imgtec.com>
Fri, 14 Jul 2017 10:53:08 +0000 (11:53 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Fri, 14 Jul 2017 10:53:08 +0000 (11:53 +0100)
commit211b0bed95b3f6b177a541ec52302b8febd6b49c
treed9b7b276b959cf2228329a27e2e89b6400b883dd
parent2347965cd99810f5ff6f638880e4eb498a8ffa82
PR ld/21529: Use a linker script to limit output with the test case

Complement commit d9409498813c ("Add a testcase for PR ld/21529") and
use a linker script to prevent an inter-segment gap arranged by the
default linker script associated with some targets such as `rx-elf':

$ ld -e main -o tmpdir/dump-elf tmpdir/pr21529.o
$ readelf -l tmpdir/dump-elf
Elf file type is EXEC (Executable file)
Entry point 0x10000004
There are 2 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0x10000000 0x10000000 0x00008 0x00008 R E 0x1000
  LOAD           0x001ffc 0xbffffffc 0xbffffffc 0x00004 0x00004 RW  0x1000

 Section to Segment mapping:
  Segment Sections...
   00     .text
   01     .stack
$

and converted to padding with the use of the binary BFD for output from
producing unreasonably large files.

ld/
* testsuite/ld-unique/pr21529.ld: New test linker script.
* testsuite/ld-unique/pr21529.d: Use it.
ld/ChangeLog
ld/testsuite/ld-unique/pr21529.d
ld/testsuite/ld-unique/pr21529.ld [new file with mode: 0644]
This page took 0.023669 seconds and 4 git commands to generate.