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

Jan Beulich jbeulich@suse.com
Wed Jul 20 07:49:11 GMT 2022


On 19.07.2022 22:33, Martin Storsjo wrote:
> @@ -946,6 +957,7 @@ diropts[] =
>    { "-attr", SECTIONS },
>    { "-export", EXPORTS },
>    { "-aligncomm", ALIGNCOMM },
> +  { "-exclude-symbols", EXCLUDE_SYMBOLS },

I was a little concerned by the - in the middle, but the (custom)
def-file lexer looks to be treating - the same as ISALPHA() chars.
Nevertheless it would be quite helpful if there were two testcases
here - one with the new directive used in an object file's .drectve
section and another with it used in a .def file.

The other thing is: According to def_exclude_symbols() each
directive is followed by exactly one symbol afaict. Hence
-exclude-symbol (singular) would seem more appropriate for the
option.

Jan


More information about the Binutils mailing list