mirror of
https://github.com/rui314/mold.git
synced 2024-12-25 17:34:02 +03:00
Allow R_386_GOTPC relocations in non-allocated sections
This is not logically correct, because PC-relative offsets make sense only against allocated sections. However, this is needed by Gentoo's dev-lang/gnat-gpl-2018-r3 package.
This commit is contained in:
parent
7a689d8361
commit
c876849144
@ -279,6 +279,7 @@ void InputSection<I386>::apply_reloc_nonalloc(Context<I386> &ctx, u8 *base) {
|
||||
case R_386_PC8:
|
||||
case R_386_PC16:
|
||||
case R_386_PC32:
|
||||
case R_386_GOTPC:
|
||||
if (ref)
|
||||
write(ref->frag->get_addr(ctx) + ref->addend);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user