Home | History | Annotate | Download | only in ld-gc
      1 SECTIONS
      2 {
      3     .text : { *(.text) }
      4 
      5     __foo0_start = .;
      6     .foo0 : { *(.foo0.*) }
      7     __foo0_end = .;
      8 
      9     __foo1_start = .;
     10     .foo1 : { KEEP(*(.foo1.*)) }
     11     __foo1_end = .;
     12 
     13     .foo2 : {
     14         __foo2_start = .;
     15         KEEP(*(.foo2.*))
     16         __foo2_end = .;
     17     }
     18     /DISCARD/ : { *(*) }
     19 }
     20 
     21 ASSERT (__foo1_start < __foo1_end, "foo1 not KEPT");
     22 ASSERT ((__foo1_end - __foo1_start) == (__foo2_end - __foo2_start),"foo2 not KEPT");
     23