Emit code for the secure PLT, where r30 must point to the global
offset table.

Add a shape SGOTCON to emit code like "lwz %r3,.L459@got(30)" for
loading a constant address from the global offset table.  This fixes
string literals in PIC.

Index: arch/powerpc/macdefs.h
--- arch/powerpc/macdefs.h.orig
+++ arch/powerpc/macdefs.h
@@ -383,8 +383,9 @@ typedef long long OFFSZ;
 #ifndef MACHOABI
 #define ARGINIT		(24*8)	/* # bits above fp where arguments start */
 #define AUTOINIT		(8*8)		/* # bits above fp where automatics start */
-#define FPREG   		R30		/* frame pointer */
-#define GOTREG		R31	/* global offset table (PIC) */
+/* Secure PLT needs got in r30. */
+#define GOTREG		R30	/* global offset table (PIC) */
+#define FPREG		R31	/* frame pointer */
 #else
 
 	/* Mach-O allows callee to save argument registers in caller's stack */
@@ -422,6 +423,7 @@ int retreg(int ty);
 #define	SFUNCALL	(MAXSPECIAL+2)	/* struct assign after function call */
 #define SPCON		(MAXSPECIAL+3)  /* positive constant */
 #define SINDCALL	(MAXSPECIAL+4)  /* call into stub function */
+#define SGOTCON		(MAXSPECIAL+5)  /* constant in global offset table */
 
 int features(int f);
 #define FEATURE_BIGENDIAN	0x00010000
