add real fdpic loading of shared libraries

previously, the normal ELF library loading code was used even for
fdpic, so only the kernel-loaded dynamic linker and main app could
benefit from separate placement of segments and shared text.
This commit is contained in:
Rich Felker
2015-09-22 19:12:48 +00:00
parent 2462370b4f
commit eaf7ab6e24
3 changed files with 59 additions and 9 deletions
+1
View File
@@ -37,6 +37,7 @@
#define REL_FUNCDESC_VAL R_SH_FUNCDESC_VALUE
#undef REL_RELATIVE
#define DL_FDPIC 1
#define FDPIC_CONSTDISP_FLAG 0x100
#define CRTJMP(pc,sp) do { \
register size_t r8 __asm__("r8") = ((size_t *)(sp))[-2]; \
__asm__ __volatile__( "jmp @%0 ; mov %1,r15" \