diff options
author | Edward Amsden <edward.amsden@plowtech.net> | 2019-05-16 19:41:30 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-02 16:18:05 -0400 |
commit | 348e3f8eea84bdbfa2f3a8adc772c4b67c27f756 (patch) | |
tree | 893a2ee325aa64452f2bb5e2b3c5f4524826ba9b /rts/linker | |
parent | 826939387be69b100461dd553937dfea729b15ef (diff) | |
download | haskell-348e3f8eea84bdbfa2f3a8adc772c4b67c27f756.tar.gz |
Lookup _GLOBAL_OFFSET_TABLE by symbol->addr when doing relocations
Diffstat (limited to 'rts/linker')
-rw-r--r-- | rts/linker/Elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c index 7e5386e178..6495ce1d65 100644 --- a/rts/linker/Elf.c +++ b/rts/linker/Elf.c @@ -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 ); |