summaryrefslogtreecommitdiff
path: root/libexec/ld.elf_so/arch
diff options
context:
space:
mode:
authormacallan <macallan@NetBSD.org>2020-05-24 02:33:11 +0000
committermacallan <macallan@NetBSD.org>2020-05-24 02:33:11 +0000
commit24fad88d8b608c4e82457cfd42a3b28a4fd81f50 (patch)
treef092f0dbffaeb581ace605d7c7967c7eae92c8fc /libexec/ld.elf_so/arch
parent14b4bbb24d6307d383b4d1c8f1052fe81cf5beb2 (diff)
new binutils/gcc started emitting R_PPC_UADDR32 reloc entries, so for now
treat them like R_PPC_ADDR32 XXX these relocs have been observed in the xf86-video-radeon driver, but only in the AtomBios support code, which is unused on PowerPC. This allows the driver to load but it's not clear if the affected parts would actually function.
Diffstat (limited to 'libexec/ld.elf_so/arch')
-rw-r--r--libexec/ld.elf_so/arch/powerpc/ppc_reloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c b/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
index 58f33d6c6ab..133b12f6c06 100644
--- a/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
+++ b/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppc_reloc.c,v 1.60 2019/12/08 23:49:16 uwe Exp $ */
+/* $NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $ */
/*-
* Copyright (C) 1998 Tsubai Masanari
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ppc_reloc.c,v 1.60 2019/12/08 23:49:16 uwe Exp $");
+__RCSID("$NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $");
#endif /* not lint */
#include <stdarg.h>
@@ -195,6 +195,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
case R_TYPE(ADDR64): /* <address> S + A */
#else
case R_TYPE(ADDR32): /* <address> S + A */
+ case R_TYPE(UADDR32): /* <address> S + A */
#endif
case R_TYPE(GLOB_DAT): /* <address> S + A */
case R_TYPE(ADDR16_LO):
@@ -226,6 +227,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
case R_TYPE(ADDR64): /* <address> S + A */
#else
case R_TYPE(ADDR32): /* <address> S + A */
+ case R_TYPE(UADDR32): /* <address> S + A */
#endif
case R_TYPE(GLOB_DAT): /* <address> S + A */
tmp = (Elf_Addr)(defobj->relocbase + def->st_value +