This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines


On Wednesday, August 29, 2012 12:44:21 Andreas Krebbel wrote:
> Hi,
> 
> the attached patch fixes two problems with the S/390 IFUNC
> optimization of the mem* functions:
> 
> 1. In the current implementation the resolver functions reside in a
> different file than the CPU optimized versions.  This requires an
> R_390_RELATIVE runtime relocation to be generated when the resolver
> returns the function pointers. This caused a bug with GCJ. libgcj
> calls memcpy via function pointer (R_390_GLOB_DAT).  This relocation
> is resolved at load time of libgcj.  The dynamic linker in that case
> called the memcpy resolver inside Glibc *before* glibc has been
> relocated causing the resolver to return a bogus value.
> 
> This perhaps could also be fixed in the dynamic linker by calling the
> ifunc resolvers only in a second pass over all the relocations?!

Could this also be an issue on other architectures like x86-64? I had a 
few strange bugreports with LD_BIND_NOW=1 in kde that were impossible to 
debug but seemed to involve multiarch functions,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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