https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If that works, I'm all for it.
CCing Richard Sandiford as the original author of -fsection-anchors if he
remembers why this hasn't been done for SECTION_MERGE sections from the
beginning.
default_use_anchors_for_symbol_p starts with
/* Don't use anchors for mergeable sections. The linker might move
the objects around. */
sect = SYMBOL_REF_BLOCK (symbol)->sect;
if (sect->common.flags & SECTION_MERGE)
return false;
and seems all other targetm.use_anchors_for_symbol_p hooks just return false in
a few extra cases than default_use_anchors_for_symbol_p, never return true when
it doesn't.
So indeed, I don't see advantages in using SYMBOL_REF_BLOCK for SECTION_MERGE
section symbols.