https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490

--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 45830
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45830
proposed patch

Please update the get_block_for_section function comment accordingly:

/* Return the object_block structure for section SECT.  Create a new
   structure if we haven't created one already.  Return null if SECT
   itself is null.  */

This should say that we return NULL also for mergeable sections and why
- that section anchors can't be used in mergeable sections anyway, because the
linker might move objects around, and that using the object blocks
infrastructure in that case is both a waste and maintenance burden.

Given:
  /* Don't use anchors for small data sections.  The small data register
     acts as an anchor for such sections.  */
  if (sect->common.flags & SECTION_SMALL)
    return false;
we could do the same for SECTION_SMALL, but I'm not suggesting that ATM.

Reply via email to