This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: recent binutils and mips64-linux
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: Eric Christopher <echristo at redhat dot com>, cgd at broadcom dot com, binutils at sources dot redhat dot com
- Date: Thu, 2 Oct 2003 20:14:15 +0200 (MET DST)
- Subject: Re: recent binutils and mips64-linux
- Organization: Technical University of Gdansk
On 24 Sep 2003, Richard Sandiford wrote:
> Right. Have I understood correctly, and that all we want is a way to
> generate n64 code in which symbols are known to have 32-bit values?
> If so, it should just be a case of disabling:
>
> /* -mexplicit-relocs doesn't yet support non-PIC n64. We don't know
> how to generate %highest/%higher/%hi/%lo sequences. */
> if (mips_abi == ABI_64 && !TARGET_ABICALLS)
> {
> if ((target_flags_explicit & target_flags & MASK_EXPLICIT_RELOCS) != 0)
> sorry ("non-PIC n64 with explicit relocations");
> target_flags &= ~MASK_EXPLICIT_RELOCS;
> }
>
> when this new command-line flag is passed. We'll then generate the
> normal %hi/%lo sequences instead of dla. I'll drum up a patch.
Note that the resulting object file should be somehow marked to let a
user know it has some addressing restrictions and cannot be linked at an
arbitrary address.
Actually the best solution might be using ELF32 (possibly n32) for the
output format, which automatically guarantees a 32-bit address space, but
use an n64 setup for the gcc's code generator. This way no change is
needed to binutils at all.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +