Changes in kernel/tools/genmap.py [28f4adb:4e9aaf5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tools/genmap.py
r28f4adb r4e9aaf5 86 86 obdump = read_obdump(obmapf) 87 87 88 def key_sorter(x):89 return x[0]88 def sorter(x,y): 89 return cmp(x[0],y[0]) 90 90 91 91 for line in kmapf: … … 93 93 res = startfile.match(line) 94 94 95 if ((res) and ( res.group(3) in obdump[res.group(1)])):95 if ((res) and (obdump[res.group(1)].has_key(res.group(3)))): 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( key = key_sorter)99 symbols.sort(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 b')114 out = open(sys.argv[3], 'w') 115 115 116 116 generate(kmapf, obmapf, out)
Note:
See TracChangeset
for help on using the changeset viewer.