This is the mail archive of the binutils@sourceware.cygnus.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]

Re: HPPA/SOM Patch


At 02:22 PM 6/4/99 -0400, Ian Lance Taylor wrote:

>Is it true that set_symtab is called before the error occurs?

Yes.

>If so, why is hppa_fix_adjustable being called after set_symtab?

It is part of my earlier fix. There are certain fixups that don't
have a symbol associated with them. In that case, the original
code referenced a dummy symbol. I changed that to the symbol_get_bfdsym()
call below.

*** 2886,2892 **** 
case R_ENTRY: 
case R_EXIT: 
/* There is no symbol associated with these fixups. */ 
! relocs[i]->sym_ptr_ptr = &dummy_symbol->bsym; 
relocs[i]->addend = fixp->fx_offset; 
break; 
--- 2893,2900 ---- 
case R_ENTRY: 
case R_EXIT: 
/* There is no symbol associated with these fixups. */ 
! relocs[i]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); 
! *relocs[i]->sym_ptr_ptr = symbol_get_bfdsym (dummy_symbol); 
relocs[i]->addend = fixp->fx_offset; 
break; 

That in turn is causing tc_gen_reloc() to be invoked within write_relocs()
and voila!

So, did I make a wrong assumption here, or should set_symtab be delayed
until after the bfd_map_over_sections (stdoutput, write_relocs, (char *) 0) ?

Regards,

M.
--
Mark Klein                                    DIS International, Ltd.
http://www.dis.com                            415-892-8400
PGP Public Key Available
--

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