[Bug target/98121] [11 Regression] __attribute__ ((used)) should not imply SHF_RETAIN_SECTION

jozefl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 4 15:01:07 GMT 2020


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

Jozef Lawrynowicz <jozefl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #11 from Jozef Lawrynowicz <jozefl at gcc dot gnu.org> ---
I'm going to resolve this as WONTFIX since we're not going to change the fact
that the "used" attribute applies SHF_GNU_RETAIN.

There are no section flag conflicts when a declaration that has the "used"
attribute applied interfaces with a section defined in assembler code. The
assembler will keep sections with different SHF_GNU_RETAIN states separate.

There was a GCC bug causing section flag conflicts in one specific situation,
that is tracked in PR target/98146.


More information about the Gcc-bugs mailing list