Skip to content

Commit

Permalink
[ELF][PPC64] Handle R_PPC64_DTPREL64 against non-alloc sections
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Sep 12, 2022
1 parent ed1acd3 commit c0ff4a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions elf/arch-ppc64.cc
Expand Up @@ -334,6 +334,9 @@ void InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {
case R_PPC64_ADDR32:
*(ul32 *)loc = S + A;
break;
case R_PPC64_DTPREL64:
*(ul64 *)loc = S + A - ctx.tp_addr;
break;
default:
Fatal(ctx) << *this << ": apply_reloc_nonalloc: " << rel;
}
Expand Down

0 comments on commit c0ff4a2

Please sign in to comment.