DescriptionFixes some bugs with memory setup and halt-sled allocation and
initialization.
Tests in assembly language are written to be text-only -- no rodata
nor data segments are present in one set of tests -- with varying
sizes of padding so that the text segment ends exactly at a multiple
of 65536, just 32 bytes shy of it (the halt sled size), many bytes shy
of a multiple, and 28 bytes shy of 65536 (too small gap). The text
prints out the break address and the end-of-text address to check the
rounding that's done by the sel_ldr.
In addition to the 4 text-only tests, this CL also builds a set with
rodata -- containing a string -- at its "natural" position, and
another set with rodata at 0x100000, leaving space for dynamic code.
These additional eight tests have _ro and _ro_dyn in their names.
In order to get exact memory layout, the tests are built by directly
invoking the loader, rather than indirectly through nacl-g++. For the
x86-* architectures, we are using nacl-ld; for the arm, we are using
code sourcery's ld and patching the generated exectuable with the
elf_patcher.py script to modify the Elf headers to be nexes as opposed
to standard executables.
Because there appears to be a linker bug on the ARM, the _ro_dyn tests
are not built -- the text is moved to an address other than 0x20000,
despite command-line flags to the contrary. One ARM test
(too_small_ro) triggers a LOG_FATAL because the ARM linker will not
automatically move the .rodata section to ensure that there is enough
room for the halt sled. If we could use linker scripts so that full
control is feasible but defaulting to automatically always reserving
gap space, that would be ideal behavior....
The next set of CLs will add tests where data segments *are* present
as well, and where no rodata is present but rw data is present -- more
test case combinatorics. And the address space setup code needs to be
cleaned up still.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=506 http://code.google.com/p/nativeclient/issues/detail?id=877
TEST= run_nacl_text_no_pad_test run_nacl_text_small_pad_test run_nacl_text_large_pad_test run_nacl_text_too_small_pad_test run_nacl_text_no_pad_ro_test run_nacl_text_small_pad_ro_test run_nacl_text_large_pad_ro_test run_nacl_text_too_small_pad_ro_test run_nacl_text_no_pad_ro_dyn_test run_nacl_text_small_pad_ro_dyn_test run_nacl_text_large_pad_ro_dyn_test run_nacl_text_too_small_pad_ro_dyn_test
Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=3635
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #Patch Set 6 : '' #Patch Set 7 : '' #Patch Set 8 : '' #Patch Set 9 : '' #Patch Set 10 : '' #
Total comments: 25
Patch Set 11 : '' #Patch Set 12 : '' #Patch Set 13 : '' #
Messages
Total messages: 8 (0 generated)
|