Skip to content

Commit

Permalink
Exclude padding section from minimal build size report (#22578)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->
Should make the binary size report more stable as changes < 4K can occur
when a padding boundary is crossed.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
  • Loading branch information
skottmckay authored Oct 24, 2024
1 parent 3ae7c3c commit b990361
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/ci_build/github/linux/ort_minimal/readelf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ def get_section_sizes(binary_path, readelf_path, dump_to_file=None):
for match in re.finditer(r"\[[\s\d]+\] (\..*)$", output, re.MULTILINE):
items = match.group(1).split()
name = items[0]
if name == ".relro_padding":
# padding fluctuates and isn't due to the actual code. as it adds noise to the diff exclude it
continue

# convert size from hex to int
size = int(items[4], 16)

section_sizes[name] = size

if dump_to_file:
Expand Down

0 comments on commit b990361

Please sign in to comment.