This is an entirely new embedded directive - extending the GNU ld
command line option --exclude-symbols to be usable in embedded
directives too.
(GNU ld.bfd doesn't support this option as an embedded directive yet,
but when given an object file with such a directive, GNU ld doesn't
error out - contrary to lld - but only warns about it. I'll send a
patch to binutils to add support for the same option there too; this
patch pretty much needs to be coordinated with whatever review feedback
it gets there too.)
This works as an inverse to the regular embedded dllexport directives,
for cases when autoexport of all eligible symbols is performed.
Naming wise, the plural form "exclude-symbols" feels a bit odd here
as it would probably only ever be used with one symbol at a time (I'm
only adding testcases for one symbol per option here), but I'd rather
have it named the same as the command line option, rather than vaguely
different.
It's not great that "excludes" is literally the opposite of "includes" when it is meant to be the opposite of exports, but of course we should use the name that ld.bfd went with.