summaryrefslogtreecommitdiff
path: root/ld/ldlang.h
Commit message (Collapse)AuthorAgeFilesLines
* * ldfile.h (struct search_dirs): Added sysrooted field.Alexandre Oliva2003-03-031-0/+6
| | | | | | | | | | | | | | | | * ldlang.h (struct lang_input_statement_struct): Likewise. * ldfile.c (ldfile_add_library_path): Mark sysrooted paths. (ldfile_open_file_search): Look for sysrooted filename starting with / in ld_sysroot instead of in the current directory. Clear sysrooted flag if it's found in the current directory. Set it from the search directory's sysrooted flag where it is found otherwise. * ldlang.c (ldlang_sysrooted_script): New static variable. (new_afile): Mark search_file_enums as sysrooted if ldlang_sysrooted_script. (load_symbols): Set ldlang_sysrooted_script according to the script's sysrooted field while processing it. * ld.texinfo: Document INPUT behavior in sysroot.
* Disable region size checking whilst relaxing sections.Nick Clifton2003-02-211-2/+2
|
* * ldlang.h: Formatting.Alan Modra2002-12-081-48/+81
|
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-24/+24
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts ifJakub Jelinek2002-10-101-0/+1
| | | | | | | they have OUTPUT_FORMAT not matching actual output format. * ldlang.c (lang_get_output_target): New function. (open_output): Use it. * ldlang.h (lang_get_output_target): New prototype.
* 2002-10-08 H.J. Lu <hjl@gnu.org>H.J. Lu2002-10-081-1/+0
| | | | | | | * ldlang.c (lang_file_exist): Removed. (new_afile): Revert the last change. * ldlang.h (lang_file_exist): Removed. * lexsup.c (parse_args): Revert the last change.
* Abort if the filename to be added matches the linker output filename.Nick Clifton2002-10-071-0/+1
|
* * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.Alan Modra2002-07-011-1/+1
| | | | | | | | | | | | | | | | | | * ldlang.c (entry_sym): Likewise. (ldlang_undef_chain_list_type): Likewise. (lang_finish): Adjust references to entry_symbol. (lang_add_entry): Likewise. (lang_gc_sections): Use link_info.gc_sym_list. (lang_process): Set link_info.gc_sym_list. * ldlex.l: Include bfdlink.h. * ldmain.c (main): Init link_info.gc_sym_list. * emultempl/aix.em: Adjust references to entry_symbol. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/ppc64elf.em (ppc_after_open): New function. (LDEMUL_AFTER_OPEN): Define. * emulparams/elf64ppc.sh: KEEP .opd sections.
* * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.Richard Sandiford2002-05-071-3/+9
| | | | | | | | | | | | | | | | | | | | (lang_enter_overlay): Remove the last two parameters. (lang_leave_overlay): Take them here instead. * ldgram.y (memspec_at_opt): Set $$ to null if no region is given. (section): Pass LMA and crossref flag to lang_leave_overlay rather than lang_enter_overlay. * ldlang.c (lang_memory_region_lookup): Return null for null names. (lang_output_section_statement_lookup): Initialize update_dot_tree. (lang_size_sections_1): Evaluate it. (lang_leave_output_section_statement): Rework LMA lookup. (overlay_lma, overlay_nocrossrefs): Remove. (lang_enter_overlay): Remove LMA and corssref arguments. (lang_enter_overlay_section): Don't set the LMA here. (lang_leave_overlay): Take LMA and crossref arguments. Move the '.' assignment to the last section's update_dot_tree. Unconditionally use the load and run-time regions specified in the OVERLAY statement. Likewise the first section's LMA. Only set the other sections' LMAs when no load region is given.
* Support arbitrary length fill patterns.Alan Modra2002-02-151-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ldexp.h (etree_value_type): Add "str" field. (union etree_union): Add "str" to "value" struct. (exp_bigintop): Declare. (exp_get_fill): Declare. * ldexp.c: Include "safe-ctype.h". (exp_intop): Set value.str to NULL. (exp_bigintop): New function. (new_rel): Pass in "str", and set new.str from it. (new_rel_from_section): Set new.str to NULL. (fold_name): Adjust calls to new_rel. (exp_fold_tree): Likewise. (exp_get_fill): New function. * ldgram.y (struct big_int bigint, fill_type *fill): New. (INT): Returns a "bigint". Adjust all code handling INTs. (fill_opt): Returns a "fill". (fill_exp): Split out of fill_opt, use for FILL. * ldlang.h (struct _fill_type): New. (fill_type): Move typedef to ldexp.h. (lang_output_section_statement_type): "fill" is now a pointer. (lang_fill_statement_type): Likewise. (lang_padding_statement_type): Likewise. (lang_add_fill): Now takes a "fill_type *" param. (lang_leave_output_section_statement): Likewise. (lang_do_assignments): Likewise. (lang_size_sections): Likewise. (lang_leave_overlay_section): Likewise. (lang_leave_overlay): Likewise. * ldlang.c: Include ldgram.h after ldexp.h. (lang_output_section_statement_lookup): Adjust for fill_type change. (print_fill_statement): Likewise. (print_padding_statement): Likewise. (insert_pad): Now takes a "fill_type *" arg. (size_input_section): Likewise. (lang_size_sections_1): Likewise. (lang_size_sections): Likewise. (lang_do_assignments): Likewise. (lang_add_fill): Likewise. (lang_leave_output_section_statement): Likewise. (lang_leave_overlay_section): Likewise. (lang_leave_overlay): Likewise. Adjust all callers of the above function. * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers starting with "0X" as well as "0x". Return bigint.str for hex numbers starting with "0x" or "0X", zero bigint.str otherwise. Always use base 16 for numbers starting with "$". * ldmain.c: Include ldgram.h after ldexp.h. * ldwrite.c (build_link_order): Use bfd_data_link_order in place of bfd_fill_link_order. * pe-dll.c: Adjust lang_do_assignments calls. * emultempl/elf32.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust lang_add_assignment call. * emultempl/pe.em: Likewise.
* * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.Alan Modra2002-02-141-1/+1
| | | | | | | | * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern; the pattern in question is not a regexp. * ldlang.c: Likewise. * ldlang.h: Likewise. * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
* * ldlang.c (entry_section): New initialised variable.Alan Modra2002-02-101-0/+1
| | | | | | | (lang_finish): Use it. * ldlang.h (entry_section): Declare. * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set entry_section to ".opd".
* * ldlang.c (lang_reset_memory_regions): Rename fromHans-Peter Nilsson2002-02-051-2/+3
| | | | | | | reset_memory_regions. Change all callers. Make public. * ldlang.h (lang_reset_memory_regions): Prototype. * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call lang_reset_memory_regions before lang_size_sections.
* * ldlang.c: When traversing lang_statement_union_type lists,Alan Modra2001-08-201-1/+0
| | | | | | | | | 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.
* * ldlang.c (insert_pad): Make use of an existing pad statement ifAlan Modra2001-08-181-1/+1
| | | | | | | | | | | | | | | 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 *.
* (wild_doit): Rename to lang_add_section.Alan Modra2001-08-141-1/+1
|
* * ld.texinfo (Input Section Basics): Clarify ordering of outputAlan Modra2001-08-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton2001-03-131-1/+2
|
* Extend "ld --unique" functionality.Alan Modra2001-01-141-1/+13
|
* 2000-10-09 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-10-091-83/+59
| | | | | | | | | | | | | | | * 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-09-29 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-09-291-28/+22
| | | | | | | | | | | | | * deffile.h: Fix formatting. * ld.h: Likewise. * ldctor.h: Likewise. * ldemul.h: Likewise. * ldexp.h: Likewise. * ldfile.h: Likewise. * ldlang.h: Likewise. * lexsup.c: Likewise. * mri.c: Likewise. * pe-dll.c: Likewise.
* Remove some forward declarations in ldemul.h and ldfile.h, andAlan Modra2000-07-111-1/+1
| | | | | | re-arrange header include order. Fix shadowing warnings in ldlang.h Fix compile errors in mpw-elfmips.c
* place_orphan optimisationsAlan Modra2000-04-251-1/+2
|
* Add LMA memory region functionality.Timothy Wall2000-02-161-2/+5
|
* * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.Catherine Moore2000-01-051-3/+3
| | | | | | | | | | | | (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.
* This fixes ! to work as documented in a memory region attribute list.Ian Lance Taylor1999-06-121-2/+4
| | | | | | | | | From Thomas Zenker <thz@lennartz-electronic.de>: * ldgram.y (attributes_opt): Use attributes_list instead of NAME. (attributes_list, attributes_string): New nonterminals. * ldlang.c (lang_set_flags): Add invert parameter. Don't handle '!'. * ldlang.c (lang_set_flags): Update declaration.
* Initial revisionRichard Henderson1999-05-031-0/+490