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: section-relative relocs on ia64 (was: Re: Why does slurp_ia64_unwind_table complain unwind symbol type?)


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


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