projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd7159e
)
new dlstart stage-2 chaining for or1k
author
Rich Felker
<dalias@aerifal.cx>
Thu, 17 Sep 2015 07:20:51 +0000
(07:20 +0000)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 17 Sep 2015 07:20:51 +0000
(07:20 +0000)
arch/or1k/reloc.h
patch
|
blob
|
history
diff --git
a/arch/or1k/reloc.h
b/arch/or1k/reloc.h
index ddee45c53d1293915a8860d2e80d1b5c59d7b8b0..128089cac20837bd5fe94e3e9e4ae609cbe7b01f 100644
(file)
--- a/
arch/or1k/reloc.h
+++ b/
arch/or1k/reloc.h
@@
-13,3
+13,12
@@
#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" )