Changes in kernel/tools/genmap.py [4e9aaf5:28f4adb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tools/genmap.py
r4e9aaf5 r28f4adb 86 86 obdump = read_obdump(obmapf) 87 87 88 def sorter(x,y):89 return cmp(x[0],y[0])88 def key_sorter(x): 89 return x[0] 90 90 91 91 for line in kmapf: … … 93 93 res = startfile.match(line) 94 94 95 if ((res) and ( obdump[res.group(1)].has_key(res.group(3)))):95 if ((res) and (res.group(3) in obdump[res.group(1)])): 96 96 offset = int(res.group(2), 16) 97 97 fname = res.group(3) 98 98 symbols = obdump[res.group(1)][fname] 99 symbols.sort( sorter)99 symbols.sort(key = key_sorter) 100 100 for addr, symbol in symbols: 101 101 value = fname + ':' + symbol … … 107 107 def main(): 108 108 if (len(sys.argv) != 4): 109 print "Usage: %s <kernel.map> <nm dump> <output.bin>" % sys.argv[0]109 print("Usage: %s <kernel.map> <nm dump> <output.bin>" % sys.argv[0]) 110 110 return 1 111 111 112 112 kmapf = open(sys.argv[1], 'r') 113 113 obmapf = open(sys.argv[2], 'r') 114 out = open(sys.argv[3], 'w ')114 out = open(sys.argv[3], 'wb') 115 115 116 116 generate(kmapf, obmapf, out)
Note:
See TracChangeset
for help on using the changeset viewer.