diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-05-25 15:36:11 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-05-25 15:36:11 -0700 |
commit | e0d1ea452c2a40ca47ec720e7da8c31daa317307 (patch) | |
tree | c800585214488e718e7c27ef8607218225568265 /p | |
parent | e0010519c57a2b88d0d03d38c21ba0a68f81f2e2 (diff) | |
download | env-e0d1ea452c2a40ca47ec720e7da8c31daa317307.zip env-e0d1ea452c2a40ca47ec720e7da8c31daa317307.tar.gz env-e0d1ea452c2a40ca47ec720e7da8c31daa317307.tar.bz2 |
Keep tohost/fromhost at deterministic address
Diffstat (limited to 'p')
-rw-r--r-- | p/link.ld | 1 | ||||
-rw-r--r-- | p/riscv_test.h | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -4,6 +4,7 @@ SECTIONS { . = 0x80000000; .text.init : { *(.text.init) } + .tohost ALIGN(0x1000) : { *(.tohost) } .text : { *(.text) } .data ALIGN(0x1000) : { *(.data) } .bss : { *(.bss) } diff --git a/p/riscv_test.h b/p/riscv_test.h index d3e8027..d15b4fe 100644 --- a/p/riscv_test.h +++ b/p/riscv_test.h @@ -83,7 +83,7 @@ #define INTERRUPT_HANDLER j other_exception /* No interrupts should occur */ #define RVTEST_CODE_BEGIN \ - .text; \ + .section .text.init; \ .align 6; \ .weak stvec_handler; \ .weak mtvec_handler; \ @@ -177,8 +177,10 @@ reset_vector: \ #define RVTEST_DATA_BEGIN \ EXTRA_DATA \ + .pushsection .tohost,"aw",@progbits; \ .align 6; .global tohost; tohost: .dword 0; \ .align 6; .global fromhost; fromhost: .dword 0; \ + .popsection; \ .align 4; .global begin_signature; begin_signature: #define RVTEST_DATA_END .align 4; .global end_signature; end_signature: |