https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91227
--- Comment #12 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Florian Weimer from comment #11) > GCC on ELF provides defined address ordering for separate objects via linker > ordering and section attributes. I think part of these extensions is that > it is possible to check at run time whether an object falls into a specific > section, and where. Support for this must be preserved in some fashion. How about casting to uintptr_t before comparing? It isn't really formalized, but I think that's the extension gcc provides to safely do such comparisons.