This is the mail archive of the binutils@sourceware.org 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: Release 2.22: branch create


> Eric, could you please test this patch?  GOLD had the same exact bug so I
> fixed it there too.
>
> bfd/
>
> 	PR binutils/13301
> 	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Always move the
> 	__tls_get_addr call delay slot instruction forward 4 bytes when
> 	performing relaxation.

Not sufficient it seems, you also need to move the potential relocation of the 
insn in the delay slot.  The example I have is:

   0x00014188 <+232>:   add  %g7, %o0, %o0
   0x0001418c <+236>:   sethi  %hi(0), %l0
   0x00014190 <+240>:   ld  [ %o0 ], %g1

before the change and:

   0x00014188 <+232>:   sethi  %hi(0), %l0
   0x0001418c <+236>:   add  %g0, %g0, %o0
   0x00014190 <+240>:   ld  [ %o0 ], %g1

after, because of a R_SPARC_TLS_GD_HI22 relocation attached to the insn.

-- 
Eric Botcazou


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