Don't allocate .got.plt section if there are no GOT nor PLT entries.
commita83776658579c3a115ac0f57d78116f2882aa35b
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 14 Jul 2010 00:30:55 +0000 (14 00:30 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 14 Jul 2010 00:30:55 +0000 (14 00:30 +0000)
tree2a40685e6e1c04b7cc65fb3696652d15ac90b163
parentc0f2971c19b4a34eed71f0a1654813386ed22c9d
Don't allocate .got.plt section if there are no GOT nor PLT entries.

bfd/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11812
* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
 allocate .got.plt section if there are no GOT nor PLT
 entries.
 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.

ld/testsuite/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11812
* ld-elf/exclude3b.d: Don't run on ia64-*-*.  Replace .got with
.dynamic.

* ld-elf/exclude3d.d: New.
* ld-i386/nogot1.d: Likewise.
* ld-i386/nogot1.s: Likewise.
* ld-x86-64/nogot1.d: Likewise.
* ld-x86-64/nogot1.s: Likewise.

* ld-i386/i386.exp: Run nogot1.
* ld-x86-64/x86-64.exp: Likewise.
12 files changed:
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/exclude3b.d
ld/testsuite/ld-elf/exclude3d.d [copied from ld/testsuite/ld-elf/exclude3b.d with 77% similarity]
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/nogot1.d [new file with mode: 0644]
ld/testsuite/ld-i386/nogot1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/nogot1.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/nogot1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp