projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove old clang workarounds from arm syscall implementation
[musl]
/
arch
/
i386
/
reloc.h
diff --git
a/arch/i386/reloc.h
b/arch/i386/reloc.h
index
3ca9d11
..
eaf5aae
100644
(file)
--- a/
arch/i386/reloc.h
+++ b/
arch/i386/reloc.h
@@
-1,28
+1,33
@@
#include <string.h>
#include <elf.h>
#include <string.h>
#include <elf.h>
-#define
ETC_LDSO_PATH "/etc/ld-musl-i386.path
"
+#define
LDSO_ARCH "i386
"
-#define IS_COPY(x) ((x)==R_386_COPY)
-
-static inline void do_single_reloc(size_t *reloc_addr, int type, size_t sym_val, size_t sym_size, unsigned char *base_addr, size_t addend)
+static int remap_rel(int type)
{
switch(type) {
case R_386_32:
{
switch(type) {
case R_386_32:
- *reloc_addr += sym_val;
- break;
+ return REL_SYMBOLIC;
case R_386_PC32:
case R_386_PC32:
- *reloc_addr += sym_val - (size_t)reloc_addr;
- break;
+ return REL_OFFSET;
case R_386_GLOB_DAT:
case R_386_GLOB_DAT:
+ return REL_GOT;
case R_386_JMP_SLOT:
case R_386_JMP_SLOT:
- *reloc_addr = sym_val;
- break;
+ return REL_PLT;
case R_386_RELATIVE:
case R_386_RELATIVE:
- *reloc_addr += (size_t)base_addr;
- break;
+ return REL_RELATIVE;
case R_386_COPY:
case R_386_COPY:
- memcpy(reloc_addr, (void *)sym_val, sym_size);
- break;
+ return REL_COPY;
+ case R_386_TLS_DTPMOD32:
+ return REL_DTPMOD;
+ case R_386_TLS_DTPOFF32:
+ return REL_DTPOFF;
+ case R_386_TLS_TPOFF:
+ return REL_TPOFF;
+ case R_386_TLS_TPOFF32:
+ return REL_TPOFF_NEG;
+ case R_386_TLS_DESC:
+ return REL_TLSDESC;
}
}
+ return 0;
}
}