Wow that 'ImportSymbolsScript' helped. I 'turned down' that mapfile from
Address Publics by Value
... and modded ImportSymbolsScript.py in GHIDRA 'basic editor' like this:
# Imports a file with lines in the form "0xSEGMENT:0xADDRESS symbolName"
# @category Data
f = "c:\Tools\!Temp\Portable_VB6\Vs6sp6B\setupsp6.map.txt"
# f.askFile("Give me a file to open", "Go baby go!")
# for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript
for line in file(f): # note, cannot use open(), since that is in GhidraScript
pieces = line.split()
(segm,offset) = pieces.split(":")
segm = "1000" # dirty hack !!!
address = toAddr(long(segm + offset, 16))
print "creating symbol", pieces, "at address", address
createLabel( address, pieces, False )
Basically changes are:
- Changed the input order for pieces
- Added support for segment offset
- Hard coded file path for better workflow when modding/debugging the script (f = ...)
- Added that
"1000" + part into toAddr() to simulate the need segment offset "1000:..."
Well it worked !!!
BEFORE running the script: