buildman: Allow lines without a symbol
The 'nm' tool can produce lines without a symbol, for example: 00000004 t Silently skip these and anything else without three fields. Drop the warning since there is nothing the user can do about it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
811c8e1711
commit
f2e6775cdd
@ -669,17 +669,15 @@ class Builder:
|
|||||||
"""
|
"""
|
||||||
sym = {}
|
sym = {}
|
||||||
for line in fd.readlines():
|
for line in fd.readlines():
|
||||||
try:
|
line = line.strip()
|
||||||
if line.strip():
|
parts = line.split()
|
||||||
size, type, name = line[:-1].split()
|
if line and len(parts) == 3:
|
||||||
except:
|
size, type, name = line.split()
|
||||||
tprint("Invalid line in file '%s': '%s'" % (fname, line[:-1]))
|
if type in 'tTdDbB':
|
||||||
continue
|
# function names begin with '.' on 64-bit powerpc
|
||||||
if type in 'tTdDbB':
|
if '.' in name[1:]:
|
||||||
# function names begin with '.' on 64-bit powerpc
|
name = 'static.' + name.split('.')[0]
|
||||||
if '.' in name[1:]:
|
sym[name] = sym.get(name, 0) + int(size, 16)
|
||||||
name = 'static.' + name.split('.')[0]
|
|
||||||
sym[name] = sym.get(name, 0) + int(size, 16)
|
|
||||||
return sym
|
return sym
|
||||||
|
|
||||||
def _ProcessConfig(self, fname):
|
def _ProcessConfig(self, fname):
|
||||||
|
Loading…
Reference in New Issue
Block a user