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: PATCH: Check ELF class for DT_NEEDED (Re: Problem with biarch support: Wrong library linked in...)


On Wed, Jun 12, 2002 at 01:06:41PM +0200, Andreas Jaeger wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > On Tue, Jun 11, 2002 at 06:12:47PM -0700, H . J . Lu wrote:
> > > On Tue, Jun 11, 2002 at 09:46:28AM +0200, Andreas Jaeger wrote:
> > > > 
> > > > On x86-64 we have both 32-bit libs in lib and 64-bit libs in lib64.
> > > > But this gives a problem with the search done in emultempl/elf32.em.
> > > > ld suddenly decides to use a 32-bit library:
> > > > 
> > > > $ gcc  -Wall   -o xw -L/usr/X11R6/lib64 -lX11 -lXext -lXmu -lm xw.o xaccess.o fashion.o -lXinerama 
> > > > /usr/X11R6/lib/libSM.so.6: could not read symbols: Invalid operation
> > > > collect2: ld returned 1 exit status
> > > > make: *** [xw] Error 1
> > > > 
> > > 
> > > Here is a patch.
> > > 
> > > 
> > 
> > Here is an update. 
> 
> Thanks a lot!
> 
> I've applied both patches and now it seems to work fine for me,
> 

If no one objects, I will check in my second patch. The only problem
I can think of is someone tries to use a DSO with a foreign BFD target
for DT_NEEDED. I don't think we should support it in ld.


H.J.


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