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: [Bug] ld aborts linking large ieee file


Hi Nick,

> -----Original Message-----
> From: Nick Clifton [mailto:nickc at redhat dot com]
> Sent: Thursday, March 13, 2003 10:33 AM
>
> Hi Gene,
> 
> > Gene Smith wrote:
> >  > Also, if I try to do a objcopy of the large 3rd party ieee file
> > (even > with no transformation) objcopy segfaults.  
> However, the large
> > 3rd >party ieee file lists nicely with objdump.
> > 
> > gdb shows this caused by a call to ieee_write_expression() in
> > bfd/ieee.c:2496 (binutils 2.13) with a NULL pointer in 3rd parameter
> > (pointer to asymbol). The null pointer is shortly 
> de-referenced inside
> > the function causing segfault. Don't see a difference in latest
> > cvs. Don't know all that is going on but perhaps should just return
> > false instead of calling ieee_write_expression() when r->sym_ptr_ptr
> > is null at li 2486?
> 
> Hmm, I think this one will need some more investigation.  Do you have
> a *small* file that reproduces this problem (rather than the large 3rd
> party version) that you could send to me ?  if not, then can you put
> the large file somewhere where I can download it via FTP ?  (Assuming
> that you are allowed to make this file public).
> 
> Cheers
>         Nick
> 
> PS.  Is this problem related to the other ieee linking problem that
> you posted earlier ("ld 2.13 dumps core/seg faults") ?
>

Yes, the problems are related and occur only when the 3rd party file is
linked (with ld) or copied (with objcopy). In both cases (according to the
debugger) they are having problems with two symbols that appear 1st in the
symbol table shown with objdump -xD (objdump works ok with the 3rd-p file).
Here is how it looks:

SYMBOL TABLE:
00000000	*ABS* 0020 00 conlist
00000000	*ABS* 0021 00 globaltr
   :

After this, many other symbols are listed. conlist and globaltr don't seem
to appear any where else in the listing. Have no idea what the symbols do or
what most of the columns in the symbol table mean. There is another ABS
symbol further down that looks like this (and there is no problem with it):
:
00000000 g	*ABS* 0414 00 ____FPU
:

(It has a "g" (global?) like all the other symbols.)

I was able to rebuild a changed-by-me version of objcopy so the null pointer
is not used and produced a modified 3rd-p file which when dumped looks like
this:

SYMBOL TABLE:
* empty table entry
* empty table entry
   :				(all below is unchanged)

When I ld the modified 3rd-p file (with many other files) it works without
the abort and does not complain about the empty table entries.
-gene 





 


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