new dlstart stage-2 chaining for or1k
authorRich Felker <dalias@aerifal.cx>
Thu, 17 Sep 2015 07:20:51 +0000 (07:20 +0000)
committerRich Felker <dalias@aerifal.cx>
Thu, 17 Sep 2015 07:20:51 +0000 (07:20 +0000)
arch/or1k/reloc.h

index ddee45c53d1293915a8860d2e80d1b5c59d7b8b0..128089cac20837bd5fe94e3e9e4ae609cbe7b01f 100644 (file)
 
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
        "l.jr %0 ; l.ori r1,%1,0" : : "r"(pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+       ".hidden " #sym " \n" \
+       "       l.jal 1f \n" \
+       "        l.nop \n" \
+       "       .word " #sym "-. \n" \
+       "1:     l.lwz %0, 0(r9) \n" \
+       "       l.add %0, %0, r9 \n" \
+       : "=r"(*(fp)) : : "memory", "r9" )