section-relative relocs on ia64 (was: Re: Why does slurp_ia64_unwind_table complain unwind symbol type?)

Alan Modra amodra@bigpond.net.au
Wed Oct 27 12:53:00 GMT 2004


On Wed, Oct 27, 2004 at 03:03:38AM -0700, David Mosberger wrote:
> >>>>> On Tue, 26 Oct 2004 14:13:51 -0700, "H. J. Lu" <hjl@lucon.org> said:
> 
>   HJ> Here is a patch.
> 
> Ah, that looks good (and easy).
> 
>   HJ> H.J.
>   HJ> +	  /* Make output-section relative to section where the symbol
>   HJ> +	     is defined. PR 475  */
>   HJ> +	  value -= sym_sec->output_section->vma;
> 
> This is automatically guaranteed to never go negative, even for
> corner-cases, such as weak symbols, right?

Undefined weak might present a problem.  They'll have sym_sec == NULL.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list