This is the mail archive of the 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: Problems compiling elfxx-sparc.c

On Wed, Apr 20, 2005 at 08:17:48PM -0700, David S. Miller wrote:
> On Thu, 21 Apr 2005 12:46:36 +0930
> Alan Modra <> wrote:
> > On Wed, Apr 20, 2005 at 11:33:54AM -0700, David S. Miller wrote:
> > > -  return ELF64_R_SYM (r_info);
> > > +  bfd_vma r_symndx = ELF32_R_SYM (r_info);
> > > +  return (r_symndx >> 24);
> > 
> > Better would be to not compile this function if BFD64 is not defined.
> > Or call abort or something.  The warning is telling you that if this
> > function is ever called when bfd_vma is 32-bit, then something is badly
> > broken.
> I merely copied over the trick that the generic BFD elf handling
> uses to deal with this situation.  Perhaps the same shift should
> be #ifdef'd out of bfd/elflink.c when not BFD64 as well? :-)

Perhaps.  It's a little different situation.  The elflink.c function
handles both 32-bit and 64-bit relocs, whereas I presume
sparc_elf_r_symndx_64 will only be used on 64-bit relocs.  But yes, this
is a pot/kettle scenario.  :)

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]