/* This test is executed only if the execution engine supports CMSE instructions. */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */
typedef struct
{
/* This test is executed only if the execution engine supports CMSE instructions. */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */
typedef struct
{
/* This test is executed only if the execution engine supports CMSE instructions. */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */
typedef struct
{
/* This test is executed only if the execution engine supports CMSE instructions. */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */
#include <arm_cmse.h>
#include <stdlib.h>
set saved-lto_torture_options ${LTO_TORTURE_OPTIONS}
set LTO_TORTURE_OPTIONS ""
+# Return the start address of the .gnu.sgstubs section.
+proc cmse_sgstubs {} {
+ # Allow to override the location of .gnu.sgstubs section.
+ set tboard [target_info name]
+ if {[board_info $tboard exists cmse_sgstubs]} {
+ return [board_info $tboard cmse_sgstubs]
+ }
+
+ return "0x00400000"
+}
+
# These are for both baseline and mainline.
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] \
"" $DEFAULT_CFLAGS
/* This test is executed only if the execution engine supports CMSE instructions. */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */
typedef struct
{