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]

Re: Change to coff-arm.c breaks binutils


> Hi Sean,
> 
> > Sorry about the fact that there isn't a configuration for this.  Here
> > are my full cvs differences for a working binutils cross to
> > arm-wrs-vxworks.  There is one additional change to the ldscript in
> > order to collect sections that have been split-by-reloc.  This is
> > because the current coff loader on the target cannot deal with multiple
> > segments.  I do not feel that this change is to fix a binutils problem.
> > The coff-arm.c mod is a binutils problem, however, IMHO.
> 
> I have checked your diffs into the sources.  (BTW in the future could
> you enclose ChangeLog entries when you submit a patch).
> 
> I changed the patch to coff-arm.c slightly, so that it now looks like:
> 
> 	  /* FIXME - it is not clear which targets need this next test
> 	     and which do not.  It is known that it is needed for the
> 	     VXworks target (hence the #ifdef), but it is also known
> 	     that it was supressed for other (arm) targets.  This ought
> 	     to be sorted out one day.  */
> #ifdef VXWORKS
> 	  /* We must not ignore the symbol value.  If the symbol is
> 	     within the same section, the relocation should have already
> 	     been fixed, but if it is not, we'll be handed a reloc into
> 	     the beginning of the symbol's section, so we must not cancel
> 	     out the symbol's value, otherwise we'll be adding it in
> 	     twice.  */
>           if (sym != NULL && sym->n_scnum != 0)
>             addend += sym->n_value;
> #endif
> 
> And I added a definition of VXWORKS in the config.bfd file.

Wouldn't this be better done as a run-time option?  Then there would be a 
better chance of having a bfd library that could support multiple targets.

R.



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