Skip to content
Snippets Groups Projects
Commit 348e3f8e authored by Edward Amsden's avatar Edward Amsden Committed by Marge Bot
Browse files

Lookup _GLOBAL_OFFSET_TABLE by symbol->addr when doing relocations

parent 82693938
No related branches found
No related tags found
No related merge requests found
......@@ -1060,7 +1060,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
} else {
symbol = &stab->symbols[ELF_R_SYM(info)];
/* First see if it is a local symbol. */
if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) {
if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL || strncmp(symbol->name, "_GLOBAL_OFFSET_TABLE_", 21) == 0) {
S = (Elf_Addr)symbol->addr;
} else {
S_tmp = lookupSymbol_( symbol->name );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment