This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/17440: Build fails for --target=i686-freebsd4
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Mon, 29 Sep 2014 08:37:18 -0700
- Subject: PATCH: PR ld/17440: Build fails for --target=i686-freebsd4
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
I checked in this patch to fix build for OLD_FREEBSD_ABI_LABEL.
H.J.
---
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f70cad6..d18b265 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/17440
+ * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build
+ for OLD_FREEBSD_ABI_LABEL.
+
2014-09-24 Markus Trippelsdorf <markus@trippelsdorf.de>
PR 17422
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index a00d47c..afa21b5 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -5120,8 +5120,11 @@ elf_i386_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
_bfd_elf_post_process_headers (abfd, info);
#ifdef OLD_FREEBSD_ABI_LABEL
- /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
- memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
+ {
+ /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
+ Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
+ memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
+ }
#endif
}