This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Properly define elf_backend_post_process_headers
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: H dot J dot Lu <hjldottoolsatgmaildotcom at volta dot aurel32 dot net>
- Cc: binutils at sourceware dot org
- Date: Tue, 5 Jul 2011 20:21:04 +0200
- Subject: Re: PATCH: Properly define elf_backend_post_process_headers
- References: <20110625180535.GA9558@intel.com>
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>
>
> * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
> diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
> index 9ae81bf..ca480ab 100644
> --- a/bfd/elf64-x86-64.c
> +++ b/bfd/elf64-x86-64.c
> @@ -4958,6 +4958,8 @@ 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. */
> @@ -5017,6 +5019,8 @@ elf64_l1om_elf_object_p (bfd *abfd)
> #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
> @@ -5038,7 +5042,6 @@ elf64_l1om_elf_object_p (bfd *abfd)
> #define elf64_bed elf64_l1om_fbsd_bed
>
> #undef elf_backend_post_process_headers
> -#define elf_backend_post_process_headers _bfd_elf_set_osabi
>
> #include "elf64-target.h"
>
> @@ -5077,6 +5080,7 @@ 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 \
> @@ -5090,7 +5094,4 @@ elf32_x86_64_elf_object_p (bfd *abfd)
> #define elf_backend_size_info \
> _bfd_elf32_size_info
>
> -#undef elf_backend_post_process_headers
> -#define elf_backend_post_process_headers _bfd_elf_set_osabi
> -
> #include "elf32-target.h"
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net