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

Unified Diff: pydir/crosstest.py

Issue 1180883002: Subzero: Fix lit and cross tests broken in f8b4cc8. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 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 | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/crosstest.py
diff --git a/pydir/crosstest.py b/pydir/crosstest.py
index 04411861638aeb0875ebfa53699ac023b02af1e1..c8c7fc8cf254ee0a7170155069a05d861e3de9a8 100755
--- a/pydir/crosstest.py
+++ b/pydir/crosstest.py
@@ -120,6 +120,15 @@ def main():
'-filetype=obj',
'-o=' + obj_sz,
asm_sz])
+ # Each separately translated Subzero object file contains its own
+ # definition of the __Sz_block_profile_info profiling symbol. Avoid
+ # linker errors (multiply defined symbol) by making all copies weak.
+ # (This could also be done by Subzero if it supported weak symbol
+ # definitions.) This approach should be OK because cross tests are
+ # currently the only situation where multiple translated files are
+ # linked into the executable, but when PNaCl supports shared nexe
+ # libraries, this would need to change.
+ shellcmd(['objcopy', '--weaken-symbol=__Sz_block_profile_info', obj_sz])
objs.append(obj_sz)
if args.crosstest_bitcode:
shellcmd(['{bin}/pnacl-llc'.format(bin=bindir),
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698