aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/common/crt.S8
-rw-r--r--benchmarks/common/syscalls.c4
-rw-r--r--benchmarks/common/test.ld10
3 files changed, 15 insertions, 7 deletions
diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S
index 634b864..7c8fc19 100644
--- a/benchmarks/common/crt.S
+++ b/benchmarks/common/crt.S
@@ -223,3 +223,11 @@ _tdata_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
diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c
index 9c72e36..0a43878 100644
--- a/benchmarks/common/syscalls.c
+++ b/benchmarks/common/syscalls.c
@@ -14,8 +14,8 @@
// 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)
{
diff --git a/benchmarks/common/test.ld b/benchmarks/common/test.ld
index 7ee56b6..dd32bb1 100644
--- a/benchmarks/common/test.ld
+++ b/benchmarks/common/test.ld
@@ -22,11 +22,11 @@ SECTIONS
/* 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) }