[PATCH v2 1/2] ld: Add support for a new option, -exclude-symbols, in COFF object file directives

Jan Beulich jbeulich@suse.com
Mon Jul 25 09:51:23 GMT 2022


On 23.07.2022 00:02, Martin Storsjo wrote:
> This maps to the same as ld's --exclude-symbols command line option,
> but allowing specifying the option via directives embedded in the
> object files instead of passed manually on the command line.
> ---
> Fixed parsing multiple comma separated symbols. While pe_dll_add_excludes
> does tokenize the string, the symbol tokens in deffilep.y don't
> include commas, so we need to handle that at that level.

This patch is about object files only, so doesn't all of this belong in the
next patch?

> --- /dev/null
> +++ b/ld/testsuite/ld-pe/exclude-symbols-embedded.d
> @@ -0,0 +1,10 @@
> +#source: exclude-symbols-embedded.s
> +#target: i*86-*-cygwin* i*86-*-pe i*86-*-mingw*

What about x86-64 at the very least? That's the most common target nowadays,
i.e. also the one with the pest chances of catching regressions early. Also
while I realize that there are several uses of i*86-* there already, I think
that's a little too broad. Can I talk you into using i?86-* instead?

Jan


More information about the Binutils mailing list