| Index: tools/binary_size/binary_size_utils.py
|
| diff --git a/tools/binary_size/binary_size_utils.py b/tools/binary_size/binary_size_utils.py
|
| index 5521ba7d7e912e88db14d50c339223c4e6629850..67335c2b6d37885833bdc3781f0e681bb358d59d 100644
|
| --- a/tools/binary_size/binary_size_utils.py
|
| +++ b/tools/binary_size/binary_size_utils.py
|
| @@ -35,8 +35,14 @@ def ParseNm(nm_lines):
|
| # Match lines with no symbol name, only addr and type
|
| addr_only_re = re.compile(r'^[0-9a-f]{8,} (.)$')
|
|
|
| + seen_lines = set()
|
| for line in nm_lines:
|
| line = line.rstrip()
|
| + if line in seen_lines:
|
| + # nm outputs identical lines at times. We don't want to treat
|
| + # those as distinct symbols because that would make no sense.
|
| + continue
|
| + seen_lines.add(line)
|
| match = sym_re.match(line)
|
| if match:
|
| address, size, sym_type, sym = match.groups()[0:4]
|
|
|