diff options
author | Alan Modra <amodra@gmail.com> | 2013-10-29 15:06:09 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-10-30 13:37:47 +1030 |
commit | ee67d69a3ff0eed25d98c5e97ed6c3ede8069edc (patch) | |
tree | fe01ce8627a4436bea7d77485a61c01462a6d557 /include | |
parent | 71a39c98f8bedad54818c62ab2d567b0e2de546b (diff) | |
download | gdb-ee67d69a3ff0eed25d98c5e97ed6c3ede8069edc.zip gdb-ee67d69a3ff0eed25d98c5e97ed6c3ede8069edc.tar.gz gdb-ee67d69a3ff0eed25d98c5e97ed6c3ede8069edc.tar.bz2 |
Add .abiversion related support for ELFv2
Defines bits in ELF e_flags to differentiate ELFv2 objects from ELFv2,
adds .abiversion directive to explicitly choose the ABI, and code to
check and automatically select ABI.
include/elf/
* ppc64.h (EF_PPC64_ABI): Define.
bfd/
* elf64-ppc.c (abiversion, set_abiversion): New functions.
(ppc64_elf_get_synthetic_symtab): Handle ELFv2 objects without .opd.
(struct ppc_link_hash_table): Add opd_abi.
(ppc64_elf_check_relocs): Check no .opd with ELFv2.
(ppc64_elf_merge_private_bfd_data): New function.
(ppc64_elf_print_private_bfd_data): New function.
(ppc64_elf_tls_setup): Set htab->opd_abi.
(ppc64_elf_size_dynamic_sections): Don't emit OPD related dynamic
tags for ELFv2.
(ppc_build_one_stub): Use R_PPC64_IRELATIVE for ELFv2 ifunc.
(ppc64_elf_finish_dynamic_symbol): Likewise
binutils/
* readelf.c (get_machine_flags): Display ABI version for EM_PPC64.
gas/
* config/tc-ppc.c: Include elf/ppc64.h.
(ppc_abiversion): New variable.
(md_pseudo_table): Add .abiversion.
(ppc_elf_abiversion, ppc_elf_end): New functions.
* config/tc-ppc.h (md_end): Define.
Diffstat (limited to 'include')
-rw-r--r-- | include/elf/ChangeLog | 4 | ||||
-rw-r--r-- | include/elf/ppc64.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index fae0bf8..2999bc8 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,5 +1,9 @@ 2013-10-30 Alan Modra <amodra@gmail.com> + * ppc64.h (EF_PPC64_ABI): Define. + +2013-10-30 Alan Modra <amodra@gmail.com> + * ppc64.h (R_PPC64_ADDR16_HIGH, R_PPC64_ADDR16_HIGHA, R_PPC64_TPREL16_HIGH, R_PPC64_TPREL16_HIGHA, R_PPC64_DTPREL16_HIGH, R_PPC64_DTPREL16_HIGHA): New. diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h index 221786f..1121649 100644 --- a/include/elf/ppc64.h +++ b/include/elf/ppc64.h @@ -173,6 +173,13 @@ END_RELOC_NUMBERS (R_PPC64_max) (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA) \ || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA)) + +/* e_flags bits specifying ABI. + 1 for original function descriptor using ABI, + 2 for revised ABI without function descriptors, + 0 for unspecified or not using any features affected by the differences. */ +#define EF_PPC64_ABI 3 + /* Specify the start of the .glink section. */ #define DT_PPC64_GLINK DT_LOPROC |