https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
Uni-Bielefeld.DE> ---
> --- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
> Does the SPARC Solaris assembler support a syntax like
>
> .section ".go.buildid",#exclude
>
> ? That's what gas seems to support for compatibility.
It does indeed. I didn't think to look into gas docs because I couldn't
find anything in the Solaris SPARC assembler manual.
> Does that syntax work for x86?
Almost: you need
.section .go.buildid,#exclude
It's weird that they use the sparc synatx in this case instead of the
common "e" flag.
One caveat, though: #exclude wasn't present in the original Solaris 10
assemblers. However, both the current ones and the Solaris 11
assemblers do support it. While I'll handle this when adding
SHF_EXCLUDE support with Solaris as to gcc proper, I don't know if I
care enough about those ancient systems...