PATCH: Properly define elf_backend_post_process_headers
H.J. Lu
hjl.tools@gmail.com
Tue Jul 5 19:19:00 GMT 2011
On Tue, Jul 5, 2011 at 11:21 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sat, Jun 25, 2011 at 11:05:35AM -0700, H dot J dot Lu wrote:
>> I checked in this patch to proerly define
>> elf_backend_post_process_headers.
>
> This patch seems to break setting the OSABI on FreeBSD. Before this
> patch it was ELFOSABI_FREEBSD, with this patch applied, it is changed
> to ELFOSABI_NONE.
>
>> H.J.
>> ---
>> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
>> index b3ffc1b..58bf993 100644
>> --- a/bfd/ChangeLog
>> +++ b/bfd/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2011-06-25 H.J. Lu <hongjiu.lu@intel.com>
>> +
>> + * elf64-x86-64.c (elf_backend_post_process_headers): Don't
>> + define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
>> +
>> 2011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
We should always define elf_backend_post_process_headers to
_bfd_elf_set_osabi for ELF/x86-64. I checked in this patch.
Thanks.
H.J.
--
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6d9f246..2fc3d26 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (elf_backend_post_process_headers): Always
+ define to _bfd_elf_set_osabi.
+
2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
Thomas Schwinge <thomas@schwinge.name>
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index ca480ab..12748d8 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -4940,7 +4940,6 @@ static const struct bfd_elf_special_section
#define elf_backend_hash_symbol \
elf_x86_64_hash_symbol
-#undef elf_backend_post_process_headers
#define elf_backend_post_process_headers _bfd_elf_set_osabi
#include "elf64-target.h"
@@ -4958,8 +4957,6 @@ static const struct bfd_elf_special_section
#undef elf64_bed
#define elf64_bed elf64_x86_64_fbsd_bed
-#undef elf_backend_post_process_headers
-
#include "elf64-target.h"
/* Solaris 2 support. */
@@ -5018,9 +5015,6 @@ elf64_l1om_elf_object_p (bfd *abfd)
#undef elf_backend_object_p
#define elf_backend_object_p elf64_l1om_elf_object_p
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers _bfd_elf_set_osabi
-
#undef elf_backend_static_tls_alignment
#undef elf_backend_want_plt_sym
@@ -5041,8 +5035,6 @@ elf64_l1om_elf_object_p (bfd *abfd)
#undef elf64_bed
#define elf64_bed elf64_l1om_fbsd_bed
-#undef elf_backend_post_process_headers
-
#include "elf64-target.h"
/* 32bit x86-64 support. */
@@ -5079,9 +5071,6 @@ elf32_x86_64_elf_object_p (bfd *abfd)
#undef ELF_OSABI
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers _bfd_elf_set_osabi
-
#undef elf_backend_object_p
#define elf_backend_object_p \
elf32_x86_64_elf_object_p
More information about the Binutils
mailing list