diff options
Diffstat (limited to 'gold/testsuite/script_test_11.c')
-rw-r--r-- | gold/testsuite/script_test_11.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/testsuite/script_test_11.c b/gold/testsuite/script_test_11.c new file mode 100644 index 0000000000..d932813c7b --- /dev/null +++ b/gold/testsuite/script_test_11.c @@ -0,0 +1,16 @@ +static unsigned int buffer1[256] __attribute((used)); +static unsigned int buffer2[256] __attribute((used)) = { 1 }; + +unsigned int foo __attribute__((section(".foo"))); +extern char __foo_start; +extern char __foo_end; + +int +main (void) +{ + if (&__foo_end - &__foo_start != sizeof(foo)) + return 1; + if (&__foo_start != (char *)&foo) + return 2; + return 0; +} |