Skip to content

Commit a2896c4

Browse files
authored
Merge pull request #22549 from aschwaighofer/analyze_code_size_object_files
2 parents 4d7a4b5 + 9a968e9 commit a2896c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils/analyze_code_size.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ def parse_segments(path, arch):
259259
segment_regex = re.compile(
260260
r"^ 0x[0-9a-f]+ \(\s*0x(?P<size>[0-9a-f]+)\) "
261261
r"(?P<name>.+?) (?P<name2>.+?)$")
262+
object_file_segment_regex = re.compile(
263+
r"^ 0x[0-9a-f]+ \(\s*0x(?P<size>[0-9a-f]+)\) "
264+
r"SEGMENT$")
262265
section_regex = re.compile(
263266
r"^ 0x[0-9a-f]+ \(\s*0x(?P<size>[0-9a-f]+)\) "
264267
r"(?P<name>.+?) (?P<name2>.+?)$")
@@ -280,6 +283,12 @@ def parse_segments(path, arch):
280283
segments.append(new_segment)
281284
continue
282285

286+
object_file_segment_match = object_file_segment_regex.match(line)
287+
if object_file_segment_match:
288+
new_segment = Segment("SEGMENT")
289+
segments.append(new_segment)
290+
continue
291+
283292
# Match a section entry.
284293
section_match = section_regex.match(line)
285294
if section_match:

0 commit comments

Comments
 (0)