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

Unified Diff: makefile

Issue 7634024: Add an ELF loader that can load and run an executable in the sandbox (Closed) Base URL: https://seccompsandbox.googlecode.com/svn/trunk
Patch Set: Fixes + review changes Created 9 years, 1 month 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 | « elf_loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: makefile
diff --git a/makefile b/makefile
index 77589718ea8901634b9d2ac935dfc9c8d6b37d73..33cc265c2d54f89a5c97e327823c895cf84cf56a 100644
--- a/makefile
+++ b/makefile
@@ -21,7 +21,7 @@ include $(DEP_FILES)
.SUFFIXES: .o64 .o32
-all: testbin timestats demo
+all: testbin timestats demo elf_loader_32 elf_loader_64
clean:
-rm -f playground playground.o
@@ -52,6 +52,13 @@ run_tests_64: $(OBJS64) tests/test_syscalls.o64 tests/clone_test_helper.o64
run_tests_32: $(OBJS32) tests/test_syscalls.o32 tests/clone_test_helper.o32
g++ -m32 $^ -lpthread -lutil -o $@
+# Link these as PIEs so that they stay out of the way of any
+# fixed-position executable that gets loaded later.
+elf_loader_64: elf_loader.o64 $(OBJS64)
+ g++ -pie -m64 $^ -o $@
+elf_loader_32: elf_loader.o32 $(OBJS32)
+ g++ -pie -m32 $^ -o $@
+
demo: playground preload32.so preload64.so
./playground /bin/ls $(HOME)
« no previous file with comments | « elf_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698