From: Zenith432 <zen...@us...> - 2016-04-28 15:18:11
|
Please accept a correction to my previous post. The patch in that post breaks relocations of type X86_64_RELOC_SIGNED in macho64. The following patch restricts the correction to macho32 object files. ----------begin patch diff a/output/outmacho.c b/output/outmacho.c --- a/output/outmacho.c +++ b/output/outmacho.c @@ -464,6 +464,8 @@ static int64_t add_reloc(struct section *sect, int32_t section, r->snum = raa_read(extsyms, section); if (reltype == RL_BRANCH) r->type = X86_64_RELOC_BRANCH; + if (r->type == GENERIC_RELOC_VANILLA) + adjust = -sect->size; } else { /* local */ r->ext = 0; ----------end patch |