https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91087
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> --- sorry about the typos. a) I meant to say that priorities would work in the case of single TU or LTO, because that does the same thing. b) the SysV spec says: "Termination functions specified by users via the atexit mechanism must be executed before any termination functions of shared objects.” (I can't find anything in the atexit doc for Posix that makes any such comment, hence the question about the ABI).