summaryrefslogtreecommitdiffstats
path: root/chrome/nacl/nacl_helper_bootstrap_linux.x
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/nacl/nacl_helper_bootstrap_linux.x')
-rw-r--r--chrome/nacl/nacl_helper_bootstrap_linux.x16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/nacl/nacl_helper_bootstrap_linux.x b/chrome/nacl/nacl_helper_bootstrap_linux.x
index 5eae077..169bc0d 100644
--- a/chrome/nacl/nacl_helper_bootstrap_linux.x
+++ b/chrome/nacl/nacl_helper_bootstrap_linux.x
@@ -46,6 +46,7 @@ RESERVE_TOP = 1 << 30;
*/
PHDRS {
text PT_LOAD FILEHDR PHDRS;
+ data PT_LOAD;
reserve PT_LOAD FLAGS(0);
stack PT_GNU_STACK FLAGS(6); /* RW, no E */
}
@@ -66,6 +67,21 @@ SECTIONS {
etext = .;
/*
+ * Adjust the address for the data segment. We want to adjust up to
+ * the same address within the page on the next page up.
+ */
+ . = (ALIGN(CONSTANT(MAXPAGESIZE)) -
+ ((CONSTANT(MAXPAGESIZE) - .) & (CONSTANT(MAXPAGESIZE) - 1)));
+ . = DATA_SEGMENT_ALIGN(CONSTANT(MAXPAGESIZE), CONSTANT(COMMONPAGESIZE));
+
+ .data : {
+ *(.data*)
+ } :data
+ .bss : {
+ *(.bss*)
+ }
+
+ /*
* Now we move up to the next p_align increment, and place the dummy
* segment there. The linker emits this segment with the p_vaddr and
* p_memsz we want, which reserves the address space. But the linker