[RFC PATCH, binutils, ELF 9/11] Add support for creating import libraries
Nick Clifton
nickc@redhat.com
Thu Jul 7 11:48:00 GMT 2016
Hi Thomas,
>> Please find an updated patch below.
>> *** bfd/ChangeLog ***
>>
>> 2016-02-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
>>
>> * elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook.
>> (_bfd_elf_filter_global_symbols): Declare.
>> * elf.c (_bfd_elf_filter_global_symbols): New function.
>> * elflink.c (elf_filter_global_symbols): Likewise.
>> (elf_output_implib): Likewise.
>> (bfd_elf_final_link): Call above function, failing if it does.
>> * elfxx-target.h (elf_backend_filter_implib_symbols): Define macro and
>> default it to NULL.
>> (elf_backend_copy_indirect_symbol): Fix spacing.
>> (elf_backend_hide_symbol): Likewise.
>> (elfNN_bed): Initialize elf_backend_filter_implib_symbols backend hook.
>>
>>
>> *** include/ChangeLog ***
>>
>> 2015-10-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
>>
>> * bfdlink.h (struct bfd_link_info): Declare new ldscript_def and
>> out_implib_bfd fields.
>>
>>
>> *** ld/ChangeLog ***
>>
>> 2015-11-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
>>
>> * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Open import
>> library file for writing and initialize implib_bfd field of link_info
>> structure.
>> * emultempl/pe.em (pe_implib_filename): Remove variable declaration.
>> (OPTION_IMPLIB_FILENAME): Remove macro definition.
>> (gld${EMULATION_NAME}_add_options): Remove --out-implib option.
>> (gld_${EMULATION_NAME}_list_options): Likewise.
>> (gld${EMULATION_NAME}_handle_option): Likewise.
>> (gld_${EMULATION_NAME}_finish): Use command_line.out_implib_filename
>> instead of pe_implib_filename.
>> * emultempl/pep.em (pep_implib_filename): Remove variable declaration.
>> (OPTION_IMPLIB_FILENAME): Remove enumerator.
>> (gld${EMULATION_NAME}_add_options): Remove --out-implib option.
>> (gld_${EMULATION_NAME}_list_options): Likewise.
>> (gld${EMULATION_NAME}_handle_option): Likewise.
>> (gld_${EMULATION_NAME}_finish): Use command_line.out_implib_filename
>> instead of pep_implib_filename.
>> * ld.h (args_type): Declare new out_implib_filename field.
>> * ld.texinfo (--out-implib): Move documentation to arch-independent
>> part and rephrase to apply to ELF targets.
>> * ldexp.c (exp_fold_tree_1): Set ldscript_def field to 1 for symbols
>> defined in linker scripts.
>> * ldlex.h (enum option_values): Declare new OPTION_OUT_IMPLIB
>> enumerator.
>> * lexsup.c (ld_options): Add entry for new --out-implib switch.
>> (parse_args): Handle OPTION_OUT_IMPLIB case.
>>
>>
>> *** ld/testsuite/ChangeLog ***
>>
>> 2015-10-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
>>
>> * ld-elf/elf.exp (Generate empty import library): New test.
>> (Generate import library): Likewise.
>> * ld-elf/implib.s: Likewise.
>> * ld-elf/implib.rd: New file.
>> * ld-elf/empty-implib.out: Likewise
>>
Approved - please apply - but please could you add a line to the ld/NEWS
file mentioning the new feature.
Also - I suspect that you will want this patch to go in to the 2.27
release. The decision is up to Tristan, but I would urge that it be
delayed until 2.28 as I think that it needs some time to bed-in, so to
speak.
Cheers
Nick
More information about the Binutils
mailing list