Using the '.preinit' sections

The LLVM back-ends support emitting entries for the pre-initialisation array with names of the form ‘.preinit.#’ where ‘#’ is a ranking value between ‘0’ and ‘65535’.

However, I don’t know how to define a function in C or C++ so that this special section is used and the ranking specified. I assume that there is a ‘#pragma’ or an attribute for this, but I haven’t found it. Similarly the ‘.init’ sections.

How can I define these functions without using an explicit ‘attribute((section(“.preinit.333”)))’ or similar?

Thanks, MartinO