https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87864
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> --- > Is there another way to get a section in earlier versions of Solaris? What I initially did in LLVM's compiler-rt (which prompted the addition of __start_SEC/__stop_SEC support to ld) was to add two startup files to define the necessary labels and link the __start_SEC one early, the __stop_SEC one late: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/ See sancov_begin.S and sancov_end.S. As long as only a single section needs to be dealt with, that's a viable option. With too many sections needing similar treatment, this gets out of hand.