summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorDario Bertini <berdario@google.com>2018-11-16 15:49:37 +0100
committerBen Gamari <ben@smart-cactus.org>2018-11-22 16:04:45 -0500
commit254890855ee04762cc0392da19e0c42fc039a718 (patch)
treecdf81f6724ecc8a425ef735e16a391cd5f43b398 /rts
parentb2f6f896a0bae0e68ec629bd6817a2cb2533a12c (diff)
downloadhaskell-254890855ee04762cc0392da19e0c42fc039a718.tar.gz
rts/MachO: Iterate through N (all) symbols, not M external symbols
Fixes #15105
Diffstat (limited to 'rts')
-rw-r--r--rts/linker/MachO.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index 87888e9c87..fd36cd2e5a 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -1661,7 +1661,7 @@ ocGetNames_MachO(ObjectCode* oc)
commonCounter = (unsigned long)commonStorage;
if (oc->info->symCmd) {
- for (int i = 0; i < oc->n_symbols; i++) {
+ for (size_t i = 0; i < oc->info->n_macho_symbols; i++) {
SymbolName* nm = oc->info->macho_symbols[i].name;
MachONList *nlist = &oc->info->nlist[i];
if((nlist->n_type & N_TYPE) == N_UNDF