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: X Libraries/linking


On Tue, Jun 25, 2002 at 10:19:50AM -0700, H. J. Lu wrote:
> One way to support 32bit/64bit is to enable both 32bit/64bit targets
> in binutils. Here is the linker patch to support --enable-64-bit-bfd.
> I don't think it is complete. You should take a look at how x86-64,
> mips and maybe others do it. Basically, you have a native binutils
> which can do both 32bit and 64bit. You can select the other one at
> the run time.

Let's restate the problem:

DT_NEEDED shared libs are not searched for in -L or -Y paths.  The
general solution is to use -rpath-link, but linux binutils users have
become accustomed to ld looking through /etc/ld.so.conf to find shared
libs, at least when using native tools.  powerpc64-linux binaries run
on a powerpc-linux host, so they're "native", but the magic
/etc/ld.so.conf lookup doesn't happen, nor is LD_LIBRARY_PATH or
LD_RUN_PATH examined.

H.J.'s solution, effectively the same as configuring
--host=powerpc-linux --target=powerpc-linux --enable-targets=powerpc64-linux
works for ld.  But building bi-arch capable tools doesn't work for
powerpc gas at the moment.  Also, there are likely some niggly
incompatibilities in utilities such as objcopy due to the default
target being the 32 bit one.  Those reasons are why I think we need to
build with --host=powerpc-linux --target=powerpc64-linux at the moment.

-- 
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]