[PATCH 1/3] bfd, ld, dlltool: Emit delay-load import data into its own section

Jan Beulich jbeulich@suse.com
Fri May 2 13:06:39 GMT 2025


On 15.04.2025 07:08, Jeremy Drake wrote:
> --- a/bfd/coffgen.c
> +++ b/bfd/coffgen.c
> @@ -3125,6 +3125,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
>  	  else if (startswith (o->name, ".idata")
>  		   || startswith (o->name, ".pdata")
>  		   || startswith (o->name, ".xdata")
> +		   || startswith (o->name, ".didat")
>  		   || startswith (o->name, ".rsrc"))
>  	    o->gc_mark = 1;

I dislike the pre-existing code here, and I further see the risk of regressions
with the addition: What if someone has a custom .didata section in use? Imo at
least this new addition wants to check for .didat as the full name, or
.didat$<digit>.

Jan


More information about the Binutils mailing list