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.
This commit is contained in:
parent
4e5c7a2176
commit
bfa09700b9
8 changed files with 16 additions and 8 deletions
|
|
@ -19,7 +19,7 @@
|
|||
#define IS_COPY(x) ((x)==R_ARM_COPY)
|
||||
#define IS_PLT(x) ((x)==R_ARM_JUMP_SLOT)
|
||||
|
||||
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,
|
||||
|
|
@ -51,6 +51,7 @@ static inline void do_single_reloc(
|
|||
: self->tls_offset + 8;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define NO_LEGACY_INITFINI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue