diff options
Diffstat (limited to 'ld/testsuite/ld-gc/pr14265.t')
-rw-r--r-- | ld/testsuite/ld-gc/pr14265.t | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-gc/pr14265.t b/ld/testsuite/ld-gc/pr14265.t new file mode 100644 index 0000000..12a2d67 --- /dev/null +++ b/ld/testsuite/ld-gc/pr14265.t @@ -0,0 +1,22 @@ +SECTIONS +{ + .text : { *(.text) } + + __foo0_start = .; + .foo0 : { *(.foo0.*) } + __foo0_end = .; + + __foo1_start = .; + .foo1 : { KEEP(*(.foo1.*)) } + __foo1_end = .; + + .foo2 : { + __foo2_start = .; + KEEP(*(.foo2.*)) + __foo2_end = .; + } + /DISCARD/ : { *(*) } +} + +ASSERT (__foo1_start < __foo1_end, "foo1 not KEPT"); +ASSERT ((__foo1_end - __foo1_start) == (__foo2_end - __foo2_start),"foo2 not KEPT"); |