Chromium Code Reviews
DescriptionChange startup ABI for untrusted code to be C-compatible
This changes the trusted runtime to start up untrusted code with an
ABI that is compatible with the normal C ABI for the machine. Rather
than having a special machine-dependent ABI for the entry point, the
entry point is now expected to be a normal C function of one argument.
That argument is a pointer onto the stack, where lies the information
previously passed there, but now in a uniform machine-independent format.
This entails some changes in the trusted code to do the appropriate
machine-dependent setup of the stack and registers.
In the untrusted runtime libraries, it removes a great deal of
assembly code now that the entry point function _start can be written
entirely in C. Since it's pure C, the whole startup path is much more
PNaCl-friendly.
This makes it possible to clean up the IRT startup a bit more too,
since it's easy to just use its own variant of that simple C function.
Before this can land, it will require corresponding changes to the
startup code in glibc and its dynamic linker, which will be reviewed
separately. There will need to be a multi-stage deployment in which
the toolchains get updated and then this change lands with a toolchain
DEPS update included in the same commit.
Note that this makes all old nexe binaries no longer work (if they
need their arguments, environment, or auxv, which is used to work with
the IRT). This is a hard break and we don't intend to provide any
compatibility for old nexes or old IRT images. Any application
rebuilt with the new toolchains (newlib or glibc, native or pnacl)
should work without source changes.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=1131
TEST=pending
R=bsy@google.com,sehr@google.com
Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=5900
Patch Set 1 #
Total comments: 1
Patch Set 2 : avoid pnacl driver change (crt1.bc back to crt1.o); adjust expected errors in startup_message test #Patch Set 3 : rebased #Patch Set 4 : rebased, includes toolchain DEPS roll #Patch Set 5 : add a few casts to suppress warnings #Patch Set 6 : multilib vs -B hack #Patch Set 7 : one more missing cast; rebased; new DEPS #Patch Set 8 : disable bogus stack_frame.cc test for now #
Messages
Total messages: 4 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||