[PATCH v2] bfd: fill in PE load config directory entry.

LIU Hao lh_mouse@126.com
Tue Mar 11 08:11:16 GMT 2025


在 2025-3-11 15:53, Jan Beulich 写道:
> On 10.03.2025 19:25, Jeremy Drake wrote:
>> @@ -4573,6 +4575,48 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
>>   #endif
>>       }
>>
>> +  h1 = coff_link_hash_lookup (coff_hash_table (info),
>> +			      (bfd_get_symbol_leading_char (abfd) != 0
>> +			       ? "__load_config_used" : "_load_config_used"),
>> +			      false, false, true);
> 
> I understand the same is used when looking up _tls_used, yet it feels wrong
> to assume that bfd_get_symbol_leading_char() can only ever return nil or '_'.
> Nevertheless, because of the pre-existing similar code, I'm not going to
> insist that this be corrected right here.

The underscore thing is for x86-32, where external variable names are prefixed to make symbols. Symbols 
of `__fastcall` and `__vectorcall` functions are not prefixed with underscores, which doesn't apply to 
variables.

On x86-64, ARM32 and ARM64, symbols are unprefixed.


-- 
Best regards,
LIU Hao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20250311/b7035810/attachment.sig>


More information about the Binutils mailing list