mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
committed by
Norman Feske
parent
13b1aab044
commit
016c3a8d9e
@@ -111,6 +111,27 @@ static void exception() { throw 666; }
|
|||||||
extern void __ldso_raise_exception();
|
extern void __ldso_raise_exception();
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************
|
||||||
|
** Helpers to test stack alignment **
|
||||||
|
*************************************/
|
||||||
|
|
||||||
|
static void test_stack_align(char const *fmt, ...) __attribute__((noinline));
|
||||||
|
static void test_stack_align(char const *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list list;
|
||||||
|
va_start(list, fmt);
|
||||||
|
|
||||||
|
vprintf(fmt, list);
|
||||||
|
|
||||||
|
va_end(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Test_stack_align_thread : Thread<0x2000>
|
||||||
|
{
|
||||||
|
Test_stack_align_thread() : Thread<0x2000>("test_stack_align") { }
|
||||||
|
void entry() { test_stack_align("%f\n%g\n", 3.142, 2.718); }
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function of LDSO test
|
* Main function of LDSO test
|
||||||
*/
|
*/
|
||||||
@@ -167,6 +188,14 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
lib_1_test();
|
lib_1_test();
|
||||||
|
|
||||||
|
printf("test stack alignment\n");
|
||||||
|
printf("--------------------\n");
|
||||||
|
test_stack_align("%f\n%g\n", 3.142, 2.718);
|
||||||
|
Test_stack_align_thread t;
|
||||||
|
t.start();
|
||||||
|
t.join();
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
/* test if return value is propagated correctly by dynamic linker */
|
/* test if return value is propagated correctly by dynamic linker */
|
||||||
return 123;
|
return 123;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,13 @@ compare_output_to {
|
|||||||
[init -> test-ldso] exception in lib: caught
|
[init -> test-ldso] exception in lib: caught
|
||||||
[init -> test-ldso] exception in another shared lib: caught
|
[init -> test-ldso] exception in another shared lib: caught
|
||||||
[init -> test-ldso]
|
[init -> test-ldso]
|
||||||
|
[init -> test-ldso] test stack alignment
|
||||||
|
[init -> test-ldso] --------------------
|
||||||
|
[init -> test-ldso] <warning: unsupported format string argument>
|
||||||
|
[init -> test-ldso] <warning: unsupported format string argument>
|
||||||
|
[init -> test-ldso] <warning: unsupported format string argument>
|
||||||
|
[init -> test-ldso] <warning: unsupported format string argument>
|
||||||
|
[init -> test-ldso]
|
||||||
[init -> test-ldso] ~Lib_2_local 55667785
|
[init -> test-ldso] ~Lib_2_local 55667785
|
||||||
[init -> test-ldso] ~Lib_1_local_2 1020303d
|
[init -> test-ldso] ~Lib_1_local_2 1020303d
|
||||||
[init -> test-ldso] ~Lib_1_local_1 5060707d
|
[init -> test-ldso] ~Lib_1_local_1 5060707d
|
||||||
|
|||||||
Reference in New Issue
Block a user