[PATCH 2/3] bfd/ELF: Retain strong undefined symbols under -z dynamic-undefined-weak

Hakan Candar hakan@envs.net
Tue Sep 2 11:28:06 GMT 2025


On Mon, Sep 1 2025 at 09:09:51 +02:00:00, Jan Beulich 
<jbeulich@suse.com> wrote:
> On 16.07.2025 18:03, Hakan Candar wrote:
>>  --- a/bfd/bfd-in2.h
>>  +++ b/bfd/bfd-in2.h
>>  @@ -2924,6 +2924,14 @@ const char *bfd_format_string (bfd_format 
>> format);
>>      && bfd_is_abs_section ((H)->u.def.section) \
>>      && !(H)->rel_from_abs)
>> 
>>  +/* Return TRUE if the symbol described by a linker hash entry H
>>  +   is undefined.  This includes both strong and weak undefined
>>  +   symbols.  Use this macro to check whether the symbol has not
>>  +   been resolved during the link.  */
>>  +#define bfd_is_undef_symbol(H) \
>>  +  ((H)->type == bfd_link_hash_undefined \
>>  +    || (H)->type == bfd_link_hash_undefweak)
> 
> This being linking-specific, may I suggest e.g. 
> bfd_link_is_undef_symbol()?
> 

Noted.

> Jan

Regards,
Hakan




More information about the Binutils mailing list