[PATCH] Add support for IMPORT_NAME_EXPORTAS in ILF (MSVC style) import libraries

Martin Storsjö martin@martin.st
Thu Oct 3 06:03:09 GMT 2024


On Thu, 3 Oct 2024, Alan Modra wrote:

> On Tue, Oct 01, 2024 at 12:00:11AM +0300, Martin Storsjö wrote:
>> @@ -964,7 +976,8 @@ pe_ILF_build_a_bfd (bfd *	    abfd,
>>  	 IMPORT_NAME_NOPREFIX and IMPORT_NAME_UNDECORATE as per the
>>  	 PE COFF 6.0 spec (section 8.3, Import Name Type).  */
>>
>> -      if (import_name_type != IMPORT_NAME)
>> +      if (import_name_type != IMPORT_NAME &&
>> +	  import_name_type != IMPORT_NAME_EXPORTAS)
>>  	{
>>  	  char c = symbol[0];
>>
>
> Trailing operator formatting error here.
>
>> @@ -1340,9 +1354,24 @@ pe_ILF_object_p (bfd * abfd)
>>        return NULL;
>>      }
>>
>> +  /* An ILF file may contain a third string, after source_dll; this is used
>> +   * for IMPORT_NAME_EXPORTAS. We know from above that the whole block of
>> +   * data is null terminated, ptr[size-1]==0, but we don't know how many
>> +   * individual null terminated strings we have in there.
>> +   *
>> +   * First find the end of source_dll. */
>
> This style of block comment isn't according to the GNU coding standard.

Sorry about that, and thanks for the fixes!

// Martin


More information about the Binutils mailing list