Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -805,7 +805,8 @@ Config->Endianness = Config->IsLE ? support::endianness::little : support::endianness::big; Config->IsMips64EL = (Kind == ELF64LEKind && Machine == EM_MIPS); - Config->IsRela = Config->Is64 || IsX32 || Config->MipsN32Abi; + Config->IsRela = Config->Is64 || IsX32 || Config->MipsN32Abi || + Machine == EM_PPC; Config->Pic = Config->Pie || Config->Shared; Config->Wordsize = Config->Is64 ? 8 : 4; } Index: test/ELF/ppc-rela.s =================================================================== --- test/ELF/ppc-rela.s +++ test/ELF/ppc-rela.s @@ -0,0 +1,11 @@ +# REQUIRES: ppc +# RUN: llvm-mc -filetype=obj -triple=powerpc-unknown-freebsd %s -o %t +# RUN: ld.lld %t -o %t2 -shared +# RUN: llvm-readobj -r %t2 | FileCheck %s + +.data + .long foo + +// CHECK: Section ({{.*}}) .rela.dyn { +// CHECK-NEXT: 0x1000 R_PPC_ADDR32 foo 0x0 +// CHECK-NEXT: }