aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
AgeCommit message (Collapse)AuthorFilesLines
2001-11-152001-11-14 H.J. Lu <hjl@gnu.org>H.J. Lu1-3/+3
* emultempl/armelf.em (arm_elf_finish): Renamed from gld${EMULATION_NAME}_finish. (LDEMUL_FINISH): Set to arm_elf_finish.
2001-11-152001-11-11 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+22
* bfd-in.h (bfd_elf32_discard_info): Add prototype. (bfd_elf64_discard_info): Likewise. * bfd-in2.h: Regenerate. * elf-bfd.h (struct elf_reloc_cookie): New. (struct elf_backend_data): Add elf_backend_discard_info, elf_backend_ignore_discarded_relocs, and elf_backend_write_section. (_bfd_elf32_reloc_symbol_deleted_p): Add prototype. (_bfd_elf64_reloc_symbol_deleted_p): Likewise. * elf32-mips.c (_bfd_elf32_mips_discard_info): New. (_bfd_elf32_mips_ignore_discarded_relocs): New. (_bfd_elf32_mips_write_section): New. (elf_backend_discard_info): Define. (elf_backend_ignore_discarded_relocs): Define. (elf_backend_write_section): Define. * elfcode.h (elf_bfd_discard_info): Define. (elf_reloc_symbol_deleted_p): Define. * elflink.h (elf_link_input_bfd): Check elf_section_ignore_discarded_relocs. Call bed->elf_backend_write_section if available. (elf_reloc_symbol_deleted_p): New. (elf_bfd_discard_info): New. (elf_section_ignore_discarded_relocs): New. * elfxx-target.h (elf_backend_discard_info): Define. (elf_backend_ignore_discarded_relocs): Define. (elf_backend_write_section): Define. (elfNN_bed): Add elf_backend_discard_info, elf_backend_ignore_discarded_relocs, and elf_backend_write_section. * libbfd-in.h (_bfd_discard_section_stabs): Add prototype. * libbfd.h: Regenerate. * stabs.c (_bfd_discard_section_stabs): New. 2001-11-11 Daniel Jacobowitz <drow@mvista.com> * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New. (struct ld_emulation_xfer_struct): Use it.
2001-10-30Add MMIX supportNick Clifton3-0/+348
2001-10-15 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' fromAlan Modra1-2/+2
-z nocopyreloc and -z nocombreloc usage strings.
2001-10-12Include -z nocopyreloc in usageNick Clifton1-0/+1
2001-10-102001-10-10 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-1/+1
* emultempl/elf32.em: Fix shell 'if' usage for portability.
2001-10-05 * doc/as.texinfo: Document M and S ELF section flags.Jakub Jelinek1-0/+2
* emultempl/elf32.em (gld_*_list_options): Include -z combreloc and -z nocombreloc in usage.
2001-10-03Add support for -z nocopyreloc.Alan Modra1-0/+2
2001-09-24oops - omitted from previous deltaNick Clifton1-18/+6
2001-09-24Define and use pe_get_data_import_dll_name().Nick Clifton1-2/+19
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu4-20/+17
2001-09-18 * deffilep.y (def_stash_module): Constify "name" param.Alan Modra2-18/+19
* pe-dll.c: Replace CONST with const throughout. (quick_symbol): Constify "n1", "n2", "n3" params. (make_singleton_name_thunk): Constify "import" param. Make "buffer_len" a size_t. (make_import_fixup_entry): Constify "name", "fixup_name", "dll_symname" params. (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread. (pe_get32): Likewise. (pe_implied_import_dll): Likewise. * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb". (sort_by_section_name): Likewise. * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included. (make_import_fixup): Cast printf arg, rel->address to long rather than int. (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
2001-09-122001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>Charles Wilson1-6/+22
* emultempl/pe.em(make_import_fixup): change signature to take asection as well as arelec; we need this for proper error reporting. Only call pe_create_import_fixup() if there is no attempt to add a constant addend to the reloc; otherwise, report error condition. * pe-dll.c(pe_walk_relocs_of_symbol): change signature, since final argument is a pointer to make_import_fixup(). Change call to cb() to match make_import_fixup() signature. (make_import_fixup_mark): make buffer_len unsigned. * pe-dll.h: change signature of pe_walk_relocs_of_symbol. 2001-09-12 Charles Wilson <cwilson@ece.gatech.edu> * ld.texinfo: add verbose documentation for auto-import direct-addressing workaround, to compliment the terse error message.
2001-09-06Fix import symbols for AIX.Tom Rix1-61/+49
2001-09-03 * emultempl/beos.em: Declare prototypes for comparions functions,Andreas Jaeger1-29/+27
adjust definitions.
2001-09-03 * emultempl/aix.em: Add missing prototype.Andreas Jaeger8-6/+43
* emultempl/lnk960.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf_oabi.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/gld960.em: Likewise. * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter for prototype declaration.
2001-08-31 * emultempl/pe.em: Add missing prototypes.Andreas Jaeger1-65/+87
(gld_${EMULATION_NAME}_after_open): Remove extra args to pe_find_data_imports. (pr_sym): Add unused attribute.
2001-08-23 * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek1-3/+29
(struct elf_backend_data): Add elf_backend_reloc_type_class. (_bfd_elf_reloc_type_class): New. * elfxx-target.h (elf_backend_reloc_type_class): Define. (elfNN_bed): Add elf_backend_reloc_type_class. * elf.c (_bfd_elf_reloc_type_class): New. * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf_i386_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf32_sparc_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (sparc64_elf_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field. (elfNN_ia64_hash_table_create): Clear ia64_info. (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only section. (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag instead of looking up section names for DT_TEXTREL. (elfNN_ia64_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elflink.h (size_dynamic_sections): Add spare DT_NULL tags. (struct elf_link_sort_rela): New. (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New. (elf_bfd_final_link): Call elf_link_sort_relocs. Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if necessary. * bfdlink.h (struct bfd_link_info): Add combreloc and spare_dynamic_tags fields. * emultempl/elf32.em (place_orphan): Place orphan .rel* sections into .rel.dyn resp. .rela.dyn if combreloc. (get_script): If .x linker script is equal to .xn, only put it once into the binary. Add .xc and .xsc scripts. (parse_args): Handle -z combreloc and -z nocombreloc. * scripttempl/elf.sc (.rela.sbss): Fix a typo. For .xc and .xsc scripts put all .rel* or .rela* input sections but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn. * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME is elf. Strip trailing whitespace from script. Generate .xc and .xsc scripts if requested. * ldmain.c (main): Initialize link_info.combreloc and link_info.spare_dynamic_tags. * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define. (ld_options): Add --spare-dynamic-tags option. (parse_args): Likewise. * ld.texinfo: Document -z combreloc and -z nocombreloc. * ldint.texinfo: Document .xc and .xsc linker scripts. * NEWS: Add notes about -z combreloc and SHF_MERGE.
2001-08-20 * ldlang.c: When traversing lang_statement_union_type lists,Alan Modra3-8/+8
consistently use "header.next" rather than "next". * mpw-eppcmac.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/pe.em: Likewise. * ldlang.h (union lang_statement_union): Remove "next" field.
2001-08-20 * ldlang.c (insert_pad): Use offsetof macro.Alan Modra1-62/+0
(lang_size_sections): Always neuter padding statements. * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
2001-08-20 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" paramAlan Modra1-34/+89
passed to lang_size_sections. (pe_exe_fill_sections): Likewise. * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em. (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
2001-08-18 * emultempl/aix.em: Formatting fixes.Alan Modra1-335/+367
2001-08-14 * emultempl/elf32.em: Formatting fixes.Alan Modra1-57/+56
(output_prev_sec_find): Test for bfd_ind_section too; do so by looking at sec->owner. (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test. (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove unused code, and reorganize orphan section placement code.
2001-08-14(wild_doit): Rename to lang_add_section.Alan Modra4-9/+10
2001-08-13 * emultempl/needrelax.em: New file.Richard Henderson1-0/+40
* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it. * Makefile.am (eelf64_ia64.c): Depend on it. * Makefile.in: Rebuild.
2001-08-13 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure thatAlan Modra1-2/+6
output_section is set non-NULL.
2001-08-13 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): ReturnAlan Modra1-5/+6
`true' for SEC_EXCLUDE sections so that the generic code doesn't needlessly create an output_section_statement. Treat a correctly named output_section_statement with NULL bfd_section as compatible.
2001-08-13Update copyright noticeHans-Peter Nilsson1-1/+1
2001-08-13 * emultempl/generic.em: Support EXTRA_EM_FILE.Hans-Peter Nilsson1-21/+38
(ld_${EMULATION_NAME}_emulation): Support emulation parameters LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL, LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION, LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET, LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH, LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS, LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN, LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE, LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE, LDEMUL_FIND_POTENTIAL_LIBRARIES.
2001-08-09 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.Alan Modra1-0/+2
2001-08-04 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in thisAlan Modra1-2/+2
order.
2001-08-04 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,Alan Modra1-57/+78
ie. iterate over wild_statement.section_list. (gld${EMULATION_NAME}_place_orphan): Likewise.
2001-08-032001-08-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* emultempl/beos.em (init): Add the missing initialization.
2001-08-022001-08-02 Charles Wilson <cwilson@ece.gatech.edu>Charles Wilson1-5/+156
* ldmain.c (main): initialize link_info.pei386_auto_import * pe-dll.c: new tables for auto-export filtering (auto_export): change API, pass abfd for contextual filtering. Loop thru tables of excluded symbols instead of comparing "by hand". 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com> * pe-dll.c: new variable pe_dll_enable_extra_debug. New static variable current_sec (static struct sec *). Add forward declaration for add_bfd_to_link. (process_def_file): Don't export undefined symbols. Do not export symbols starting with "_imp__". Call auto_export() with new API. (pe_walk_relocs_of_symbol): New function. (generate_reloc): add optional extra debugging (pe_dll_generate_def_file): eliminate extraneous initial blank line in output (make_one): enlarge symtab to make room for __nm__ symbols (DATA auto-import support). (make_singleton_name_thunk): New function. (make_import_fixup_mark): New function. (make_import_fixup_entry): New function. (pe_create_import_fixup): New function. (add_bfd_to_link): Specify that 'name' argument is a CONST char *. * pe-dll.h: declare new variable pe_dll_extra_pe_debug; declare new functions pe_walk_relocs_of_symbol and pe_create_import_fixup. * emultempl/pe.em: add new options --enable-auto-import, --disable-auto-import, and --enable-extra-pe-debug. (make_import_fixup): New function. (pe_find_data_imports): New function. (pr_sym): New function. (gld_${EMULATION_NAME}_after_open): Add optional extra pe debugging. Call pe_find_data_imports. Mark .idata as DATA, not CODE. 2001-08-02 Charles Wilson <cwilson@ece.gatech.edu> * ld.texinfo: add additional documentation for --export-all-symbols. Document --out-implib, --enable-auto-image-base, --disable-auto-image-base, --dll-search-prefix, --enable-auto-import, and --disable-auto-import. * ldint.texinfo: Add detailed documentation on auto-import implementation.
2001-07-142001-07-14 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+4
* emultempl/elf32.em (output_prev_sec_find): Never return bfd_abs_section_ptr, bfd_com_section_ptr nor bfd_und_section_ptr.
2001-07-13 * emultempl/elf32.em (output_prev_sec_find): New.Jakub Jelinek1-6/+39
(place_orphan): Use it.
2001-07-11Check for the output_bfd not having any coff_data structure allocated to it.Nick Clifton1-1/+1
2001-07-102001-07-09 David O'Brien <obrien@FreeBSD.org>David O'Brien1-0/+3
* emultempl/elf32.em: Do not assuming that contents of the buffer returned from basename function will remain unchanged accross other function calls. NOTE: DJ Delorie recomends doing a basename()->lbasename() conversion. Approved by: DJ Delorie <200107100030.UAA01223@envy.delorie.com>
2001-06-18 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):Hans-Peter Nilsson1-1/+1
Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections. * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto. * ld.h (args_type): Remove member export_dynamic. All users changed to use struct bfd_link_info member.
2001-06-08 * ldlang.c (record_bfd_errors): Remove.Alan Modra1-1/+2
* emultempl/aix.em: Fix copyright dates.
2001-06-05* emultempl/pe.em (init): Reduce default stack reserve to 0x200000.DJ Delorie1-1/+1
2001-05-252001-05-25 H.J. Lu <hjl@gnu.org>H.J. Lu2-2/+2
* emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move setting of output_filename after bfd_scan_arch. * emultempl/pe.em: Likewise.
2001-05-252001-05-25 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK like emulparams/aixppc.sh. * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed instead of ${srcdir}/emultempl/stringify.sed.
2001-05-252001-05-24 H.J. Lu <hjl@gnu.org>H.J. Lu1-4/+0
* emultempl/stringify.sed: Removed again.
2001-05-252001-05-24 H.J. Lu <hjl@gnu.org>H.J. Lu7-7/+98
* emultempl/aix.em (OUTPUT_ARCH): Defined. (gld${EMULATION_NAME}_before_parse): Initialize ldfile_output_architecture, ldfile_output_machine and ldfile_output_machine_name from ${OUTPUT_ARCH} if possible. * emultempl/beos.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/mipsecoff.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/sunos.em: Likewise.
2001-05-24Support for xcoff64Tom Rix2-238/+447
2001-05-24* emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this newAlexandre Oliva1-9/+13
variable to avoid non-portable shell construct.
2001-05-22Improve Solaris compatabilityNick Clifton1-0/+8
2001-05-032001-05-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-35/+13
* emultempl/elf32.em: Include "libiberty.h". (gld${EMULATION_NAME}_vercheck): Call basename () to get the basename of the bfd filename. (gld${EMULATION_NAME}_stat_needed): Likewise. (gld${EMULATION_NAME}_try_needed): Likewise. (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
2001-05-022001-05-02 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+2
* emultempl/pe.em: Include <ctype.h>.