aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2001-09-03 * emultempl/beos.em: Declare prototypes for comparions functions,Andreas Jaeger2-29/+32
adjust definitions.
2001-09-03 * emultempl/aix.em: Add missing prototype.Andreas Jaeger10-7/+58
* 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-312001-08-31 Eric Christopher <echristo@redhat.com>Eric Christopher2-1/+8
Jason Eckhardt <jle@redhat.com> * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
2001-08-31 * emultempl/pe.em: Add missing prototypes.Andreas Jaeger2-65/+94
(gld_${EMULATION_NAME}_after_open): Remove extra args to pe_find_data_imports. (pr_sym): Add unused attribute.
2001-08-30omitted in previous deltaNick Clifton1-3/+3
2001-08-292001-08-29 Joel Sherrill <joel@OARcorp.com>Phil Blundell2-2/+9
* configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change default from coff to elf.
2001-08-29 * emulparams/h8300helf.sh: Resync with h8300elf.sh. UpdateJeff Law3-5/+25
ARCH specification. * emulparams/h8300self.sh: Similarly.
2001-08-29Add missing changelog entryNick Clifton1-0/+5
2001-08-29 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o andJoern Rennecke7-1/+61
eh8300self.o . (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets. * configure.tgt (h8300-*-elf*): New case. * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files. * emulparams/h8300self.sh: New file. * Makefile.in: Regenerated.
2001-08-27 * ld-checks/checks.exp: .lcomm is incompatible with ppc coff.Alan Modra6-5/+20
* ld-scripts/cross1.t: Add .toc section. * ld-scripts/cross2.t: Likewise. * ld-scripts/phdrs.exp: powerpc64 is 64 bit. * ld-srec/srec.exp: xfail powerpc64
2001-08-27 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.Alan Modra6-12/+86
(eelf64ppc.c, eelf64lppc.c): Add make targets. Run "make dep-am" * Makefile.in: Regenerate. * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj entries to correct alphabetical position. * emulparams/elf64ppc.sh: New. * emulparams/elf64lppc.sh: New.
2001-08-27Declare BSIZE as staticNick Clifton2-1/+5
2001-08-23 * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek9-12/+157
(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-222001-08-22 H.J. Lu <hjl@gnu.org>H.J. Lu2-1/+5
* emulparams/elf32fr30.sh: Add a newline.
2001-08-21Return if target is `vax-*-ultrix*'.Nick Clifton2-7/+17
Continue with other tests when there is a compilation error.
2001-08-21 * deffilep.y: Add missing prototypes.Andreas Jaeger3-5/+36
* pe-dll.c: Likewise.
2001-08-20 * ldlang.c (insert_pad): Fix typos in last patch.Alan Modra2-2/+12
2001-08-20 * ldlang.c: When traversing lang_statement_union_type lists,Alan Modra6-28/+27
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 Modra3-83/+14
(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 Modra3-36/+99
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 Modra2-335/+371
2001-08-18 * ldlang.c (insert_pad): Make use of an existing pad statement ifAlan Modra3-106/+112
available. Move code calculating alignment, adjusting section alignment power, and adjusting dot to .. (size_input_section): .. here. Remove unused relax param. (lang_size_sections): Change boolean `relax' param to boolean *. Adjust call to size_input_section. Make use of insert_pad to place pad after the assignment statement. If relaxing, zap padding statements. (reset_memory_regions): Reset output_bfd section sizes too. (relax_again): Move to.. (lang_process): ..here. Adjust call to lang_size_sections, and remove duplicated code. * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
2001-08-17 * ld.texinfo: Document that fill values now use the four leastAlan Modra19-25/+47
significant bytes. * emulparams/elf32fr30.sh (NOP): Update. * emulparams/elf32mcore.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_chaos.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_s390.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/i386moss.sh: Likewise. * emulparams/i386nw.sh: Likewise. * emulparams/m68kelf.sh: Likewise. * scripttempl/elf.sc: Update NOP comment. * scripttempl/elfi370.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/nw.sc: Likewise.
2001-08-15Fix for ldTom Rix3-2/+7
2001-08-14 * emultempl/elf32.em: Formatting fixes.Alan Modra2-57/+63
(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 Modra8-30/+41
2001-08-13 * emultempl/needrelax.em: New file.Richard Henderson5-2/+52
* 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 Modra2-4/+11
output_section is set non-NULL.
2001-08-13 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): ReturnAlan Modra2-5/+13
`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 Nilsson2-21/+52
(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-12 * scripttempl/elf.sc, scripttempl/elfd30v.sc,Richard Henderson6-2/+26
scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc, scripttempl/v850.sc: Keep .jcr data.
2001-08-12Make --verbose always display linker scriptNick Clifton7-18/+63
2001-08-10 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypesAndreas Jaeger3-219/+214
to build warnings. * configure: Regenerate.
2001-08-09 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.Alan Modra2-0/+4
2001-08-09 * scripttempl/elf.sc: Move non-text .dynamic section beforeAlan Modra18-19/+45
.plt/.got/.sdata* group. (OTHER_GOT_SECTIONS): Move to immediately after .got. (OTHER_SDATA_SECTIONS): Add. * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than OTHER_GOT_SECTIONS. * emulparams/crislinux.sh: Likewise. * emulparams/elf32b4300.sh: Likewise. * emulparams/elf32bmip.sh: Likewise. * emulparams/elf32bmipn32.sh: Likewise. * emulparams/elf32bsmip.sh: Likewise. * emulparams/elf32btsmip.sh: Likewise. * emulparams/elf32ebmip.sh: Likewise. * emulparams/elf32elmip.sh: Likewise. * emulparams/elf32l4300.sh: Likewise. * emulparams/elf32lmip.sh: Likewise. * emulparams/elf32lsmip.sh: Likewise. * emulparams/elf32ltsmip.sh: Likewise. * emulparams/elf64bmip.sh: Likewise. * emulparams/elf64btsmip.sh: Likewise. * emulparams/elf64ltsmip.sh: Likewise.
2001-08-08 * genscripts.sh: Source the emulparams script before each outputAlan Modra2-12/+24
script is generated so that variables like `RELOCATING' may affect variables defined in the emulparams script.
2001-08-04 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in thisAlan Modra2-2/+5
order.
2001-08-04 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,Alan Modra2-57/+84
ie. iterate over wild_statement.section_list. (gld${EMULATION_NAME}_place_orphan): Likewise.
2001-08-03 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handleStephane Carrez3-40/+224
.fini[0-4] sections used by _exit (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM. (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*. * scripttempl/elfm68hc11.sc: Likewise.
2001-08-032001-08-03 H.J. Lu <hjl@gnu.org>H.J. Lu2-1/+5
* emultempl/beos.em (init): Add the missing initialization.
2001-08-03 * ld.texinfo (Input Section Basics): Clarify ordering of outputAlan Modra7-202/+269
sections. * ldlang.c (callback_t): Add wildcard_list param. (walk_wild_section): Remove "section" param. Rewrite for lang_wild_statement_type change. Remove unique_section_p test. (walk_wild_file): Remove "section" param. (walk_wild): Remove "section" and "file" params. (lang_gc_wild): Likewise. (wild): Likewise. Modify for lang_wild_statement_type change. (wild_sort): Likewise. Add "sec" param. (gc_section_callback): Likewise. (output_section_callback): Likewise. Do unique_section_p test. (map_input_to_output_sections): Modify call to wild. (lang_gc_sections_1): Likewise. (print_wild_statement): Modify for lang_wild_statement_type change. (lang_add_wild): Replace filename, filenames_sorted param with filespec. Replace section_name, sections_sorted, exclude_filename_list with section_list. * ldlang.h (lang_add_wild): Here too. (lang_wild_statement_type): Replace section_name, sections_sorted, and exclude_filename_list with section_list. * ldgram.y (current_file): Delete. (%union): Add wildcard_list. (file_NAME_list): Set type to wildcard_list. Build a linked list rather than calling lang_add_wild for each entry. (input_section_spec_no_keep): Call lang_add_wild here instead. * ld.h (struct wildcard_list): Declare. * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
2001-08-022001-08-02 Charles Wilson <cwilson@ece.gatech.edu>Charles Wilson6-25/+709
* 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-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-08-01Do not require any exception support library. Check results against NRV.Nick Clifton3-17/+59
2001-08-01Do not require any exception support library.Nick Clifton2-1/+6
2001-07-30Fix computation in SECTIONS example.Nick Clifton2-1/+6
2001-07-272001-07-27 H.J. Lu <hjl@gnu.org>H.J. Lu2-2/+6
* ld-selective/selective.exp: Fix the error in the last change.
2001-07-24 * ld-selective/selective.exp: Support g++ V3 ABI (along sideAlan Modra2-4/+18
the old ABI). Make comparisons against normalized (to V3-style) demangled nm output.
2001-07-24 * config/default.exp (ld_nm): Add "nmflags" arg.Alan Modra9-11/+22
* lib/ld-lib.exp (default_ld_nm): Likewise. * ld-empic/empic.exp: Adjust call to ld_nm. * ld-scripts/defined.exp: Likewise. * ld-scripts/script.exp: Likewise. * ld-scripts/sizeof.exp: Likewise. * ld-selective/selective.exp: Likewise. * ld-sh/sh.exp: Likewise.