Keep tohost/fromhost at deterministic address
authorAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 25 May 2016 22:36:46 +0000 (15:36 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 25 May 2016 22:36:46 +0000 (15:36 -0700)
benchmarks/common/crt.S
benchmarks/common/syscalls.c
benchmarks/common/test.ld
env

index 634b864297e14effdd9575844dbbc27d6575bdd0..7c8fc19c7df581c5e59f279437f30235653e6caf 100644 (file)
@@ -223,3 +223,11 @@ _tdata_end:
 .section ".tbss.end"
 .globl _tbss_end
 _tbss_end:
 .section ".tbss.end"
 .globl _tbss_end
 _tbss_end:
+
+.section ".tohost","aw",@progbits
+.align 6
+.globl tohost
+tohost: .dword 0
+.align 6
+.globl fromhost
+fromhost: .dword 0
index 9c72e3681fd41261596ab9c105de47a5fdc76372..0a43878410bb804556850e6e16490c5c35061129 100644 (file)
@@ -14,8 +14,8 @@
 // initialized in crt.S
 int have_vec;
 
 // initialized in crt.S
 int have_vec;
 
-volatile uint64_t tohost __attribute__((aligned(64)));
-volatile uint64_t fromhost __attribute__((aligned(64)));
+extern volatile uint64_t tohost;
+extern volatile uint64_t fromhost;
 
 static long handle_frontend_syscall(long which, long arg0, long arg1, long arg2)
 {
 
 static long handle_frontend_syscall(long which, long arg0, long arg1, long arg2)
 {
index 7ee56b6e0976f6d135a28be313232e6fd18d79c8..dd32bb12fe168ca55536cb857c21799ccdb5658f 100644 (file)
@@ -22,11 +22,11 @@ SECTIONS
 
   /* text: test code section */
   . = 0x80000000;
 
   /* text: test code section */
   . = 0x80000000;
-  .text : 
-  {
-    crt.o(.text)
-    *(.text)
-  }
+  .text.init : { crt.o(.text) }
+
+  .tohost ALIGN(0x1000) : { *(.tohost) }
+
+  .text : { *(.text) }
 
   /* data segment */
   .data : { *(.data) }
 
   /* data segment */
   .data : { *(.data) }
diff --git a/env b/env
index e0010519c57a2b88d0d03d38c21ba0a68f81f2e2..e0d1ea452c2a40ca47ec720e7da8c31daa317307 160000 (submodule)
--- a/env
+++ b/env
@@ -1 +1 @@
-Subproject commit e0010519c57a2b88d0d03d38c21ba0a68f81f2e2
+Subproject commit e0d1ea452c2a40ca47ec720e7da8c31daa317307