aboutsummaryrefslogtreecommitdiff
path: root/orderfile
diff options
context:
space:
mode:
Diffstat (limited to 'orderfile')
-rwxr-xr-xorderfile/post_process_orderfile.py8
-rwxr-xr-xorderfile/post_process_orderfile_test.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/orderfile/post_process_orderfile.py b/orderfile/post_process_orderfile.py
index 5f52aa6f..d90c1af7 100755
--- a/orderfile/post_process_orderfile.py
+++ b/orderfile/post_process_orderfile.py
@@ -59,7 +59,13 @@ def run(c3_ordered_stream, chrome_nm_stream, output_stream):
head_marker = "chrome_begin_ordered_code"
tail_marker = "chrome_end_ordered_code"
- c3_ordered_syms = [x.strip() for x in c3_ordered_stream.readlines()]
+ # Filter out $symbols which can come up in the orderfile as well.
+ # Linker ignores the whole orderfile if it finds $symb.
+ c3_ordered_syms = [
+ x.strip()
+ for x in c3_ordered_stream.readlines()
+ if not x.strip().startswith("$")
+ ]
all_chrome_syms = set(_parse_nm_output(chrome_nm_stream))
# Sort by name, so it's predictable. Otherwise, these should all land in the
# same hugepage anyway, so order doesn't matter as much.
diff --git a/orderfile/post_process_orderfile_test.py b/orderfile/post_process_orderfile_test.py
index 60716d87..9dd574a8 100755
--- a/orderfile/post_process_orderfile_test.py
+++ b/orderfile/post_process_orderfile_test.py
@@ -29,6 +29,7 @@ def _write_nm_file(name):
def _write_orderfile(name):
with open(name, "w") as out:
out.write("SymbolOrdered1\n")
+ out.write("$toignore.123\n")
out.write("SymbolOrdered2\n")