aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
AgeCommit message (Collapse)AuthorFilesLines
2001-06-192001-06-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-5/+0
* ldlang.c (lang_check): Revert the change mode on 2001-06-15.
2001-06-182001-06-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-3/+3
* ldlang.c (init_os): Add the newline to the einfo call. (lang_check): Likewise. (lang_do_version_exports_section): Likewise.
2001-06-15 * ldlang.c (lang_check): Emit fatal error if relocatable linkHans-Peter Nilsson1-0/+5
between different object flavours.
2001-06-15Chnage load_symbols() to a boolean functionNick Clifton1-25/+45
2001-06-08 * ldlang.c (record_bfd_errors): Remove.Alan Modra1-48/+0
* emultempl/aix.em: Fix copyright dates.
2001-05-312001-05-31 H.J. Lu <hjl@gnu.org>H.J. Lu1-8/+0
* ldlang.c (open_input_bfds): Don't change the bfd error handler whilst loading symbols.
2001-05-17Add a flag to asection, linker_has_input, and use it to reliablyAlan Modra1-39/+50
determine whether an input section is the first one assigned to an output section.
2001-05-11 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffixJakub Jelinek1-0/+6
fields, change sec into secinfo. (struct sec_merge_info): Add chain, remove last fields. (struct sec_merge_sec_info): Add next, sec, psecinfo fields. (sec_merge_hash_lookup): If lookup could not use a string only because it has bad alignment, mark the old string for deletion. (sec_merge_add): Add secinfo argument. Don't compute entry's position, instead record the section. (sec_merge_emit): Update for the sec into secinfo change in struct sec_merge_hash_entry. (_bfd_merge_section): Only record the section for merging, defer putting strings into the hash table. (cmplengthentry, last4_eq, last_eq, record_section, merge_strings, _bfd_merge_sections): New functions. (_bfd_merged_section_offset): Update for the sec_merge_hash_entry changes. * libbfd-in.h (_bfd_merge_sections): Add prototype. (_bfd_nolink_bfd_merge_sections): Define. * libbfd.h: Likewise. (bfd_generic_merge_sections): Add prototype. * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections. (struct bfd_target): Likewise. * bfd.c (bfd_merge_sections): Define. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_merge_sections): New function. * elf-bfd.h (_bfd_elf_merge_sections): Add prototype. * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define. * reloc.c (bfd_generic_merge_sections): New function. * vms.c (vms_bfd_merge_sections): New function. * aout-adobe.c (aout_32_bfd_merge_sections): Define. * aout-target.h (MY_bfd_merge_sections): Define. * aout-tic30.c (MY_bfd_merge_sections): Define. * binary.c (binary_bfd_merge_sections): Define. * bout.c (b_out_bfd_merge_sections): Define. * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define. * coffcode.c (coff_bfd_merge_sections): Define. * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define. * i386msdos.c (msdos_bfd_merge_sections): Define. * i386os9k.c (os9k_bfd_merge_sections): Define. * ieee.c (ieee_bfd_merge_sections): Define. * ihex.c (ihex_bfd_merge_sections): Define. * nlm-target.h (nlm_bfd_merge_sections): Define. * oasys.c (oasys_bfd_merge_sections): Define. * ppcboot.c (ppcboot_bfd_merge_sections): Define. * som.c (som_bfd_merge_sections): Define. * srec.c (srec_bfd_merge_sections): Define. * tekhex.c (tekhex_bfd_merge_sections): Define. * versados.c (versados_bfd_merge_sections): Define. * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define. * ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-022001-05-02 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+2
* ldfile.c: Include "libiberty.h". * ldlex.l: Likewise. * ldmisc.c (buystring): Removed. * ldmisc.h: Likewise. * ldfile.c: Replace buystring with xstrdup. * ldlang.c: Likewise. * ldlex.l: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * lexsup.c: Likewise. * mpw-eppcmac.c: Likewise.
2001-04-28Give emulation a chance to process unrecognized file before fatal error isNick Clifton1-6/+5
reported, not after.
2001-04-13bfd/Jakub Jelinek1-0/+14
* libbfd-in.h (_bfd_merge_section): New. (_bfd_write_merged_section): New. (_bfd_merged_section_offset): New. * libbfd.h: Rebuilt. * linker.c (_bfd_generic_link_output_symbols): Handle discard_sec_merge. * aoutx.h (aout_link_write_symbols): Likewise. * pdp11.c (aout_link_write_symbols): Likewise. * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section. (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE sections. (elf_link_sec_merge_syms): New. (elf_link_input_bfd): Call _bfd_merged_section_offset and _bfd_write_merged_section. Handle discard_sec_merge. * elf-bfd.h (struct elf_link_hash_table): Add merge_info field. (struct bfd_elf_section_data): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and SEC_STRINGS section flags and entsize from their ELF counterparts. (_bfd_elf_link_hash_table_init): Initialize merge_info. (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize from their BFD counterparts. * merge.c: New file. * Makefile.am: Add strtab.lo. * Makefile.in: Rebuilt. include/ * bfdlink.h (bfd_link_discard): Add discard_sec_merge. gas/ * config/obj-elf.c (obj_elf_change_section): Add entsize argument, handle SHF_MERGE and SHF_STRINGS. (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS. (obj_elf_section): Allow additional argument specifying entity size. * write.c (adjust_reloc_syms): Keep relocations against local symbols in SEC_MERGE sections. ld/ * ldmain.c (main): Default to discard_sec_merge. * lexsup.c (OPTION_DISCARD_NONE): Define. (ld_options): Add --discard-none. (parse_args): Handle OPTION_DISCARD_NONE. * ldlang.c (wild_doit): SEC_MERGE should be set in the output section only if SEC_MERGE and SEC_STRINGS flags and entsize of all its input sections match.
2001-03-13Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton1-2/+3
2001-02-27BFD: Catch & report unhandled PE section flags.Nick Clifton1-1/+57
LD: Catch BFD errors whilst loading symbols and do not produce an executable.
2001-01-25(lang_leave_overlay): Don't set lma_region when load_base is specified.Alan Modra1-2/+6
2001-01-23Only set lma_region from the default for the first sectionAlan Modra1-1/+4
of a group of overlay sections.
2001-01-162001-01-16 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+4
* ldlang.c (lang_check): Merge the private data only if the input file has contents.
2001-01-14Extend "ld --unique" functionality.Alan Modra1-18/+47
2000-12-13Revert the last beautification with "innocent" whitespace,Nick Clifton1-1/+2
it breaks the K&R C preprocessor.
2000-11-30Add support for x86_64-*-linux-gnu* targetNick Clifton1-8/+6
2000-10-12Another try at correcting relocations against discardedAlan Modra1-2/+1
link-once section symbols.
2000-10-092000-10-09 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-4/+3
* ldcref.c: Fix formatting. * ldctor.h: Likewise. * ldemul.c: Likewise. * ldemul.h: Likewise. * ldexp.c: Likewise. * ldexp.h: Likewise. * ldfile.c: Likewise. * ldfile.h: Likewise. * ld.h: Likewise. * ldlang.c: Likewise. * ldlang.h: Likewise. * ldmain.c: Likewise.
2000-10-052000-10-05 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-272/+270
* ldlang.c: Fix formatting.
2000-09-292000-09-29 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-18/+4
* ldcref.c: Fix formatting. * ldctor.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise.
2000-09-05A tidy of ld/ldlang.c, and add missing Makefile dependenciesAlan Modra1-165/+181
I should have added with the 2000-07-28 patch.
2000-08-25When choosing the target for a particular endianness, do nothing if the targetNick Clifton1-25/+30
is not supported.
2000-07-11Remove some forward declarations in ldemul.h and ldfile.h, andAlan Modra1-1/+1
re-arrange header include order. Fix shadowing warnings in ldlang.h Fix compile errors in mpw-elfmips.c
2000-06-20tic54x/ibmc54xdsp target for ld.Timothy Wall1-0/+7
2000-05-102000-05-10 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+3
* ldlang.c (open_input_bfds): Don't load the same file within a group again if the whole archive has been loaded already.
2000-04-25place_orphan optimisationsAlan Modra1-2/+3
2000-02-21This lot mainly cleans up `comparison between signed and unsigned' gccAlan Modra1-22/+22
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
2000-02-16Add LMA memory region functionality.Timothy Wall1-34/+89
2000-02-09These snippets were missed in the previous bytes vs octets patch toTimothy Wall1-2/+6
the linker.
2000-02-04Fix typo in ALIGN_N usage.Timothy Wall1-2/+2
2000-02-03Add octets vs bytes functionality to LD.Timothy Wall1-50/+83
2000-01-21fix typo in comment.Nick Clifton1-0/+1
2000-01-18Apply H.J.'s patch to fix NOLOAD section sizes and dot updatesNick Clifton1-3/+8
2000-01-05 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.Catherine Moore1-15/+25
(name_list): New. * ld.texinfo (EXCLUDE_FILE): Update documentation. * ldgram.y (wildcard_spec): Support a list of excluded_files. (exclude_name_list): New. ldlang.c (walk_wild_section): Support list of excluded files. (print_wild_statement): Likewise. (lang_add_wild): Likewise. * ldlang.h (lang_wild_statement_type): Likewise. * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
1999-11-24Fix bug in previous deltaNick Clifton1-1/+1
1999-11-23Do not check sections without a LOAD attribute for overlapNick Clifton1-41/+44
1999-11-011999-11-01 Steve Chamberlain <sac@pobox.com>Ian Lance Taylor1-21/+84
* ldlang.c (section_already_linked): Rework to use hash table. (already_linked_newfunc): New function. (already_linked_table_init): New function. (already_linked_table_free): New function. (lang_process): Initialize and free the already_linked hash table.
1999-09-121999-09-12 Donn Terry <donn@interix.com>Ian Lance Taylor1-7/+21
* ldlang.c (section_already_linked): Use comdat information if it is available.
1999-09-12 * ldlang.c (open_output): Change local variable desired_endianIan Lance Taylor1-1/+1
from int to enum bfd_endian.
1999-08-09 From Wally Iimura <iimura@microunity.com>:Ian Lance Taylor1-5/+13
* ldlang.c (lang_size_sections): When checking whether an address is within a region, don't get confused by wrapping around at the end of the address space.
1999-08-09 * ldlang.c (wild_doit): Update for renaming of SEC_SHORT toIan Lance Taylor1-3/+3
SEC_SMALL_DATA.
1999-07-20 * ldlang.c (lang_gc_sections): Only handle the start symbolDoug Evans1-6/+9
specially if there is one.
1999-07-19Improve selection of output formatNick Clifton1-35/+228
1999-07-14 * ldlang.c (wild_doit): Copy SEC_SHORT to output section.Richard Henderson1-0/+4
1999-07-11 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1-7/+7
as appropriate. Fill in structure initializations.
1999-07-02 * ldlang.c: Revert change of 1999-06-23.Ian Lance Taylor1-5/+17
1999-06-22 * ldlang.c (section_already_linked): Only discard link onceIan Lance Taylor1-0/+5
sections if we are building constructors.