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: binutils causes GLIBC ifunc breakage on PowerPC64 ELFv2


On Mon, Aug 18, 2014 at 08:57:55PM +0930, Alan Modra wrote:
> On Sun, Aug 17, 2014 at 04:10:05PM +0200, Aurelien Jarno wrote:
> > Bisecting the issue I have found the problem has been introduced by this
> > commit:
> > 
> > | commit d1eca1e41ddae8c3cd925be827640de919301432
> > | Author: Alan Modra <amodra@gmail.com>
> > | Date:   Wed Jul 2 15:07:18 2014 +0930
> > | 
> > |     Taking an undefined function's address in an executable
> > | 
> > |     doesn't always mean you need to define a function symbol on plt code.
> > |     If all references are in read-write sections, then using dynamic relocs
> > |     is OK.
> 
> Thanks for tracking this down.
> 
> This probably could be fixed by making changes in relocate_section for
> ifunc, but it's simpler to disable this optimisation for ifunc.
> 
> 	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
> 	use dynrelocs for ifunc.
> 	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.

Thanks for the quick patch. I confirm it fixes the problem for elf64.
Unfortunately I don't have a full toolchain ready to test the elf32
case.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


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