mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
base-linux: support hybrid mode in lx_rmap test
In hybrid mode, all programs are dynamic executables and ld.lib.so is not supported. Therefore, only the "static" variant of the test can be build and executed.
This commit is contained in:
parent
74425bd918
commit
f845be8c23
@ -6,11 +6,6 @@
|
||||
|
||||
assert_spec linux
|
||||
|
||||
if {[have_spec always_hybrid]} {
|
||||
puts "\nTest does not support always_hybrid mode."
|
||||
exit 0
|
||||
}
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
@ -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
|
||||
|
@ -21,7 +21,23 @@
|
||||
#include <rm_session/connection.h>
|
||||
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user