This is the mail archive of the binutils@sourceware.org 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: Building a cross binutils for Solaris/x86 target


On Fri, 2007-03-16 at 10:24 -0700, Ian Lance Taylor wrote:
> Alex Bennee <kernel-hacker@bennee.com> writes:
> 
> > One of the toolchains we use at work is a Solaris/x86 target hosted on
> > Linux/x86.
> <snip>
> > In the BFD the linker is specified in elf64-x86-64.c as "/lib/ld64.so.1"
> > when on Solaris is needs to be in "/lib/amd64/ld.so.1". Are there any
> > config variables passed to the C code that I can use to #ifdef this?
<snip>
> This isn't properly expressed as an autoconf test.  Autoconf tests can
> only test for host features.  You are talking about a target feature.
> The way to implement this would be to clone the x86_64 target and just
> change the interpreter string.  Then make your new target the default
> in config.bfd.

You mean create something like elf64-solaris-x86-64.c as a clone of the
original elf64-x86-64.c?

It does seem a little like a sledgehammer approach. Scanning through the
directory it looks like BFD is trying to keep the processor dependant
stuff purely that, dependant on the processor.

However if a patch creating a new variant and associated files is
acceptable to the binutils maintainers I'm happy to do that.

> Alternatively, GNU/Linux has the same issue.  The way it is handled
> there is to arrange for gcc to always pass the appropriate
> -dynamic-linker option when it invokes the linker.  That is the way to
> go if you always use gcc.

I shall investigate if I can build the OpenSolaris linker on a Linux
host. Otherwise I may have to go for remotely using a target machine to
link the final result.

-- 
Alex, homepage: http://www.bennee.com/~alex/
When a fellow says, "It ain't the money but the principle of the thing,"
it's the money. -- Kim Hubbard


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