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

Unified Diff: build/build_nexe.py

Issue 1009533004: Add lint check for IRT sandbox base address hiding. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: review Created 5 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 | build/link_irt.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/build_nexe.py
diff --git a/build/build_nexe.py b/build/build_nexe.py
index 023c78452e805d10dd864baca22b4e9329303f09..4a375b95dd856f8efb6e26b28410e0374dabdb40 100644
--- a/build/build_nexe.py
+++ b/build/build_nexe.py
@@ -284,6 +284,10 @@ class Builder(CommandRunner):
"""Helper which returns objcopy path."""
return self.GetBinName('objcopy')
+ def GetLe32ObjDump(self):
+ """Helper which returns objdump path."""
+ return os.path.join(self.toolbin, 'le32-nacl-objdump')
+
def GetReadElf(self):
"""Helper which returns readelf path."""
return self.GetBinName('readelf')
@@ -605,6 +609,9 @@ class Builder(CommandRunner):
'--readelf-cmd=' + self.GetReadElf()]
if self.commands_are_scripts:
irt_link_cmd += ['--commands-are-scripts']
+ if self.arch == 'x86-64':
+ irt_link_cmd += ['--sandbox-base-hiding-check',
+ '--objdump-cmd=' + self.GetLe32ObjDump()]
irt_link_cmd += srcs_flags
err = self.Run(irt_link_cmd, normalize_slashes=False)
if err:
« no previous file with comments | « no previous file | build/link_irt.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698