https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98121
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- The issue here is that what should happen when definitions marked with used attribute and unmarked definitions are put in the same section. It has nothing to do with .retain.