about summary refs log tree commit diff
path: root/arch/powerpc/reloc.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-06-16 03:09:07 -0400
committerRich Felker <dalias@aerifal.cx>2014-06-16 03:09:07 -0400
commitbfa09700b927c99cff5263483c1d7a4d1fe766e5 (patch)
tree2cb41b425402212a2916e00d3108edd045552664 /arch/powerpc/reloc.h
parent4e5c7a2176773c9a1564c6603240337b3ad6b496 (diff)
downloadmusl-bfa09700b927c99cff5263483c1d7a4d1fe766e5.tar.gz
musl-bfa09700b927c99cff5263483c1d7a4d1fe766e5.tar.xz
musl-bfa09700b927c99cff5263483c1d7a4d1fe766e5.zip
dynamic linker: permit error returns from arch-specific reloc function
the immediate motivation is supporting TLSDESC relocations which
require allocation and thus may fail (unless we pre-allocate), but
this mechanism should also be used for throwing an error on
unsupported or invalid relocation types, and perhaps in certain cases,
for reporting when a relocation is not satisfiable.
Diffstat (limited to 'arch/powerpc/reloc.h')
-rw-r--r--arch/powerpc/reloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/reloc.h b/arch/powerpc/reloc.h
index 38034c56..d5ba74a7 100644
--- a/arch/powerpc/reloc.h
+++ b/arch/powerpc/reloc.h
@@ -7,7 +7,7 @@
 #define IS_PLT(x) ((x)==R_PPC_JMP_SLOT)
 
 // see linux' arch/powerpc/include/asm/elf.h 
-static inline void do_single_reloc(
+static inline int do_single_reloc(
 	struct dso *self, unsigned char *base_addr,
 	size_t *reloc_addr, int type, size_t addend,
 	Sym *sym, size_t sym_size,
@@ -37,6 +37,7 @@ static inline void do_single_reloc(
 			: self->tls_offset - 0x7000;
 		break;
 	}
+	return 0;
 }
 
 void __reloc_self(int c, size_t *a, size_t *dynv)