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: new ppc32 GOT/PLT support


On Wed, May 25, 2005 at 11:58:10PM +0930, Alan Modra wrote:
> Revised ppc32 non-exec PLT/GOT support, which applies on top of
> http://sources.redhat.com/ml/libc-alpha/2005-05/msg00047.html, which
> hasn't yet been applied.
> 
> Changes from the last patch: Removed PIC-ccflag fudge as -fPIC and
> -mdata-plt now work together.  CGOTSETUP and CGOTRESTORE defines in
> sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h to handle
> init of r30 for plt calls to __librt_{en,dis}able_asynccancel.
> 
> Tested with no "make check" regressions on nptl enabled powerpc-linux,
> both with new and old ABI compilers.

Seems to work for me.
I think we should mention the new relocs in <elf.h> though:

2005-06-07  Jakub Jelinek  <jakub@redhat.com>

	* elf/elf.h (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI,
	R_PPC_REL16_HA): Define.

--- libc/elf/elf.h.jj	2005-06-06 14:47:23.000000000 +0200
+++ libc/elf/elf.h	2005-06-06 18:57:37.000000000 +0200
@@ -1979,6 +1979,12 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_PPC_DIAB_RELSDA_HI	184	/* like EMB_RELSDA, but high 16 bit */
 #define R_PPC_DIAB_RELSDA_HA	185	/* like EMB_RELSDA, adjusted high 16 */
 
+/* GNU relocs used in PIC code sequences.  */
+#define R_PPC_REL16		249	/* word32   (sym-.) */
+#define R_PPC_REL16_LO		250	/* half16   (sym-.)@l */
+#define R_PPC_REL16_HI		251	/* half16   (sym-.)@h */
+#define R_PPC_REL16_HA		252	/* half16   (sym-.)@ha */
+
 /* This is a phony reloc to handle any old fashioned TOC16 references
    that may still be in object files.  */
 #define R_PPC_TOC16		255

	Jakub


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