This is the mail archive of the
mailing list for the binutils project.
Re: Commit: Patch: GAS: Fix DWARF line number generation for target that use linker relaxation
On Fri, Jun 29, 2012 at 12:49:47PM +0100, nick clifton wrote:
> There was a thinko in my proposed patch. Here is a fixed version
> which passes the correct argument to MD_APPLY_SYM_VALUE. Does this
> version meet your expectations ?
> + else if (MD_APPLY_SYM_VALUE (fixP))
> + add_number -= S_GET_VALUE (fixP->fx_subsy);
but I'd make this consistent with the fx_addsy case. ie.
else if (sub_symbol_segment != undefined_section
&& ! bfd_is_com_section (sub_symbol_segment)
&& MD_APPLY_SYM_VALUE (fixP))
add_number -= S_GET_VALUE (fixP->fx_subsy);
The extra checks are cheap, saving a call to S_GET_VALUE that will
only return zero anyway (and will save you or me wondering why they
are done differently some time in the future).
You probably ought to look over all the target md_apply_fix functions
too, for cases where the target does something with fx_subsy and
doesn't define MD_APPLY_SYM_VALUE as zero.
Australia Development Lab, IBM