aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@mips.com>2018-06-21 21:40:56 +0100
committerMaciej W. Rozycki <macro@mips.com>2018-06-21 21:40:56 +0100
commit334cd8a780840d6aee86790fe2fe5f02fe56edf6 (patch)
tree0f5facfb89411497db483cc88b9731f8fe6c6d17 /bfd
parentbb29b84d8c2cc2e91f8dec7f7eb64f03470bd03c (diff)
downloadbinutils-334cd8a780840d6aee86790fe2fe5f02fe56edf6.zip
binutils-334cd8a780840d6aee86790fe2fe5f02fe56edf6.tar.gz
binutils-334cd8a780840d6aee86790fe2fe5f02fe56edf6.tar.bz2
MIPS/BFD: Keep EI_ABIVERSION setting together
Shuffle code in `_bfd_mips_post_process_headers' so that the setting of the EI_ABIVERSION ELF file header field is complete before calling `_bfd_elf_post_process_headers'. This used to be the case, but was changed with commit 351cdf24d223 ("[MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions") for no reason. bfd/ * elfxx-mips.c (_bfd_mips_post_process_headers): Keep EI_ABIVERSION setting together.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 68db522..f56ddf9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2018-06-21 Maciej W. Rozycki <macro@mips.com>
+ * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
+ EI_ABIVERSION setting together.
+
+2018-06-21 Maciej W. Rozycki <macro@mips.com>
+
* elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
(MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
(MIPS_LIBC_ABI_MAX): New enumeration constants.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index f3a2d3b..0b0084c 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -16258,11 +16258,11 @@ _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
i_ehdrp->e_ident[EI_ABIVERSION] = MIPS_LIBC_ABI_MIPS_PLT;
}
- _bfd_elf_post_process_headers (abfd, link_info);
-
if (mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64
|| mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64A)
i_ehdrp->e_ident[EI_ABIVERSION] = MIPS_LIBC_ABI_MIPS_O32_FP64;
+
+ _bfd_elf_post_process_headers (abfd, link_info);
}
int