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

Side by Side Diff: src/untrusted/irt/check_tls.py

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: Deconditionalize irt_tls.c 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # A simple program to run objdump on a file and assert that '%gs'
6 # appears nowhere in it. This ensures that the direct register access
7 # style of TLS is not being used in the IRT blob.
8
9 import subprocess
10 import sys
11
12
13 def Main(args):
14 objdump = args[0]
Mark Seaborn 2011/04/13 20:32:30 Maybe also do "assert len(args) == 2" (or a more i
15 obj_file = args[1]
16 proc = subprocess.Popen([objdump, '-d', obj_file], stdout=subprocess.PIPE)
17 for line in proc.stdout:
18 if '%gs' in line:
19 print 'TLS access found: %s' % line
Mark Seaborn 2011/04/13 20:32:30 Can add some more description to the error? e.g.
20 exit(1)
Mark Seaborn 2011/04/13 20:32:30 I think sys.exit is the more correct function to u
21
22
23 if __name__ == '__main__':
24 Main(sys.argv[1:])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698