From: Robert Pengelly Date: Fri, 25 Apr 2025 06:43:32 +0000 (+0100) Subject: Divide/Modulo by 65536 not 16 X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=673e0a81f398df1f27c7cd9b24f80716e9920dd6;p=slink.git Divide/Modulo by 65536 not 16 --- diff --git a/link.c b/link.c index ca35020..7958454 100644 --- a/link.c +++ b/link.c @@ -457,7 +457,8 @@ static void reloc_generic (struct section_part *part, struct reloc_entry *rel, s result = (((unsigned long) dgroup_start / 16) << 16) | (unsigned long) temp; } else { - result = (((unsigned long) result / 16) << 16) | (unsigned long) result % 16; + /*result = (((unsigned long) result / 16) << 16) | (unsigned long) result % 16;*/ + result = (((unsigned long) result / 65536) << 16) | (unsigned long) result % 65536; } /*printf ("relocating: %s: %lx, %lx, %lx\n", rel->symbol->name, part->rva + offset + 0x60, result, size);*/