from all archs.
Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
char *symname;
rel_addr = (ELF_RELOC *) tpnt->dynamic_info[DT_JMPREL];
this_reloc = rel_addr + reloc_entry;
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_ARM_JUMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of jump instruction to fix up */
instr_addr = ((unsigned long) this_reloc->r_offset +
(unsigned long) tpnt->loadaddr);
struct funcdesc_value volatile *__attribute__((__visibility__("hidden")))
_dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
ElfW(Sym) *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF_R_TYPE(this_reloc->r_info);
symtab_index = ELF_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname= strtab + symtab[symtab_index].st_name;
- if (reloc_type != R_BFIN_FUNCDESC_VALUE) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of GOT entry fix up */
got_entry = (struct funcdesc_value *) DL_RELOC_ADDR(tpnt->loadaddr, this_reloc->r_offset);
unsigned long
_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
int symtab_index;
char *strtab;
char *symname;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_CRIS_JUMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of the jump instruction to fix up. */
instr_addr = ((unsigned long)this_reloc->r_offset +
(unsigned long)tpnt->loadaddr);
struct funcdesc_value volatile attribute_hidden *
_dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
tpnt->loadaddr);
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t)
strtab = DL_RELOC_ADDR (tpnt->dynamic_info[DT_STRTAB], tpnt->loadaddr);
symname= strtab + symtab[symtab_index].st_name;
- if (reloc_type != R_FRV_FUNCDESC_VALUE) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of GOT entry fix up */
got_entry = (struct funcdesc_value *)
DL_RELOC_ADDR (this_reloc->r_offset, tpnt->loadaddr);
unsigned long
_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
unsigned long
_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
ElfW(Sym) *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(rel_addr + reloc_entry);
- reloc_type = ELF_R_TYPE(this_reloc->r_info);
symtab_index = ELF_R_SYM(this_reloc->r_info);
symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_68K_JMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of the jump instruction to fix up. */
instr_addr = (this_reloc->r_offset + tpnt->loadaddr);
got_addr = (char **)instr_addr;
unsigned long
__dl_runtime_pltresolve(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,this_reloc);
-#if defined (__SUPPORT_LD_DEBUG__)
- if (unlikely(ELF32_R_TYPE(this_reloc->r_info) != R_PPC_JMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocation\n", _dl_progname);
- _dl_exit(1);
- }
-#endif
-
/* Address of dump instruction to fix up */
reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + this_reloc->r_offset);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_SH_JMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of jump instruction to fix up */
instr_addr = (unsigned long) (this_reloc->r_offset + tpnt->loadaddr);
got_addr = (char **) instr_addr;
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_SH_JMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump reloc\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of jump instruction to fix up */
instr_addr = ((unsigned long)this_reloc->r_offset +
(unsigned long)tpnt->loadaddr);
unsigned long
_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
ElfW(Sym) *symtab;
reloc_entry = (reloc_entry >> 10) - 0xc;
this_reloc = (ELF_RELOC *)(rel_addr + reloc_entry);
- reloc_type = ELF_R_TYPE(this_reloc->r_info);
symtab_index = ELF_R_SYM(this_reloc->r_info);
symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_SPARC_JMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of the jump instruction to fix up. */
instr_addr = (this_reloc->r_offset + tpnt->loadaddr);
got_addr = (char **)instr_addr;
unsigned long
_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
ElfW(Sym) *symtab;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(rel_addr + reloc_entry);
- reloc_type = ELF_R_TYPE(this_reloc->r_info);
symtab_index = ELF_R_SYM(this_reloc->r_info);
symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely(reloc_type != R_X86_64_JUMP_SLOT)) {
- _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit(1);
- }
-
/* Address of the jump instruction to fix up. */
instr_addr = (this_reloc->r_offset + tpnt->loadaddr);
got_addr = (char **)instr_addr;
unsigned long
_dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
- int reloc_type;
ELF_RELOC *this_reloc;
char *strtab;
Elf32_Sym *symtab;
rel_addr = (char *) tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *) (rel_addr + reloc_entry);
- reloc_type = ELF32_R_TYPE (this_reloc->r_info);
symtab_index = ELF32_R_SYM (this_reloc->r_info);
symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
- if (unlikely (reloc_type != R_XTENSA_JMP_SLOT)) {
- _dl_dprintf (2, "%s: Incorrect relocation type in jump relocations\n",
- _dl_progname);
- _dl_exit (1);
- }
-
/* Address of the literal to fix up. */
got_addr = (char **) (this_reloc->r_offset + tpnt->loadaddr);