[Git][ghc/ghc][master] ELF linker: increment curSymbol after filling in fields of current entry
Marge Bot
gitlab at gitlab.haskell.org
Wed May 6 08:42:50 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
a95e7fe0 by Ömer Sinan Ağacan at 2020-05-06T04:42:39-04:00
ELF linker: increment curSymbol after filling in fields of current entry
The bug was introduced in a8b7cef4d45 which added a field to the
`symbols` array elements and then updated this code incorrectly:
- oc->symbols[curSymbol++] = nm;
+ oc->symbols[curSymbol++].name = nm;
+ oc->symbols[curSymbol].addr = symbol->addr;
- - - - -
1 changed file:
- rts/linker/Elf.c
Changes:
=====================================
rts/linker/Elf.c
=====================================
@@ -944,8 +944,9 @@ ocGetNames_ELF ( ObjectCode* oc )
) {
goto fail;
}
- oc->symbols[curSymbol++].name = nm;
+ oc->symbols[curSymbol].name = nm;
oc->symbols[curSymbol].addr = symbol->addr;
+ curSymbol++;
}
} else {
/* Skip. */
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a95e7fe02efd2fdeec91ba46de64bc78c81381eb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a95e7fe02efd2fdeec91ba46de64bc78c81381eb
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200506/db9cef84/attachment.html>
More information about the ghc-commits
mailing list