From 98c8a7395b4e5e7bed233397148b15c1f8c66490 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 26 Nov 2013 03:10:31 +0100 Subject: Support AArch64 architecture Signed-off-by: Petr Machata --- tests/ChangeLog | 11 + tests/Makefile.am | 8 +- tests/funcretval_test.c | 828 ++++++++++++++++++++++++++++++++++++ tests/funcretval_test_aarch64.bz2 | Bin 0 -> 15644 bytes tests/hello_aarch64.ko.bz2 | Bin 0 -> 12768 bytes tests/run-allregs.sh | 74 +++- tests/run-funcretval.sh | 153 +++++++ tests/run-readelf-mixed-corenote.sh | 140 ++++++ tests/run-strip-reloc.sh | 6 +- tests/testfile_aarch64_core.bz2 | Bin 0 -> 61748 bytes 10 files changed, 1214 insertions(+), 6 deletions(-) create mode 100644 tests/funcretval_test.c create mode 100755 tests/funcretval_test_aarch64.bz2 create mode 100644 tests/hello_aarch64.ko.bz2 create mode 100755 tests/run-funcretval.sh create mode 100644 tests/testfile_aarch64_core.bz2 (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index 9a8ac613..ee480743 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,14 @@ +2013-11-25 Petr Machata + + * testfile_aarch64_core.bz2, hello_aarch64.ko.bz2: New files. + * funcretval_test.c, funcretval_test_aarch64.bz2: Likewise. + * Makefile.am (EXTRA_DIST): Add these. + (TESTS): Add run-funcretval.sh. + * run-allregs.sh: Use testfile_aarch64_core.bz2 for a regs_test. + * run-readelf-mixed-corenote.sh: ... and for a readelf -n test. + * run-strip-reloc.sh: Add a test on hello_aarch64.ko.bz2. + * run-funcretval.sh: New file. + 2013-11-18 Josh Stone * testfilebazdbg_plr.bz2: New testfile. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4f8e9e49..9615d6ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -89,7 +89,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-test-archive64.sh run-readelf-vmcoreinfo.sh \ run-readelf-mixed-corenote.sh run-dwfllines.sh \ run-dwfl-report-elf-align.sh run-addr2line-test.sh \ - run-addr2line-i-test.sh run-varlocs.sh + run-addr2line-i-test.sh run-varlocs.sh run-funcretval.sh if !STANDALONE check_PROGRAMS += msg_tst md5-sha1-test @@ -124,7 +124,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \ - hello_ppc64.ko.bz2 hello_s390.ko.bz2 \ + hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \ run-ranlib-test3.sh run-ranlib-test4.sh \ @@ -216,7 +216,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \ testfile_parameter_ref.c testfile_parameter_ref.bz2 \ testfile_entry_value.c testfile_entry_value.bz2 \ - testfile_implicit_value.c testfile_implicit_value.bz2 + testfile_implicit_value.c testfile_implicit_value.bz2 \ + testfile_aarch64_core.bz2 \ + funcretval_test.c funcretval_test_aarch64.bz2 if USE_VALGRIND valgrind_cmd='valgrind -q --trace-children=yes --error-exitcode=1 --run-libc-freeres=no' diff --git a/tests/funcretval_test.c b/tests/funcretval_test.c new file mode 100644 index 00000000..7e20f526 --- /dev/null +++ b/tests/funcretval_test.c @@ -0,0 +1,828 @@ +signed char fun_char (void) { return 5; } +short fun_short (void) { return 6; } +int fun_int (void) { return 7; } +void *fun_ptr (void) { return &fun_ptr; } +int fun_iptr (void) { return 8; } +long fun_long (void) { return 9; } +__int128 fun_int128 (void) { return 10; } + +typedef struct { int i[10]; } large_struct1_t; +large_struct1_t fun_large_struct1 (void) { + large_struct1_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } }; + return ret; +} + +typedef struct { int i1; int i2; int i3; int i4; int i5; + int i6; int i7; int i8; int i9; int i10; } large_struct2_t; +large_struct2_t fun_large_struct2 (void) { + large_struct2_t ret = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + return ret; +} + +float fun_float (void) { return 1.5; } +float _Complex fun_float_complex (void) { return 1.5 + 2.5i; } + +double fun_double (void) { return 2.5; } +double _Complex fun_double_complex (void) { return 2.5 + 3.5i; } + +long double fun_long_double (void) { return 3.5; } +long double _Complex fun_long_double_complex (void) { return 4.5 + 5.5i; } + +#ifdef FLOAT128 +__float128 fun_float128 (void) { return 3.5; } +#endif + +// 8 byte vectors. + +typedef signed char __attribute__ ((vector_size (8))) vec_char_8_t; +vec_char_8_t fun_vec_char_8 (void) { + vec_char_8_t ret = { 1, 2, 3, 4, 5, 6, 7, 8 }; + return ret; +} + +typedef short __attribute__ ((vector_size (8))) vec_short_8_t; +vec_short_8_t fun_vec_short_8 (void) { + vec_short_8_t ret = { 2, 3, 4, 5 }; + return ret; +} + +typedef int __attribute__ ((vector_size (8))) vec_int_8_t; +vec_int_8_t fun_vec_int_8 (void) { + vec_int_8_t ret = { 3, 4 }; + return ret; +} + +typedef long __attribute__ ((vector_size (8))) vec_long_8_t; +vec_long_8_t fun_vec_long_8 (void) { + vec_long_8_t ret = { 5 }; + return ret; +} + +typedef float __attribute__ ((vector_size (8))) vec_float_8_t; +vec_float_8_t fun_vec_float_8 (void) { + vec_float_8_t ret = { 1.5, 2.5 }; + return ret; +} + +typedef double __attribute__ ((vector_size (8))) vec_double_8_t; +#ifndef AARCH64_BUG_1032854 +// https://bugzilla.redhat.com/show_bug.cgi?id=1032854 +vec_double_8_t fun_vec_double_8 (void) { + vec_double_8_t ret = { 3.5 }; + return ret; +} +#endif + +// 16 byte vectors. + +typedef signed char __attribute__ ((vector_size (16))) vec_char_16_t; +vec_char_16_t fun_vec_char_16 (void) { + vec_char_16_t ret = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + return ret; +} + +typedef short __attribute__ ((vector_size (16))) vec_short_16_t; +vec_short_16_t fun_vec_short_16 (void) { + vec_short_16_t ret = { 2, 3, 4, 5, 6, 7, 8 }; + return ret; +} + +typedef int __attribute__ ((vector_size (16))) vec_int_16_t; +vec_int_16_t fun_vec_int_16 (void) { + vec_int_16_t ret = { 2, 3, 4 }; + return ret; +} + +typedef long __attribute__ ((vector_size (16))) vec_long_16_t; +vec_long_16_t fun_vec_long_16 (void) { + vec_long_16_t ret = { 3, 4 }; + return ret; +} + +typedef __int128 __attribute__ ((vector_size (16))) vec_int128_16_t; +vec_int128_16_t fun_vec_int128_16 (void) { + vec_int128_16_t ret = { 999 }; + return ret; +} + +typedef float __attribute__ ((vector_size (16))) vec_float_16_t; +vec_float_16_t fun_vec_float_16 (void) { + vec_float_16_t ret = { 1.5, 2.5, 3.5, 4.5 }; + return ret; +} + +typedef double __attribute__ ((vector_size (16))) vec_double_16_t; +vec_double_16_t fun_vec_double_16 (void) { + vec_double_16_t ret = { 2.5, 5 }; + return ret; +} + +#ifdef FLOAT128 +typedef __float128 __attribute__ ((vector_size (16))) vec_float128_16_t; +vec_float128_16_t fun_vec_float128_16 (void) { + vec_float128_16_t ret = { 7.5 }; + return ret; +} +#endif + +// Homogeneous floating-point aggregates. + +typedef struct { float f; } hfa1_float_t; +hfa1_float_t fun_hfa1_float (void) { + hfa1_float_t ret = { 1.5 }; + return ret; +} + +typedef struct { double f; } hfa1_double_t; +hfa1_double_t fun_hfa1_double (void) { + hfa1_double_t ret = { 3.0 }; + return ret; +} + +typedef struct { long double f; } hfa1_long_double_t; +hfa1_long_double_t fun_hfa1_long_double (void) { + hfa1_long_double_t ret = { 3.0 }; + return ret; +} + +typedef struct { float f[1]; } hfa1_float_a_t; +hfa1_float_a_t fun_hfa1_float_a (void) { + hfa1_float_a_t ret = { { 1.5 } }; + return ret; +} + +typedef struct { double f[1]; } hfa1_double_a_t; +hfa1_double_a_t fun_hfa1_double_a (void) { + hfa1_double_a_t ret = { { 3.0 } }; + return ret; +} + +typedef struct { long double f[1]; } hfa1_long_double_a_t; +hfa1_long_double_a_t fun_hfa1_long_double_a (void) { + hfa1_long_double_a_t ret = { { 3.0 } }; + return ret; +} + +typedef struct { float f; float g; } hfa2_float_t; +hfa2_float_t fun_hfa2_float (void) { + hfa2_float_t ret = { 1.5, 3.0 }; + return ret; +} + +typedef struct { double f; double g; } hfa2_double_t; +hfa2_double_t fun_hfa2_double (void) { + hfa2_double_t ret = { 3.0, 4.5 }; + return ret; +} + +typedef struct { long double f; long double g; } hfa2_long_double_t; +hfa2_long_double_t fun_hfa2_long_double (void) { + hfa2_long_double_t ret = { 3.0, 4.5 }; + return ret; +} + +typedef struct { float f[2]; } hfa2_float_a_t; +hfa2_float_a_t fun_hfa2_float_a (void) { + hfa2_float_a_t ret = { { 2.5, 3.5 } }; + return ret; +} + +typedef struct { double f[2]; } hfa2_double_a_t; +hfa2_double_a_t fun_hfa2_double_a (void) { + hfa2_double_a_t ret = { { 3.0, 3.5 } }; + return ret; +} + +typedef struct { long double f[2]; } hfa2_long_double_a_t; +hfa2_long_double_a_t fun_hfa2_long_double_a (void) { + hfa2_long_double_a_t ret = { { 3.0, 4.0 } }; + return ret; +} + +typedef struct { float f; float g; float h; } hfa3_float_t; +hfa3_float_t fun_hfa3_float (void) { + hfa3_float_t ret = { 1.5, 3.0, 4.5 }; + return ret; +} + +typedef struct { double f; double g; double h; } hfa3_double_t; +hfa3_double_t fun_hfa3_double (void) { + hfa3_double_t ret = { 3.0, 4.5, 9.5 }; + return ret; +} + +typedef struct { long double f; long double g; long double h; } hfa3_long_double_t; +hfa3_long_double_t fun_hfa3_long_double (void) { + hfa3_long_double_t ret = { 3.0, 4.5, 9.5 }; + return ret; +} + +typedef struct { float f[3]; } hfa3_float_a_t; +hfa3_float_a_t fun_hfa3_float_a (void) { + hfa3_float_a_t ret = { { 3.5, 4.5, 5.5 } }; + return ret; +} + +typedef struct { double f[3]; } hfa3_double_a_t; +hfa3_double_a_t fun_hfa3_double_a (void) { + hfa3_double_a_t ret = { { 3.0, 3.5, 4.0 } }; + return ret; +} + +typedef struct { long double f[3]; } hfa3_long_double_a_t; +hfa3_long_double_a_t fun_hfa3_long_double_a (void) { + hfa3_long_double_a_t ret = { { 3.0, 4.0, 5.0 } }; + return ret; +} + +typedef struct { float f; float g; float h; float i; } hfa4_float_t; +hfa4_float_t fun_hfa4_float (void) { + hfa4_float_t ret = { 1.5, 3.5, 4.5, 9.5 }; + return ret; +} + +typedef struct { double f; double g; double h; double i; } hfa4_double_t; +hfa4_double_t fun_hfa4_double (void) { + hfa4_double_t ret = { 3.5, 4.5, 9.5, 1.5 }; + return ret; +} + +typedef struct { long double f; long double g; long double h; long double i; } hfa4_long_double_t; +hfa4_long_double_t fun_hfa4_long_double (void) { + hfa4_long_double_t ret = { 3.5, 4.5, 9.5, 1.5 }; + return ret; +} + +typedef struct { float f[4]; } hfa4_float_a_t; +hfa4_float_a_t fun_hfa4_float_a (void) { + hfa4_float_a_t ret = { { 4.5, 5.5, 6.5, 7.5 } }; + return ret; +} + +typedef struct { double f[4]; } hfa4_double_a_t; +hfa4_double_a_t fun_hfa4_double_a (void) { + hfa4_double_a_t ret = { { 3.0, 4.5, 5.0, 5.5 } }; + return ret; +} + +typedef struct { long double f[4]; } hfa4_long_double_a_t; +hfa4_long_double_a_t fun_hfa4_long_double_a (void) { + hfa4_long_double_a_t ret = { { 3.0, 4.0, 5.0, 6.0 } }; + return ret; +} + +typedef struct { float f; float g; float h; float i; float j; } nfa5_float_t; +nfa5_float_t fun_nfa5_float (void) { + nfa5_float_t ret = { 1.5, 3.5, 4.5, 9.5, 10.5 }; + return ret; +} + +typedef struct { double f; double g; double h; double i; double j; } nfa5_double_t; +nfa5_double_t fun_nfa5_double (void) { + nfa5_double_t ret = { 3.5, 4.5, 9.5, 1.5, 2.5 }; + return ret; +} + +typedef struct { long double f; long double g; long double h; long double i; long double j; } nfa5_long_double_t; +nfa5_long_double_t fun_nfa5_long_double (void) { + nfa5_long_double_t ret = { 3.5, 4.5, 9.5, 1.5, 2.5 }; + return ret; +} + +typedef struct { float f[5]; } nfa5_float_a_t; +nfa5_float_a_t fun_nfa5_float_a (void) { + nfa5_float_a_t ret = { { 4.5, 5.5, 6.5, 7.5, 9.5 } }; + return ret; +} + +typedef struct { double f[5]; } nfa5_double_a_t; +nfa5_double_a_t fun_nfa5_double_a (void) { + nfa5_double_a_t ret = { { 3.0, 4.5, 5.0, 5.5, 6.5 } }; + return ret; +} + +typedef struct { long double f[5]; } nfa5_long_double_a_t; +nfa5_long_double_a_t fun_nfa5_long_double_a (void) { + nfa5_long_double_a_t ret = { { 3.0, 4.0, 5.0, 6.0, 7.0 } }; + return ret; +} + +#ifdef FLOAT128 +typedef struct { __float128 f; } hfa1_float128_t; +hfa1_float128_t fun_hfa1_float128 (void) { + hfa1_float128_t ret = { 4.5 }; + return ret; +} + +typedef struct { __float128 f; __float128 g; } hfa2_float128_t; +hfa2_float128_t fun_hfa2_float128 (void) { + hfa2_float128_t ret = { 4.5, 9.5 }; + return ret; +} + +typedef struct { __float128 f; __float128 g; __float128 h; } hfa3_float128_t; +hfa3_float128_t fun_hfa3_float128 (void) { + hfa3_float128_t ret = { 4.5, 9.5, 12.5 }; + return ret; +} + +typedef struct { __float128 f; __float128 g; __float128 h; __float128 i; } hfa4_float128_t; +hfa4_float128_t fun_hfa4_float128 (void) { + hfa4_float128_t ret = { 4.5, 9.5, 3.5, 1.5 }; + return ret; +} +#endif + +// Homogeneous vector aggregates of 1 element. + +typedef struct { vec_char_8_t a; } hva1_vec_char_8_t; +hva1_vec_char_8_t fun_hva1_vec_char_8 (void) { + hva1_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 } }; + return ret; +} + +typedef struct { vec_short_8_t a; } hva1_vec_short_8_t; +hva1_vec_short_8_t fun_hva1_vec_short_8 (void) { + hva1_vec_short_8_t ret = { { 2, 3, 4, 5 } }; + return ret; +} + +typedef struct { vec_int_8_t a; } hva1_vec_int_8_t; +hva1_vec_int_8_t fun_hva1_vec_int_8 (void) { + hva1_vec_int_8_t ret = { { 3, 4 } }; + return ret; +} + +typedef struct { vec_long_8_t a; } hva1_vec_long_8_t; +hva1_vec_long_8_t fun_hva1_vec_long_8 (void) { + hva1_vec_long_8_t ret = { { 5 } }; + return ret; +} + +typedef struct { vec_float_8_t a; } hva1_vec_float_8_t; +hva1_vec_float_8_t fun_hva1_vec_float_8 (void) { + hva1_vec_float_8_t ret = { { 1.5, 2.5 } }; + return ret; +} + +typedef struct { vec_double_8_t a; } hva1_vec_double_8_t; +hva1_vec_double_8_t fun_hva1_vec_double_8 (void) { + hva1_vec_double_8_t ret = { { 3.5 } }; + return ret; +} + +typedef struct { vec_char_16_t a; } hva1_vec_char_16_t; +hva1_vec_char_16_t fun_hva1_vec_char_16_t (void) { + hva1_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 } }; + return ret; +} + +typedef struct { vec_short_16_t a; } hva1_vec_short_16_t; +hva1_vec_short_16_t fun_hva1_vec_short_16_t (void) { + hva1_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 } }; + return ret; +} + +typedef struct { vec_int_16_t a; } hva1_vec_int_16_t; +hva1_vec_int_16_t fun_hva1_vec_int_16_t (void) { + hva1_vec_int_16_t ret = { { 3, 4, 5, 6 } }; + return ret; +} + +typedef struct { vec_long_16_t a; } hva1_vec_long_16_t; +hva1_vec_long_16_t fun_hva1_vec_long_16_t (void) { + hva1_vec_long_16_t ret = { { 4, 5 } }; + return ret; +} + +typedef struct { vec_int128_16_t a; } hva1_vec_int128_16_t; +hva1_vec_int128_16_t fun_hva1_vec_int128_16_t (void) { + hva1_vec_int128_16_t ret = { { 6 } }; + return ret; +} + +typedef struct { vec_float_16_t a; } hva1_vec_float_16_t; +hva1_vec_float_16_t fun_hva1_vec_float_16_t (void) { + hva1_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 } }; + return ret; +} + +typedef struct { vec_double_16_t a; } hva1_vec_double_16_t; +hva1_vec_double_16_t fun_hva1_vec_double_16_t (void) { + hva1_vec_double_16_t ret = { { 2.5, 3.5 } }; + return ret; +} + +#ifdef FLOAT128 +typedef struct { vec_float128_16_t a; } hva1_vec_float128_16_t; +hva1_vec_float128_16_t fun_hva1_vec_float128_16_t (void) { + hva1_vec_float128_16_t ret = { { 4.5 } }; + return ret; +} +#endif + +// Homogeneous vector aggregates of 2 elements. + +typedef struct { vec_char_8_t a; vec_char_8_t b; } hva2_vec_char_8_t; +hva2_vec_char_8_t fun_hva2_vec_char_8 (void) { + hva2_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 }, + { 2, 3, 4, 5, 6, 7, 8, 9 } }; + return ret; +} + +typedef struct { vec_short_8_t a; vec_short_8_t b; } hva2_vec_short_8_t; +hva2_vec_short_8_t fun_hva2_vec_short_8 (void) { + hva2_vec_short_8_t ret = { { 2, 3, 4, 5 }, + { 3, 4, 5, 6 } }; + return ret; +} + +typedef struct { vec_int_8_t a; vec_int_8_t b; } hva2_vec_int_8_t; +hva2_vec_int_8_t fun_hva2_vec_int_8 (void) { + hva2_vec_int_8_t ret = { { 3, 4 }, + { 4, 5 } }; + return ret; +} + +typedef struct { vec_long_8_t a; vec_long_8_t b; } hva2_vec_long_8_t; +hva2_vec_long_8_t fun_hva2_vec_long_8 (void) { + hva2_vec_long_8_t ret = { { 5 }, + { 6 } }; + return ret; +} + +typedef struct { vec_float_8_t a; vec_float_8_t b; } hva2_vec_float_8_t; +hva2_vec_float_8_t fun_hva2_vec_float_8 (void) { + hva2_vec_float_8_t ret = { { 1.5, 2.5 }, + { 2.5, 3.5 } }; + return ret; +} + +typedef struct { vec_double_8_t a; vec_double_8_t b; } hva2_vec_double_8_t; +hva2_vec_double_8_t fun_hva2_vec_double_8 (void) { + hva2_vec_double_8_t ret = { { 3.5 }, + { 4.5 } }; + return ret; +} + +typedef struct { vec_char_16_t a; vec_char_16_t b; } hva2_vec_char_16_t; +hva2_vec_char_16_t fun_hva2_vec_char_16_t (void) { + hva2_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 }, + { 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17 } }; + return ret; +} + +typedef struct { vec_short_16_t a; vec_short_16_t b; } hva2_vec_short_16_t; +hva2_vec_short_16_t fun_hva2_vec_short_16_t (void) { + hva2_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 }, + { 3, 4, 5, 6, 7, 8, 9, 10 } }; + return ret; +} + +typedef struct { vec_int_16_t a; vec_int_16_t b; } hva2_vec_int_16_t; +hva2_vec_int_16_t fun_hva2_vec_int_16_t (void) { + hva2_vec_int_16_t ret = { { 3, 4, 5, 6 }, + { 4, 5, 6, 7 } }; + return ret; +} + +typedef struct { vec_long_16_t a; vec_long_16_t b; } hva2_vec_long_16_t; +hva2_vec_long_16_t fun_hva2_vec_long_16_t (void) { + hva2_vec_long_16_t ret = { { 4, 5 }, + { 5, 6 } }; + return ret; +} + +typedef struct { vec_int128_16_t a; vec_int128_16_t b; } hva2_vec_int128_16_t; +hva2_vec_int128_16_t fun_hva2_vec_int128_16_t (void) { + hva2_vec_int128_16_t ret = { { 6 }, + { 7 } }; + return ret; +} + +typedef struct { vec_float_16_t a; vec_float_16_t b; } hva2_vec_float_16_t; +hva2_vec_float_16_t fun_hva2_vec_float_16_t (void) { + hva2_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 }, + { 2.5, 3.5, 4.5, 5.5 } }; + return ret; +} + +typedef struct { vec_double_16_t a; vec_double_16_t b; } hva2_vec_double_16_t; +hva2_vec_double_16_t fun_hva2_vec_double_16_t (void) { + hva2_vec_double_16_t ret = { { 2.5, 3.5 }, + { 3.5, 4.5 } }; + return ret; +} + +#ifdef FLOAT128 +typedef struct { vec_float128_16_t a; vec_float128_16_t b; } hva2_vec_float128_16_t; +hva2_vec_float128_16_t fun_hva2_vec_float128_16_t (void) { + hva2_vec_float128_16_t ret = { { 4.5 }, + { 5.5 } }; + return ret; +} +#endif + +// Homogeneous vector aggregates of 3 elements. + +typedef struct { vec_char_8_t a; vec_char_8_t b; vec_char_8_t c; } hva3_vec_char_8_t; +hva3_vec_char_8_t fun_hva3_vec_char_8 (void) { + hva3_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 }, + { 2, 3, 4, 5, 6, 7, 8, 9 }, + { 3, 4, 5, 6, 7, 8, 9, 10 } }; + return ret; +} + +typedef struct { vec_short_8_t a; vec_short_8_t b; vec_short_8_t c; } hva3_vec_short_8_t; +hva3_vec_short_8_t fun_hva3_vec_short_8 (void) { + hva3_vec_short_8_t ret = { { 2, 3, 4, 5 }, + { 3, 4, 5, 6 }, + { 4, 5, 6, 7 } }; + return ret; +} + +typedef struct { vec_int_8_t a; vec_int_8_t b; vec_int_8_t c; } hva3_vec_int_8_t; +hva3_vec_int_8_t fun_hva3_vec_int_8 (void) { + hva3_vec_int_8_t ret = { { 3, 4 }, + { 4, 5 }, + { 5, 6 } }; + return ret; +} + +typedef struct { vec_long_8_t a; vec_long_8_t b; vec_long_8_t c; } hva3_vec_long_8_t; +hva3_vec_long_8_t fun_hva3_vec_long_8 (void) { + hva3_vec_long_8_t ret = { { 5 }, + { 6 }, + { 7 } }; + return ret; +} + +typedef struct { vec_float_8_t a; vec_float_8_t b; vec_float_8_t c; } hva3_vec_float_8_t; +hva3_vec_float_8_t fun_hva3_vec_float_8 (void) { + hva3_vec_float_8_t ret = { { 1.5, 2.5 }, + { 2.5, 3.5 }, + { 3.5, 4.5 } }; + return ret; +} + +typedef struct { vec_double_8_t a; vec_double_8_t b; vec_double_8_t c; } hva3_vec_double_8_t; +hva3_vec_double_8_t fun_hva3_vec_double_8 (void) { + hva3_vec_double_8_t ret = { { 3.5 }, + { 4.5 }, + { 5.5 } }; + return ret; +} + +typedef struct { vec_char_16_t a; vec_char_16_t b; vec_char_16_t c; } hva3_vec_char_16_t; +hva3_vec_char_16_t fun_hva3_vec_char_16_t (void) { + hva3_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 }, + { 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17 }, + { 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18 } }; + return ret; +} + +typedef struct { vec_short_16_t a; vec_short_16_t b; vec_short_16_t c; } hva3_vec_short_16_t; +hva3_vec_short_16_t fun_hva3_vec_short_16_t (void) { + hva3_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 }, + { 3, 4, 5, 6, 7, 8, 9, 10 }, + { 4, 5, 6, 7, 8, 9, 10, 11 } }; + return ret; +} + +typedef struct { vec_int_16_t a; vec_int_16_t b; vec_int_16_t c; } hva3_vec_int_16_t; +hva3_vec_int_16_t fun_hva3_vec_int_16_t (void) { + hva3_vec_int_16_t ret = { { 3, 4, 5, 6 }, + { 4, 5, 6, 7 }, + { 5, 6, 7, 8 } }; + return ret; +} + +typedef struct { vec_long_16_t a; vec_long_16_t b; vec_long_16_t c; } hva3_vec_long_16_t; +hva3_vec_long_16_t fun_hva3_vec_long_16_t (void) { + hva3_vec_long_16_t ret = { { 3, 4 }, + { 4, 5 }, + { 5, 6 } }; + return ret; +} + +typedef struct { vec_int128_16_t a; vec_int128_16_t b; vec_int128_16_t c; } hva3_vec_int128_16_t; +hva3_vec_int128_16_t fun_hva3_vec_int128_16_t (void) { + hva3_vec_int128_16_t ret = { { 6 }, + { 7 }, + { 8 } }; + return ret; +} + +typedef struct { vec_float_16_t a; vec_float_16_t b; vec_float_16_t c; } hva3_vec_float_16_t; +hva3_vec_float_16_t fun_hva3_vec_float_16_t (void) { + hva3_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 }, + { 2.5, 3.5, 4.5, 5.5 }, + { 3.5, 4.5, 5.5, 6.5 } }; + return ret; +} + +typedef struct { vec_double_16_t a; vec_double_16_t b; vec_double_16_t c; } hva3_vec_double_16_t; +hva3_vec_double_16_t fun_hva3_vec_double_16_t (void) { + hva3_vec_double_16_t ret = { { 2.5, 3.5 }, + { 3.5, 4.5 }, + { 4.5, 5.5 } }; + return ret; +} + +#ifdef FLOAT128 +typedef struct { vec_float128_16_t a; vec_float128_16_t b; vec_float128_16_t c; } hva3_vec_float128_16_t; +hva3_vec_float128_16_t fun_hva3_vec_float128_16_t (void) { + hva3_vec_float128_16_t ret = { { 4.5 }, + { 5.5 }, + { 6.5 } }; + return ret; +} +#endif + +// Homogeneous vector aggregates of 3 elements. + +typedef struct { vec_char_8_t a; vec_char_8_t b; vec_char_8_t c; vec_char_8_t d; } hva4_vec_char_8_t; +hva4_vec_char_8_t fun_hva4_vec_char_8 (void) { + hva4_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 }, + { 2, 3, 4, 5, 6, 7, 8, 9 }, + { 3, 4, 5, 6, 7, 8, 9, 10 }, + { 4, 5, 6, 7, 8, 9, 10, 11 } }; + return ret; +} + +typedef struct { vec_short_8_t a; vec_short_8_t b; vec_short_8_t c; vec_short_8_t d; } hva4_vec_short_8_t; +hva4_vec_short_8_t fun_hva4_vec_short_8 (void) { + hva4_vec_short_8_t ret = { { 2, 3, 4, 5 }, + { 3, 4, 5, 6 }, + { 4, 5, 6, 7 }, + { 5, 6, 7, 8 } }; + return ret; +} + +typedef struct { vec_int_8_t a; vec_int_8_t b; vec_int_8_t c; vec_int_8_t d; } hva4_vec_int_8_t; +hva4_vec_int_8_t fun_hva4_vec_int_8 (void) { + hva4_vec_int_8_t ret = { { 3, 4 }, + { 4, 5 }, + { 5, 6 }, + { 6, 7 } }; + return ret; +} + +typedef struct { vec_long_8_t a; vec_long_8_t b; vec_long_8_t c; vec_long_8_t d; } hva4_vec_long_8_t; +hva4_vec_long_8_t fun_hva4_vec_long_8 (void) { + hva4_vec_long_8_t ret = { { 5 }, + { 6 }, + { 7 }, + { 8 } }; + return ret; +} + +typedef struct { vec_float_8_t a; vec_float_8_t b; vec_float_8_t c; vec_float_8_t d; } hva4_vec_float_8_t; +hva4_vec_float_8_t fun_hva4_vec_float_8 (void) { + hva4_vec_float_8_t ret = { { 1.5, 2.5 }, + { 2.5, 3.5 }, + { 3.5, 4.5 }, + { 4.5, 5.5 } }; + return ret; +} + +typedef struct { vec_double_8_t a; vec_double_8_t b; vec_double_8_t c; vec_double_8_t d; } hva4_vec_double_8_t; +hva4_vec_double_8_t fun_hva4_vec_double_8 (void) { + hva4_vec_double_8_t ret = { { 3.5 }, + { 4.5 }, + { 5.5 }, + { 6.5 } }; + return ret; +} + +typedef struct { vec_char_16_t a; vec_char_16_t b; vec_char_16_t c; vec_char_16_t d; } hva4_vec_char_16_t; +hva4_vec_char_16_t fun_hva4_vec_char_16_t (void) { + hva4_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 }, + { 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17 }, + { 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18 }, + { 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19 } }; + return ret; +} + +typedef struct { vec_short_16_t a; vec_short_16_t b; vec_short_16_t c; vec_short_16_t d; } hva4_vec_short_16_t; +hva4_vec_short_16_t fun_hva4_vec_short_16_t (void) { + hva4_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 }, + { 3, 4, 5, 6, 7, 8, 9, 10 }, + { 4, 5, 6, 7, 8, 9, 10, 11 }, + { 5, 6, 7, 8, 9, 10, 11, 12 } }; + return ret; +} + +typedef struct { vec_int_16_t a; vec_int_16_t b; vec_int_16_t c; vec_int_16_t d; } hva4_vec_int_16_t; +hva4_vec_int_16_t fun_hva4_vec_int_16_t (void) { + hva4_vec_int_16_t ret = { { 3, 4, 5, 6 }, + { 4, 5, 6, 7 }, + { 5, 6, 7, 8 }, + { 6, 7, 8, 9 } }; + return ret; +} + +typedef struct { vec_long_16_t a; vec_long_16_t b; vec_long_16_t c; vec_long_16_t d; } hva4_vec_long_16_t; +hva4_vec_long_16_t fun_hva4_vec_long_16_t (void) { + hva4_vec_long_16_t ret = { { 3, 4 }, + { 4, 5 }, + { 5, 6 }, + { 6, 7 } }; + return ret; +} + +typedef struct { vec_int128_16_t a; vec_int128_16_t b; vec_int128_16_t c; vec_int128_16_t d; } hva4_vec_int128_16_t; +hva4_vec_int128_16_t fun_hva4_vec_int128_16_t (void) { + hva4_vec_int128_16_t ret = { { 6 }, + { 7 }, + { 8 }, + { 9 } }; + return ret; +} + +typedef struct { vec_float_16_t a; vec_float_16_t b; vec_float_16_t c; vec_float_16_t d; } hva4_vec_float_16_t; +hva4_vec_float_16_t fun_hva4_vec_float_16_t (void) { + hva4_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 }, + { 2.5, 3.5, 4.5, 5.5 }, + { 3.5, 4.5, 5.5, 6.5 }, + { 4.5, 5.5, 6.5, 7.5 } }; + return ret; +} + +typedef struct { vec_double_16_t a; vec_double_16_t b; vec_double_16_t c; vec_double_16_t d; } hva4_vec_double_16_t; +hva4_vec_double_16_t fun_hva4_vec_double_16_t (void) { + hva4_vec_double_16_t ret = { { 2.5, 3.5 }, + { 3.5, 4.5 }, + { 4.5, 5.5 }, + { 5.5, 6.5 } }; + return ret; +} + +#ifdef FLOAT128 +typedef struct { vec_float128_16_t a; vec_float128_16_t b; vec_float128_16_t c; vec_float128_16_t d; } hva4_vec_float128_16_t; +hva4_vec_float128_16_t fun_hva4_vec_float128_16_t (void) { + hva4_vec_float128_16_t ret = { { 4.5 }, + { 5.5 }, + { 6.5 }, + { 7.5 } }; + return ret; +} +#endif + +// Mixed HFA. +typedef struct { float _Complex a; float b; } mixed_hfa3_cff_t; +mixed_hfa3_cff_t fun_mixed_hfa3_cff (void) { + mixed_hfa3_cff_t ret = { 1.5 + 2.5i, 3.5 }; + return ret; +} + +typedef struct { double _Complex a; double b; } mixed_hfa3_cdd_t; +mixed_hfa3_cdd_t fun_mixed_hfa3_cdd (void) { + mixed_hfa3_cdd_t ret = { 1.5 + 2.5i, 3.5 }; + return ret; +} + +typedef struct { long double _Complex a; long double b; } mixed_hfa3_cldld_t; +mixed_hfa3_cldld_t fun_mixed_hfa3_cldld (void) { + mixed_hfa3_cldld_t ret = { 1.5 + 2.5i, 3.5 }; + return ret; +} + +typedef struct { float b; float _Complex a; } mixed_hfa3_fcf_t; +mixed_hfa3_fcf_t fun_mixed_hfa3_fcf (void) { + mixed_hfa3_fcf_t ret = { 3.5, 1.5 + 2.5i }; + return ret; +} + +typedef struct { double b; double _Complex a; } mixed_hfa3_dcd_t; +mixed_hfa3_dcd_t fun_mixed_hfa3_dcd (void) { + mixed_hfa3_dcd_t ret = { 3.5, 1.5 + 2.5i }; + return ret; +} + +typedef struct { long double b; long double _Complex a; } mixed_hfa3_ldcld_t; +mixed_hfa3_ldcld_t fun_mixed_hfa3_ldcld (void) { + mixed_hfa3_ldcld_t ret = { 3.5, 1.5 + 2.5i }; + return ret; +} + +typedef struct { vec_float_8_t a; vec_short_8_t b; } mixed_hfa2_fltsht_t; +mixed_hfa2_fltsht_t fun_mixed_hfa2_fltsht_t (void) { + mixed_hfa2_fltsht_t ret = { { 3.5, 4.5 }, { 1, 2, 3, 4 } }; + return ret; +} + +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/tests/funcretval_test_aarch64.bz2 b/tests/funcretval_test_aarch64.bz2 new file mode 100755 index 00000000..5494e102 Binary files /dev/null and b/tests/funcretval_test_aarch64.bz2 differ diff --git a/tests/hello_aarch64.ko.bz2 b/tests/hello_aarch64.ko.bz2 new file mode 100644 index 00000000..431d89f9 Binary files /dev/null and b/tests/hello_aarch64.ko.bz2 differ diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh index 885a1d13..6f3862ec 100755 --- a/tests/run-allregs.sh +++ b/tests/run-allregs.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2006, 2007, 2012 Red Hat, Inc. +# Copyright (C) 2005, 2006, 2007, 2012, 2013 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -2724,4 +2724,76 @@ VFP registers: 287: d31 (d31), float 64 bits EOF +# See run-readelf-mixed-corenote.sh for instructions to regenerate +# this core file. +regs_test testfile_aarch64_core <<\EOF +integer registers: + 0: x0 (x0), signed 64 bits + 1: x1 (x1), signed 64 bits + 2: x2 (x2), signed 64 bits + 3: x3 (x3), signed 64 bits + 4: x4 (x4), signed 64 bits + 5: x5 (x5), signed 64 bits + 6: x6 (x6), signed 64 bits + 7: x7 (x7), signed 64 bits + 8: x8 (x8), signed 64 bits + 9: x9 (x9), signed 64 bits + 10: x10 (x10), signed 64 bits + 11: x11 (x11), signed 64 bits + 12: x12 (x12), signed 64 bits + 13: x13 (x13), signed 64 bits + 14: x14 (x14), signed 64 bits + 15: x15 (x15), signed 64 bits + 16: x16 (x16), signed 64 bits + 17: x17 (x17), signed 64 bits + 18: x18 (x18), signed 64 bits + 19: x19 (x19), signed 64 bits + 20: x20 (x20), signed 64 bits + 21: x21 (x21), signed 64 bits + 22: x22 (x22), signed 64 bits + 23: x23 (x23), signed 64 bits + 24: x24 (x24), signed 64 bits + 25: x25 (x25), signed 64 bits + 26: x26 (x26), signed 64 bits + 27: x27 (x27), signed 64 bits + 28: x28 (x28), signed 64 bits + 29: x29 (x29), signed 64 bits + 30: x30 (x30), signed 64 bits + 31: sp (sp), address 64 bits + 33: elr (elr), address 64 bits +FP/SIMD registers: + 64: v0 (v0), unsigned 128 bits + 65: v1 (v1), unsigned 128 bits + 66: v2 (v2), unsigned 128 bits + 67: v3 (v3), unsigned 128 bits + 68: v4 (v4), unsigned 128 bits + 69: v5 (v5), unsigned 128 bits + 70: v6 (v6), unsigned 128 bits + 71: v7 (v7), unsigned 128 bits + 72: v8 (v8), unsigned 128 bits + 73: v9 (v9), unsigned 128 bits + 74: v10 (v10), unsigned 128 bits + 75: v11 (v11), unsigned 128 bits + 76: v12 (v12), unsigned 128 bits + 77: v13 (v13), unsigned 128 bits + 78: v14 (v14), unsigned 128 bits + 79: v15 (v15), unsigned 128 bits + 80: v16 (v16), unsigned 128 bits + 81: v17 (v17), unsigned 128 bits + 82: v18 (v18), unsigned 128 bits + 83: v19 (v19), unsigned 128 bits + 84: v20 (v20), unsigned 128 bits + 85: v21 (v21), unsigned 128 bits + 86: v22 (v22), unsigned 128 bits + 87: v23 (v23), unsigned 128 bits + 88: v24 (v24), unsigned 128 bits + 89: v25 (v25), unsigned 128 bits + 90: v26 (v26), unsigned 128 bits + 91: v27 (v27), unsigned 128 bits + 92: v28 (v28), unsigned 128 bits + 93: v29 (v29), unsigned 128 bits + 94: v30 (v30), unsigned 128 bits + 95: v31 (v31), unsigned 128 bits +EOF + exit 0 diff --git a/tests/run-funcretval.sh b/tests/run-funcretval.sh new file mode 100755 index 00000000..779bd473 --- /dev/null +++ b/tests/run-funcretval.sh @@ -0,0 +1,153 @@ +#! /bin/sh +# Copyright (C) 2013 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# The following files were obtaining by compiling funcretval_test.c +# from this directory as follows: +# +# gcc -g funcretval_test.c -o funcretval_test_ +# +# Pass -DFLOAT128 if the given arch supports __float128. + +testfiles funcretval_test_aarch64 + +# funcretval_test_aarch64 was built with additional flag: +# -DAARCH64_BUG_1032854 +# hence no fun_vec_double_8. +testrun_compare ${abs_top_builddir}/tests/funcretval \ + -e funcretval_test_aarch64 <<\EOF +() fun_char: return value location: {0x50, 0} +() fun_short: return value location: {0x50, 0} +() fun_int: return value location: {0x50, 0} +() fun_ptr: return value location: {0x50, 0} +() fun_iptr: return value location: {0x50, 0} +() fun_long: return value location: {0x50, 0} +() fun_int128: return value location: {0x50, 0} {0x93, 0x8} {0x51, 0} {0x93, 0x8} +() fun_large_struct1: return value location: {0x70, 0} +() fun_large_struct2: return value location: {0x70, 0} +() fun_float: return value location: {0x90, 0x40} +() fun_float_complex: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} +() fun_double: return value location: {0x90, 0x40} +() fun_double_complex: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_long_double: return value location: {0x90, 0x40} +() fun_long_double_complex: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_vec_char_8: return value location: {0x90, 0x40} +() fun_vec_short_8: return value location: {0x90, 0x40} +() fun_vec_int_8: return value location: {0x90, 0x40} +() fun_vec_long_8: return value location: {0x90, 0x40} +() fun_vec_float_8: return value location: {0x90, 0x40} +() fun_vec_char_16: return value location: {0x90, 0x40} +() fun_vec_short_16: return value location: {0x90, 0x40} +() fun_vec_int_16: return value location: {0x90, 0x40} +() fun_vec_long_16: return value location: {0x90, 0x40} +() fun_vec_int128_16: return value location: {0x90, 0x40} +() fun_vec_float_16: return value location: {0x90, 0x40} +() fun_vec_double_16: return value location: {0x90, 0x40} +() fun_hfa1_float: return value location: {0x90, 0x40} +() fun_hfa1_double: return value location: {0x90, 0x40} +() fun_hfa1_long_double: return value location: {0x90, 0x40} +() fun_hfa1_float_a: return value location: {0x90, 0x40} +() fun_hfa1_double_a: return value location: {0x90, 0x40} +() fun_hfa1_long_double_a: return value location: {0x90, 0x40} +() fun_hfa2_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} +() fun_hfa2_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hfa2_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hfa2_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} +() fun_hfa2_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hfa2_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hfa3_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} +() fun_hfa3_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hfa3_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hfa3_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} +() fun_hfa3_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hfa3_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hfa4_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4} +() fun_hfa4_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hfa4_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hfa4_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4} +() fun_hfa4_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hfa4_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_nfa5_float: return value location: {0x70, 0} +() fun_nfa5_double: return value location: {0x70, 0} +() fun_nfa5_long_double: return value location: {0x70, 0} +() fun_nfa5_float_a: return value location: {0x70, 0} +() fun_nfa5_double_a: return value location: {0x70, 0} +() fun_nfa5_long_double_a: return value location: {0x70, 0} +() fun_hva1_vec_char_8: return value location: {0x90, 0x40} +() fun_hva1_vec_short_8: return value location: {0x90, 0x40} +() fun_hva1_vec_int_8: return value location: {0x90, 0x40} +() fun_hva1_vec_long_8: return value location: {0x90, 0x40} +() fun_hva1_vec_float_8: return value location: {0x90, 0x40} +() fun_hva1_vec_double_8: return value location: {0x90, 0x40} +() fun_hva1_vec_char_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_short_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_int_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_long_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_int128_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_float_16_t: return value location: {0x90, 0x40} +() fun_hva1_vec_double_16_t: return value location: {0x90, 0x40} +() fun_hva2_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() fun_hva2_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva2_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} +() fun_hva3_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_hva3_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva3_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_hva4_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8} +() fun_hva4_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_hva4_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10} +() fun_mixed_hfa3_cff: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} +() fun_mixed_hfa3_cdd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_mixed_hfa3_cldld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_mixed_hfa3_fcf: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} +() fun_mixed_hfa3_dcd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} +() fun_mixed_hfa3_ldcld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} +() fun_mixed_hfa2_fltsht_t: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} +() main: return value location: {0x50, 0} +EOF + +exit 0 diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh index 9a438095..c176e283 100755 --- a/tests/run-readelf-mixed-corenote.sh +++ b/tests/run-readelf-mixed-corenote.sh @@ -285,4 +285,144 @@ Note segment of 1476 bytes at offset 0x430: 3e001ba000-3e001bc000 001ba000 8192 /usr/lib64/libc-2.17.so EOF +# To reproduce this core dump, do this on an aarch64 machine: +# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }') +# $ ./a.out +testfiles testfile_aarch64_core +testrun_compare ${abs_top_builddir}/src/readelf -n testfile_aarch64_core <<\EOF + +Note segment of 2512 bytes at offset 0x270: + Owner Data size Type + CORE 392 PRSTATUS + info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11 + sigpend: <> + sighold: <> + pid: 16547, ppid: 3822, pgrp: 16547, sid: 3822 + utime: 0.010000, stime: 0.000000, cutime: 0.000000, cstime: 0.000000 + pc: 0x0000000000400548, pstate: 0x0000000060000000, fpvalid: 1 + x0: 305419896 x1: 548685596648 + x2: 548685596664 x3: 4195648 + x4: 0 x5: 548536191688 + x6: 0 x7: -6341196323062964528 + x8: 135 x9: 4294967295 + x10: 4195026 x11: 184256 + x12: 144 x13: 15 + x14: 548536635328 x15: 0 + x16: 548534815304 x17: 4262024 + x18: 548685596000 x19: 0 + x20: 0 x21: 4195296 + x22: 0 x23: 0 + x24: 0 x25: 0 + x26: 0 x27: 0 + x28: 0 x29: 548685596320 + x30: 548534815544 sp: 0x0000007fc035c6a0 + CORE 136 PRPSINFO + state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000400400 + uid: 0, gid: 0, pid: 16547, ppid: 3822, pgrp: 16547, sid: 3822 + fname: a.out, psargs: ./a.out + CORE 128 SIGINFO + si_signo: 11, si_errno: 0, si_code: 1 + fault address: 0x12345678 + CORE 304 AUXV + SYSINFO_EHDR: 0x7fb7500000 + HWCAP: 0x3 + PAGESZ: 65536 + CLKTCK: 100 + PHDR: 0x400040 + PHENT: 56 + PHNUM: 7 + BASE: 0x7fb7520000 + FLAGS: 0 + ENTRY: 0x4003e0 + UID: 0 + EUID: 0 + GID: 0 + EGID: 0 + SECURE: 0 + RANDOM: 0x7fc035c9e8 + EXECFN: 0x7fc035fff0 + PLATFORM: 0x7fc035c9f8 + NULL + CORE 306 FILE + 6 files: + 00400000-00410000 00000000 65536 /root/elfutils/build/a.out + 00410000-00420000 00000000 65536 /root/elfutils/build/a.out + 7fb7370000-7fb74d0000 00000000 1441792 /usr/lib64/libc-2.17.so + 7fb74d0000-7fb74f0000 00150000 131072 /usr/lib64/libc-2.17.so + 7fb7520000-7fb7540000 00000000 131072 /usr/lib64/ld-2.17.so + 7fb7540000-7fb7550000 00010000 65536 /usr/lib64/ld-2.17.so + CORE 528 FPREGSET + fpsr: 0x00000000, fpcr: 0x00000000 + v0: 0x00000000000af54b000000000000fe02 + v1: 0x00000000000000000000000000000000 + v2: 0x00000000000000000000000000000000 + v3: 0x00000000000000000000000000000000 + v4: 0x00000000000000000000000000000000 + v5: 0x00000000000000000000000000000000 + v6: 0x00000000000000000000000000000000 + v7: 0x00000000000000000000000000000000 + v8: 0x00000000000000000000000000000000 + v9: 0x00000000000000000000000000000000 + v10: 0x00000000000000000000000000000000 + v11: 0x00000000000000000000000000000000 + v12: 0x00000000000000000000000000000000 + v13: 0x00000000000000000000000000000000 + v14: 0x00000000000000000000000000000000 + v15: 0x00000000000000000000000000000000 + v16: 0x00000000000000000000000000000000 + v17: 0x00000000000000000000000000000000 + v18: 0x00000000000000000000000000000000 + v19: 0x00000000000000000000000000000000 + v20: 0x00000000000000000000000000000000 + v21: 0x00000000000000000000000000000000 + v22: 0x00000000000000000000000000000000 + v23: 0x00000000000000000000000000000000 + v24: 0x00000000000000000000000000000000 + v25: 0x00000000000000000000000000000000 + v26: 0x00000000000000000000000000000000 + v27: 0x00000000000000000000000000000000 + v28: 0x00000000000000000000000000000000 + v29: 0x00000000000000000000000000000000 + v30: 0x00000000000000000000000000000000 + v31: 0x00000000000000000000000000000000 + LINUX 8 ARM_TLS + tls: 0x0000007fb73606f0 + LINUX 264 ARM_HW_BREAK + dbg_info: 0x00000610 + DBGBVR0_EL1: 0x0000000000000000, DBGBCR0_EL1: 0x00000000 + DBGBVR1_EL1: 0x0000000000000000, DBGBCR1_EL1: 0x00000000 + DBGBVR2_EL1: 0x0000000000000000, DBGBCR2_EL1: 0x00000000 + DBGBVR3_EL1: 0x0000000000000000, DBGBCR3_EL1: 0x00000000 + DBGBVR4_EL1: 0x0000000000000000, DBGBCR4_EL1: 0x00000000 + DBGBVR5_EL1: 0x0000000000000000, DBGBCR5_EL1: 0x00000000 + DBGBVR6_EL1: 0x0000000000000000, DBGBCR6_EL1: 0x00000000 + DBGBVR7_EL1: 0x0000000000000000, DBGBCR7_EL1: 0x00000000 + DBGBVR8_EL1: 0x0000000000000000, DBGBCR8_EL1: 0x00000000 + DBGBVR9_EL1: 0x0000000000000000, DBGBCR9_EL1: 0x00000000 + DBGBVR10_EL1: 0x0000000000000000, DBGBCR10_EL1: 0x00000000 + DBGBVR11_EL1: 0x0000000000000000, DBGBCR11_EL1: 0x00000000 + DBGBVR12_EL1: 0x0000000000000000, DBGBCR12_EL1: 0x00000000 + DBGBVR13_EL1: 0x0000000000000000, DBGBCR13_EL1: 0x00000000 + DBGBVR14_EL1: 0x0000000000000000, DBGBCR14_EL1: 0x00000000 + DBGBVR15_EL1: 0x0000000000000000, DBGBCR15_EL1: 0x00000000 + LINUX 264 ARM_HW_WATCH + dbg_info: 0x00000610 + DBGWVR0_EL1: 0x0000000000000000, DBGWCR0_EL1: 0x00000000 + DBGWVR1_EL1: 0x0000000000000000, DBGWCR1_EL1: 0x00000000 + DBGWVR2_EL1: 0x0000000000000000, DBGWCR2_EL1: 0x00000000 + DBGWVR3_EL1: 0x0000000000000000, DBGWCR3_EL1: 0x00000000 + DBGWVR4_EL1: 0x0000000000000000, DBGWCR4_EL1: 0x00000000 + DBGWVR5_EL1: 0x0000000000000000, DBGWCR5_EL1: 0x00000000 + DBGWVR6_EL1: 0x0000000000000000, DBGWCR6_EL1: 0x00000000 + DBGWVR7_EL1: 0x0000000000000000, DBGWCR7_EL1: 0x00000000 + DBGWVR8_EL1: 0x0000000000000000, DBGWCR8_EL1: 0x00000000 + DBGWVR9_EL1: 0x0000000000000000, DBGWCR9_EL1: 0x00000000 + DBGWVR10_EL1: 0x0000000000000000, DBGWCR10_EL1: 0x00000000 + DBGWVR11_EL1: 0x0000000000000000, DBGWCR11_EL1: 0x00000000 + DBGWVR12_EL1: 0x0000000000000000, DBGWCR12_EL1: 0x00000000 + DBGWVR13_EL1: 0x0000000000000000, DBGWCR13_EL1: 0x00000000 + DBGWVR14_EL1: 0x0000000000000000, DBGWCR14_EL1: 0x00000000 + DBGWVR15_EL1: 0x0000000000000000, DBGWCR15_EL1: 0x00000000 +EOF + exit 0 diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh index 221eefbf..a3245fd8 100755 --- a/tests/run-strip-reloc.sh +++ b/tests/run-strip-reloc.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011 Red Hat, Inc. +# Copyright (C) 2011, 2013 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -17,7 +17,8 @@ . $srcdir/test-subr.sh -testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko +testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \ + hello_aarch64.ko tempfiles readelf.out readelf.out1 readelf.out2 tempfiles out.stripped1 out.debug1 out.stripped2 out.debug2 @@ -100,6 +101,7 @@ runtest hello_i386.ko 1 runtest hello_x86_64.ko 1 runtest hello_ppc64.ko 1 runtest hello_s390.ko 1 +runtest hello_aarch64.ko 1 # self test, shouldn't impact non-ET_REL files at all. runtest ${abs_top_builddir}/src/strip 0 diff --git a/tests/testfile_aarch64_core.bz2 b/tests/testfile_aarch64_core.bz2 new file mode 100644 index 00000000..9d562688 Binary files /dev/null and b/tests/testfile_aarch64_core.bz2 differ -- cgit v1.2.1