[commit: ghc] master: Revert "linker/mach-o: Catch the case where there is no symCmd" (fc7601c)
git at git.haskell.org
git at git.haskell.org
Tue Apr 18 22:58:09 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fc7601c5dc9fb826db13c5a644b3a64e7594d0b5/ghc
>---------------------------------------------------------------
commit fc7601c5dc9fb826db13c5a644b3a64e7594d0b5
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon Apr 17 21:02:07 2017 -0400
Revert "linker/mach-o: Catch the case where there is no symCmd"
This causes validation failures on Windows.
This reverts commit 6c05b27e5bafe9f232e7014f4760335f5e3ba591.
>---------------------------------------------------------------
fc7601c5dc9fb826db13c5a644b3a64e7594d0b5
rts/Linker.c | 2 --
rts/linker/MachO.c | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index b214e9c..7366904 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1215,8 +1215,6 @@ mkOc( pathchar *path, char *image, int imageSize,
IF_DEBUG(linker, debugBelch("mkOc: start\n"));
oc = stgMallocBytes(sizeof(ObjectCode), "mkOc(oc)");
- oc->info = NULL;
-
# if defined(OBJFORMAT_ELF)
oc->formatName = "ELF";
# elif defined(OBJFORMAT_PEi386)
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index e09d151..16b712a 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -130,9 +130,7 @@ ocInit_MachO(ObjectCode * oc)
oc->info->nlist = oc->info->symCmd == NULL
? NULL
: (MachONList *)(oc->image + oc->info->symCmd->symoff);
- oc->info->names = oc->info->symCmd == NULL
- ? NULL
- : (oc->image + oc->info->symCmd->stroff);
+ oc->info->names = oc->image + oc->info->symCmd->stroff;
/* If we have symbols, allocate and fill the macho_symbols
* This will make relocation easier.
More information about the ghc-commits
mailing list