summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/reloc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/reloc.h b/arch/powerpc/reloc.h
index d5ba74a7..1563450d 100644
--- a/arch/powerpc/reloc.h
+++ b/arch/powerpc/reloc.h
@@ -32,9 +32,9 @@ static inline int do_single_reloc(
*reloc_addr = def.sym->st_value + addend;
break;
case R_PPC_TPREL32:
- *reloc_addr += def.sym
- ? def.sym->st_value + def.dso->tls_offset - 0x7000
- : self->tls_offset - 0x7000;
+ *reloc_addr = (def.sym
+ ? def.sym->st_value + def.dso->tls_offset
+ : self->tls_offset) - 0x7000 + addend;
break;
}
return 0;