Fix error in resolving symbols.

This commit is contained in:
Joe Hendrix 2018-01-23 13:38:49 -08:00
parent d1bdff9866
commit eda3c6412a
No known key found for this signature in database
GPG Key ID: 8DFA5FF784098C4F

View File

@ -514,7 +514,7 @@ resolveElfFuncSymbol mem secMap idx ste
case Map.lookup (Elf.steIndex ste) secMap of
Just (base,sec)
| elfSectionAddr sec <= val && val < elfSectionAddr sec + Elf.elfSectionSize sec
, off <- toInteger (elfSectionAddr sec) - toInteger val
, off <- toInteger val - toInteger (elfSectionAddr sec)
, Just addr <- incSegmentOff base off -> do
Just $ Right $ MemSymbol { memSymbolName = Elf.steName ste
, memSymbolStart = addr