diff --git a/base-linux/run/lx_rmap.inc b/base-linux/run/lx_rmap.inc index 9d1eebc2c9..de1f29c61e 100644 --- a/base-linux/run/lx_rmap.inc +++ b/base-linux/run/lx_rmap.inc @@ -6,11 +6,6 @@ assert_spec linux -if {[have_spec always_hybrid]} { - puts "\nTest does not support always_hybrid mode." - exit 0 -} - # # Build # diff --git a/base-linux/src/test/lx_rmap/dynamic/target.mk b/base-linux/src/test/lx_rmap/dynamic/target.mk index 8ad37993ee..4c6aafcef3 100644 --- a/base-linux/src/test/lx_rmap/dynamic/target.mk +++ b/base-linux/src/test/lx_rmap/dynamic/target.mk @@ -1,3 +1,8 @@ +# dynamic variant is not supported in hybrid mode +ifeq ($(filter-out $(SPECS),always_hybrid),) +REQUIRES = plain_linux +endif + TARGET = test-lx_rmap_dynamic SRC_CC = main.cc LIBS = base libc diff --git a/base-linux/src/test/lx_rmap/main.cc b/base-linux/src/test/lx_rmap/main.cc index 55f2152187..e1f41ef055 100644 --- a/base-linux/src/test/lx_rmap/main.cc +++ b/base-linux/src/test/lx_rmap/main.cc @@ -21,7 +21,23 @@ #include -extern "C" void wait_for_continue(); + +static void blob() __attribute__((used)); +static void blob() +{ + asm volatile ( + ".balign 4096, -1\n" + "blob_beg:\n" + ".space 16*4096, -2\n" + "blob_end:\n" + ".global blob_beg\n" + ".global blob_end\n" + : : : ); +} + + +extern unsigned long blob_beg; +extern unsigned long blob_end; int main() @@ -37,12 +53,12 @@ int main() env()->heap()->free(addr, 0); } - addr_t beg((addr_t)&_prog_img_beg); - addr_t end(align_addr((addr_t)&_prog_img_end, 12)); + addr_t beg((addr_t)&blob_beg); + addr_t end(align_addr((addr_t)&blob_end, 12)); size_t size(end - beg); - PLOG("program-image region [%016lx,%016lx) size=%zx", beg, end, size); + PLOG("blob region region [%016lx,%016lx) size=%zx", beg, end, size); /* RAM dataspace attachment overlapping binary */ try {