Add symbols for global entry stub, and report stats
authorAlan Modra <amodra@gmail.com>
Tue, 1 Jul 2014 10:02:25 +0000 (19:32 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 1 Jul 2014 10:58:20 +0000 (20:28 +0930)
commit7341d5e22f1061016411734ba162d362ac5928db
tree36cec79187a6e05bf2e6fa095168347669fbb11e
parent2dc0e7b400e46f105960c0dfcd431013f0013c6a
Add symbols for global entry stub, and report stats

The undefined function symbols (with non-zero value) on global entry
stubs are discarded by objdump when disassembling, so give objdump
another symbol to mark the stubs.

Also fixes a couple of bugs:
- entry_section was set to .opd for ELFv2, which meant a hard error
  rather than a warning when _start wasn't defined.
- global entry stubs were not built if they were the only type of
  stub in an executable.

bfd/
* elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
(struct ppc_link_hash_table): Increase size of stub_count array.
(build_global_entry_stubs): Emit symbol on global entry stub.
(ppc64_elf_build_stubs): NULL check htab->brlt.  Add global entry
stub stats.
ld/
* emultempl/ppc64elf.em (stub_added): Delete.
(gld${EMULATION_NAME}_finish): Call ppc64_elf_build_stubs even when
none of the usual stubs have been added.  Only change entry_section
for ELFv1.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/emultempl/ppc64elf.em