Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Unified Diff: infra/scripts/legacy/scripts/slave/chromium/sizes.py

Issue 2765983002: Update linux static initializer check in sizes.py (Closed)
Patch Set: cleanup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/scripts/legacy/scripts/slave/chromium/sizes.py
diff --git a/infra/scripts/legacy/scripts/slave/chromium/sizes.py b/infra/scripts/legacy/scripts/slave/chromium/sizes.py
index d5a1169d731eace0f9f1840fd9c3a1ca54c4aff5..df09b7cac32c76fe509b340f7479286fa93e1c52 100755
--- a/infra/scripts/legacy/scripts/slave/chromium/sizes.py
+++ b/infra/scripts/legacy/scripts/slave/chromium/sizes.py
@@ -299,6 +299,17 @@ def check_linux_binary(target_dir, binary_name, options):
if has_init_array:
si_count = init_array_size / word_size
si_count = max(si_count, 0)
+
+ # In newer versions of gcc crtbegin.o inserts frame_dummy into .init_array
+ # but we don't want to count this entry, since it alwasy present and nothing
+ # to do with our code.
+ # TODO(sbc): Do this unconditionally once we drop support for wheezy (gcc-4.6
+ # version of crtbegin.o)
+ result, stdout = run_process(result, ['nm', binary_file])
+ if '__frame_dummy_init_array_entry' in stdout:
+ assert(si_count > 0)
+ si_count -= 1
+
sizes.append((binary_name + '-si', 'initializers', '', si_count, 'files'))
# For Release builds only, use dump-static-initializers.py to print the list
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698