summaryrefslogtreecommitdiff
path: root/ld/ldgram.y
Commit message (Collapse)AuthorAgeFilesLines
...
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-26/+26
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * ldgram.y (memory_spec): Provide empty action.Alan Modra2002-10-111-3/+4
| | | | (section <NAME>): Likewise.
* * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.Richard Sandiford2002-05-071-3/+4
| | | | | | | | | | | | | | | | | | | | (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.
* * arparse.y: Fix syntax warning.Thiemo Seufer2002-04-171-0/+1
| | | | * ldgram.y: Fix syntax warning.
* Support arbitrary length fill patterns.Alan Modra2002-02-151-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | | | * 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.
* * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.Jakub Jelinek2002-02-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens. (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp). * ldexp.c (exp_data_seg): New variable. (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END. (fold_binary): Handle DATA_SEGMENT_ALIGN. (exp_fold_tree): Handle DATA_SEGMENT_END. Pass allocation_done when recursing instead of hardcoding lang_allocating_phase_enum. * ldexp.h (exp_data_seg): New. * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections. (lang_size_sections): New. * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document. * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END if COMMONPAGESIZE is defined. * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K. * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K. * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K. * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K. * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared libraries only.
* * ldgram.y (vers_node): Support anonymous version tags.Jakub Jelinek2001-12-181-1/+5
| | | | | | | | | * ldlang.c (lang_register_vers_node): Ensure anonymous version tag is not defined together with non-anonymous versions. * ld.texinfo: Document it. * elflink.h (size_dynamic_sections): Skip anonymous version tag. (elf_link_assign_sym_version): Don't count anonymous version tag.
* * ldgram.y (mri_script_command): Surround processing of INCLUDEAlan Modra2001-10-201-2/+6
| | | | | | | | | | | with ldlex_script, ldlex_popstate. (ifile_p1): Likewise. * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the correct slot. (lex_push_file): Save current lineno to lineno_stack. Set lineno to 1. Don't BEGIN(SCRIPT). (lex_redirect): Similarly. * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
* From John Reiser <jreiser@BitWagon.com>Alan Modra2001-09-291-0/+3
| | | | | | | | | | * ldlang.c (lang_common): Conditionally inhibit Common allocation. * lexsup.c: Add --no-define-common commandline option. * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command. * ldlex.l: Likewise. * ld.h: Add command_line.inhibit_common_definition. * ldmain.c (main): Initialize. * ld.texinfo: Document.
* Fix for ldTom Rix2001-08-151-1/+1
|
* Make --verbose always display linker scriptNick Clifton2001-08-121-1/+1
|
* * ld.texinfo (Input Section Basics): Clarify ordering of outputAlan Modra2001-08-031-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * ldgram.y: Fix typo.Alan Modra2001-05-071-3/+3
|
* Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton2001-03-131-1/+1
|
* 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
* tic54x/ibmc54xdsp target for ld.Timothy Wall2000-06-201-1/+3
|
* 2000-06-05 Michael Matz <matz@ifh.de>H.J. Lu2000-06-051-0/+1
| | | | | | | * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in version scripts. * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
* * ldgram.y (exclude_name_list): Don't require a comma to separateJim Blandy2000-02-291-2/+2
| | | | | | | list entries; the lexer considers commas to be valid part of a filename, so in something like `foo, bar' the comma is considered part of the first filename, `foo,'. * ld.texinfo: Update section on EXCLUDE_FILE lists.
* Add LMA memory region functionality.Timothy Wall2000-02-161-4/+10
|
* * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.Catherine Moore2000-01-051-9/+32
| | | | | | | | | | | | (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-9/+18
| | | | | | | | | 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/+1094