diff options
Diffstat (limited to 'rts')
-rw-r--r-- | rts/linker/MachO.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c index b720077bbb..6e109e592d 100644 --- a/rts/linker/MachO.c +++ b/rts/linker/MachO.c @@ -977,11 +977,15 @@ relocateSection(ObjectCode* oc, int curSection) } IF_DEBUG(linker, debugBelch("relocateSection: thing = %p\n", (void *) thing)); + + /* Thing points to memory within one of the relocated sections. We can + * probe the first byte to sanity check internal relocations. + */ if (0 == reloc->r_extern) { if (reloc->r_pcrel) { - checkProddableBlock(oc, (void *)((char *)thing + baseValue), relocLenBytes); + checkProddableBlock(oc, (void *)((char *)thing + baseValue), 1); } else { - checkProddableBlock(oc, (void *)thing, relocLenBytes); + checkProddableBlock(oc, (void *)thing, 1); } } |