diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2018-03-20 10:54:50 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2018-04-25 20:49:57 +0000 |
commit | 18a203380502fb3ee75633fd464faa3c83cec710 (patch) | |
tree | 38db2664e147980721410e17587c5ec056dba4d7 /binutils | |
parent | 617a5ada88c7d4b6aae201ad5b295f3d2ef07c10 (diff) | |
download | gdb-18a203380502fb3ee75633fd464faa3c83cec710.zip gdb-18a203380502fb3ee75633fd464faa3c83cec710.tar.gz gdb-18a203380502fb3ee75633fd464faa3c83cec710.tar.bz2 |
[ARM] Add FDPIC OSABI flag support.
ELF files targetting ARM FDPIC use the ELFOSABI_ARM_FDPIC flag.
Set it appropriately in file generators (eg. gas), and handle it in
readers (eg. readelf).
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>
bfd/
* elf32-arm.c (elf32_arm_print_private_bfd_data): Support
EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
(elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
(ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
binutils/
* readelf.c (decode_ARM_machine_flags): Support EF_ARM_PIC.
(get_osabi_name): Support ELFOSABI_ARM_FDPIC.
gas/
* config/tc-arm.c (arm_fdpic): New.
(elf32_arm_target_format): Support FDPIC.
(OPTION_FDPIC): New.
(md_longopts): Support FDPIC.
(md_parse_option): Likewise.
(md_show_usage): Likewise.
include/
* elf/arm.h (EF_ARM_FDPIC): New.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/readelf.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2b2c709..68e5175 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2018-04-25 Christophe Lyon <christophe.lyon@st.com> + Mickaël Guêné <mickael.guene@st.com> + + * readelf.c (decode_ARM_machine_flags): Support EF_ARM_PIC. + (get_osabi_name): Support ELFOSABI_ARM_FDPIC. + 2018-04-25 Alan Modra <amodra@gmail.com> * testsuite/binutils-all/arm/objdump.exp: Remove arm-aout and diff --git a/binutils/readelf.c b/binutils/readelf.c index 528954c..e8e1b96 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2578,6 +2578,12 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[]) e_flags &= ~ EF_ARM_RELEXEC; } + if (e_flags & EF_ARM_PIC) + { + strcat (buf, ", position independent"); + e_flags &= ~ EF_ARM_PIC; + } + /* Now handle EABI specific flags. */ switch (eabi) { @@ -3718,6 +3724,7 @@ get_osabi_name (Filedata * filedata, unsigned int osabi) switch (osabi) { case ELFOSABI_ARM: return "ARM"; + case ELFOSABI_ARM_FDPIC: return "ARM FDPIC"; default: break; } |