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

Jeremy Drake sourceware-bugzilla@jdrake.com
Tue May 6 06:33:55 GMT 2025


On Mon, 5 May 2025, Jeremy Drake wrote:

> diff --git a/bfd/coffgen.c b/bfd/coffgen.c
> index f87e54f9722..9937e2f7bd1 100644
> --- a/bfd/coffgen.c
> +++ b/bfd/coffgen.c
> @@ -3104,6 +3104,19 @@ coff_gc_sweep_symbol (struct coff_link_hash_entry *h,
>  typedef bool (*gc_sweep_hook_fn)
>    (bfd *, struct bfd_link_info *, asection *, const struct internal_reloc *);
>
> +static inline bool
> +is_subsection (const char *str, const char *prefix)
> +{
> +  size_t n = strlen (prefix);
> +  if (strncmp (str, prefix, n) != 0)
> +    return false;
> +  if (str[n] == 0)
> +    return true;
> +  else if (str[n] != '$')
> +    return false;
> +  return ISDIGIT (str[n + 1]) && str[n + 2] == 0;
> +}

Oops, I should have actually waited for this to build before sending - I
missed including safe-ctype.h.  I'll wait this time and send v3 once I can
confirm it works.


More information about the Binutils mailing list