This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -taso support in LD for x86-64


On Mon, Feb 21, 2005 at 05:04:13PM -0800, Edoardo Apra wrote:
> Alan
> any chance to have it implemented?

I might look at it for powerpc64, but probably not for x86_64.  As I
said previously, the linker support for this option is easy.  See
ld/emultempl/alphaelf.em.  However, there are other things beside the
linker that need to cooperate.

> This would tremendously Fortran developers using g77 on x86-64
> whose Fortran code interoperates with C code.
> For example, we dynamically allocate memory  in Fortran
> by using address returned by malloc. Since g77 does not support
> the -i8 option (that converts all Fortran integers to 64-bit integers),
> whenever malloc returns addresses that exceed 32-bit, the Fortran code 
> is in trouble.
> 
> Edo
> 
> Alan Modra wrote:
> 
> >On Fri, Feb 18, 2005 at 01:18:10PM -0800, Edoardo Apra wrote:
> > 
> >
> >>Any guess if a -taso option for ld could be implemented on x86-64?
> >
> >Yes, easily.  You would need support in the dynamic linker to ensure
> >shared libs were loaded below 2G too.

Actually this comment about the dynamic linker is wrong.  It's not just
the dynamic linker, but the whole process address space that needs to
be affected by -taso.  So besides the linker changing load addresses and
marking executables with a flag, you need a kernel that takes note of
the flag and limits process address space appropriately.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]