This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch ld]: Avoid duplicates in internal import/export element lists
On Wed, Apr 13, 2011 at 6:11 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2011/4/13 Kai Tietz <ktietz70@googlemail.com>:
>> Hello,
>>
>> by investigating for the issue about inlines in combination with
>> dllexport attribute I found
>> issues in ld's def-file handling of import and export list. ?This
>> attached patch might fix
>> also PR binutils/12658 issue.
>>
>> ChangeLog ld/
>>
>> 2011-04-13 ?Kai Tietz
>>
>> ? ? ? ?PR binutils/12658
>> ? ? ? ?* deffile.h (def_file_add_export): Add is_dup argument.
>> ? ? ? ?(def_file_add_import): Likewise.
>> ? ? ? ?* deffilep.y (are_names_equal): New helper.
>> ? ? ? ?(cmp_export_elem): New helper.
>> ? ? ? ?(find_export_in_list): Add search routine for exports.
>> ? ? ? ?(def_file_add_export): Check for duplicates.
>> ? ? ? ?(cmp_import_elem): New helper.
>> ? ? ? ?(find_import_in_list): Add search routine for imports.
>> ? ? ? ?(def_file_add_import): Check for duplicates.
>> ? ? ? ?(def_exports): Handle duplicates.
>> ? ? ? ?(def_imports): Likewise.
>> ? ? ? ?* pe-dll.c (process_def_file_and_drectve): Likewise.
>> ? ? ? ?(pe_implied_import_dll): Likewise.
>>
>> Tested for x86_64-w64-mingw32 and i686-w64-mingw32. Ok for apply?
>
> I noticed that for imports I wasn't sorting and checking for ordinals.
> The attached patch fixes that.
>
> Regards,
> Kai
>
Applied?