This is the mail archive of the libc-alpha@sources.redhat.com 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] PPC64 tls fixes


As I said, I wasn't able to test on ppc64.  I'm sure there are some errors.
The changes I made were self-evident cleanups very similar to the parallel
code in powerpc32.  The old value calculations were wonko as discussed here
previously, and your changes didn't affect that.  My changes make them
match the working code used by other platforms.

It seems likely this change could be at fault (overzealous cruft removal on
my part):

   if (r_type == R_PPC64_RELATIVE)
     {
-#ifndef RTLD_BOOTSTRAP
-      /* Already done in dynamic linker.  */
-      if (map != &GL(dl_rtld_map))
-#endif
       *reloc_addr = map->l_addr + reloc->r_addend;
       return;
     }
 
Try restoring those lines and if that works just make it:

#if !defined RTLD_BOOTSTRAP && defined SHARED


You've added a lot of *_GOT_* relocs, which are just never necessary.
Those relocs never come out of ld -shared.  

Please find how my changes broke running ld.so, and fix just that first.  

I think all my TLS code is correct, cleaner than what you have, fixes bugs
you have not fixed, and nicely parallels the ppc32 code that does in fact
work.  The 16-bit relocs are missing, but we can add those as I did for ppc32.

I don't want to revert to the previous crufty version and start over.  The
changes I made are not that extensive nor hard to comprehend, so I don't
think it will take long to find my errors.


Thanks,
Roland


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