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

Unified Diff: src/untrusted/irt/nacl.scons

Issue 6839002: Pass -mtls-use-call when building libraries used in IRT. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: made requested cosmetic fixes Created 9 years, 8 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
« src/untrusted/irt/check_tls.py ('K') | « src/untrusted/irt/check_tls.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/nacl.scons
diff --git a/src/untrusted/irt/nacl.scons b/src/untrusted/irt/nacl.scons
index c50c859e9154c2846bf8717311f1df2dde49a541..6e074b1167c524cf409134fb66e614a00a06da79 100644
--- a/src/untrusted/irt/nacl.scons
+++ b/src/untrusted/irt/nacl.scons
@@ -44,13 +44,24 @@ if asm_env.Bit('bitcode'):
asm_helper = asm_env.ComponentObject(
'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_'))
-files = ['irt_entry.c', 'irt_sbrk.c', 'irt_elf_utils.c', asm_helper]
-# TLS virtualisation only works on x86-64 currently.
-# TODO(mseaborn): Turn on "-mtls-use-call" for the relevant libraries
-# on x86-32 so that this works there too.
-if env.Bit('build_x86_64'):
- files.append('irt_tls.c')
-blob_env.ComponentProgram(
+files = ['irt_entry.c',
+ 'irt_sbrk.c',
+ 'irt_elf_utils.c',
+ 'irt_tls.c',
Mark Seaborn 2011/04/13 21:24:41 It just occurred to me that putting irt_tls.c in u
+ asm_helper]
+irt_library = blob_env.ComponentProgram(
'irt.nexe', files,
- EXTRA_LIBS=['ppruntime', 'srpc', 'imc', 'platform', 'gio',
- 'pthread', 'm'])
+ EXTRA_LIBS=['ppruntime',
+ 'srpc',
+ 'imc',
+ 'platform',
+ 'gio',
+ 'pthread',
+ 'm'])
+
+if env.Bit('build_x86_32'):
+ # Make sure that the linked IRT nexe never uses TLS via %gs access.
+ node = env.CommandTest('irt_tls_test.out',
+ ['${PYTHON}', env.File('check_tls.py'),
+ '${OBJDUMP}', irt_library])
+ env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test')
« src/untrusted/irt/check_tls.py ('K') | « src/untrusted/irt/check_tls.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698