This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Support EFI/x86-64
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Ari Lemmke <arl at lemmke dot org>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, binutils at sources dot redhat dot com
- Date: Sun, 18 Mar 2007 10:21:17 -0700
- Subject: Re: PATCH: Support EFI/x86-64
- References: <20070307213406.GA23064@lucon.org> <20070318125057.EB4B2641D0@mail.netorek.fi>
On Sun, Mar 18, 2007 at 02:50:57PM +0200, Ari Lemmke wrote:
>
> Hello,
>
> Not sending this to binutils mailing list, sorry.
>
> --enable-targets="all" is still broken if option
> --enable-64-bit-bfd is not given.
>
> Seems some ifdefs (64 bit stuff) missing.
>
> binutils is cvs version 20070315T1645.
>
> using gcc 4.1.2 for compilation.
>
I checked in the enclosed patch to fix it.
> --
>
> FYI .. with -Werror following patch is needed (target linux-arm)
> (don't know why the typedeffed value won't work directly):
>
>
> *** binutils-2.17.50/gas/config/tc-arm.c Thu Mar 15 14:11:49 2007
> --- binutils-2.17.50.NEW/gas/config/tc-arm.c Sun Mar 18 15:52:10 2007
> ***************
> *** 18549,18555 ****
> if (encoded_addend == (unsigned int) FAIL)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("the offset 0x%08lX is not representable"),
> ! addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> --- 18549,18555 ----
> if (encoded_addend == (unsigned int) FAIL)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("the offset 0x%08lX is not representable"),
> ! (unsigned long) addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> ***************
> *** 18589,18595 ****
> if (addend_abs >= 0x1000)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (only 12 bits available for the magnitude)"),
> ! addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> --- 18589,18595 ----
> if (addend_abs >= 0x1000)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (only 12 bits available for the magnitude)"),
> ! (unsigned long) addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> ***************
> *** 18628,18634 ****
> if (addend_abs >= 0x100)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (only 8 bits available for the magnitude)"),
> ! addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> --- 18628,18634 ----
> if (addend_abs >= 0x100)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (only 8 bits available for the magnitude)"),
> ! (unsigned long) addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> ***************
> *** 18668,18679 ****
> if (addend_abs & 0x3)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (must be word-aligned)"),
> ! addend_abs);
>
> if ((addend_abs >> 2) > 0xff)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (must be an 8-bit number of words)"),
> ! addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
> --- 18668,18679 ----
> if (addend_abs & 0x3)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (must be word-aligned)"),
> ! (unsigned long) addend_abs);
>
> if ((addend_abs >> 2) > 0xff)
> as_bad_where (fixP->fx_file, fixP->fx_line,
> _("bad offset 0x%08lX (must be an 8-bit number of words)"),
> ! (unsigned long) addend_abs);
>
> /* Extract the instruction. */
> insn = md_chars_to_number (buf, INSN_SIZE);
>
>
H.J.
---
2003-03-18 H.J. Lu <hongjiu.lu@intel.com>
* targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
only if BFD64 is defined.
--- bfd/targets.c.64 2007-03-07 13:37:37.000000000 -0800
+++ bfd/targets.c 2007-03-18 10:12:29.000000000 -0700
@@ -874,8 +874,8 @@ static const bfd_target * const _bfd_tar
&b_out_vec_big_host,
&b_out_vec_little_host,
&bfd_efi_app_ia32_vec,
- &bfd_efi_app_x86_64_vec,
#ifdef BFD64
+ &bfd_efi_app_x86_64_vec,
&bfd_efi_app_ia64_vec,
#endif
&bfd_elf32_avr_vec,