aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
AgeCommit message (Collapse)AuthorFilesLines
1994-01-06 * ld.h (QUAD_SIZE): Define.Ian Lance Taylor1-6/+8
* ldgram.y (QUAD): New token. (length): Handle it. * ldlex.l: Return QUAD. * lexsup.c (keywords): Add QUAD. * ldwrite.c (build_link_order): Handle QUAD. * ldlang.c (print_data_statement): Handle QUAD. (lang_size_sections): Likewise. (lang_do_assignments): Likewise. * ldexp.c (exp_print_token): Add QUAD to table. * ld.texinfo: Describe QUAD.
1993-12-30 A major rewrite to move the bulk of the linker into BFD so thatIan Lance Taylor1-27/+29
more efficient backend code can be written for specific object files. * lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h, ldwarn.c, ldwarn.h, relax.c, relax.h: Removed. * ldctor.c, ldctor.h: Complete rewrite. * ldwrite.c, ldwrite.h: Complete rewrite. * ld.h (strip_symbols_type, strip_symbols): Removed. Use link_info.strip instead. Changed all uses. (discard_locals_type, discard_locals): Removed. Use link_info.discard instead. Changed all uses. (ld_config_type): Removed relocateable_output field; use link_info.relocateable instead; changed all uses. Added stats field. (set_asymbol_chain, get_asymbol_chain, get_loader_symbol, set_loader_symbol): Removed. * ldexp.h (node_class): Added etree_rel. (etree_type): Added rel field. * ldexp.c (exp_print_token): Bracketed table initialization. (exp_relop): New function. (fold_name): Use linker hash table rather than ldsym functions. (exp_fold_tree): Likewise. Also, handle etree_rel case. (exp_print_tree): Handle etree_rel. * ldgram.y (strip_symbols, discard_locals): Removed. (OPTION_stats, OPTION_no_keep_memory): New tokens. Handle them. (REL): New token. Does not appear in grammar, but needed for expression code. (file): Don't call lang_final; it's called by main anyhow. * ldlex.l: Accept -stats and -no-keep-memory options. * ldlang.h (fill_type): Make unsigned int, not unsigned short. * ldlang.c: Consistently use fill_type for fill argument. (lang_init_script_file, script_file): Removed. (create_object_symbols): Removed. Use link_info.create_object_symbols_section instead. Changed all uses. (lang_add_keepsyms_file): Removed. (lookup_name): Call bfd_link_add_symbols instead of ldmain_open_file_read_symbol. (wild): Don't iterate over script_file. (open_output): Create link hash table. (lang_place_undefineds): Rewrote. (lang_size_sections): Handle relaxing (doesn't work yet). (lang_relocate_globals): Removed. (lang_finish): Use link hash table rather than ldsym functions. (lang_common): Rewrote. (lang_one_common): New function. (ldlang_add_file): Add file to link_info.input_bfds list. Set usrdata. (create_symbol): Removed. (lang_process): Don't call lang_init_script_file. Call ldctor_build_sets rather than find_constructors. Don't call lang_relocate_globals. (lang_abs_symbol_at_beginning_of): Rewrote. (lang_abs_symbol_at_end_of): Rewrote. * ldmain.c (had_y): Removed. (lprefix, lprefix_len): Removed; use link_info fields instead. Changed all uses. (multiple_def_count, commons_pending, undefined_global_sym_count, total_symbols_seen, total_files_seen): Removed. (link_callbacks, link_info): New variables. (main): Initialize link_info. Don't call init_bfd_error_vector or ldsym_init. Don't set now unused variables. Handle -stats. (get_emulation): Removed obsolete and nonfunctional GNU960 code. (add_ysym): Rewrote. (read_entry_symbols, refize, enter_global_ref, enter_file_symbols, search_library, gnu960_check_format, decode_library_subfile, linear_library, symdef_library, clear_syms, subfile_wanted_p): Removed. (add_keepsyms_file, add_archive_element, multiple_definition, multiple_common, add_to_set, warning_callback, undefined_symbol, reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym): New functions. * ldmisc.c (vfinfo): Accept a string for %T, not a symbol. Don't require symbols for %C; look them up instead. * emultempl/hppaosf.em: Pass link_info to hppa_look_for_stubs_in_section. * Makefile.in: Rebuilt dependencies. (CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and relax.c. (HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and relax.h. (EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h, ldlang.h and ldctor.h. * Makefile.in (ldlex.c): Don't depend on ldgram.h. Remove declarations of free and malloc from flex output. Change malloc to ldmalloc in flex output.
1993-12-11 Made many changes to eliminate gcc warnings. Made variousIan Lance Taylor1-27/+5
cosmetic changes, declared various things in header files, removed various extern declarations from .c files. No substantive changes.
1993-12-01 * ldgram.y (OPTION_call_shared, OPTION_non_shared): New tokens.Ian Lance Taylor1-11/+51
(command_line_option): Accept and ignore them (for now). * ldlex.l (<COMMAND>): Handle -non_shared and -call_shared.
1993-07-16 * ldgram.y (OPTION_Lfile): New token.Ian Lance Taylor1-4/+8
(command_line_option): Accept OPTION_L NAME (whitespace after -L). * ldlex.l (<COMMAND>): Accept -L without FILENAME.
1993-07-15source cleanups; fix finding scriptsDavid MacKenzie1-3/+2
1993-07-08 * Make -v only print the version number.David MacKenzie1-10/+24
Share some Texinfo documentation with BFD.
1993-06-17 * ldgram.y: Tweak grammar to make reporting of invalid options work.David MacKenzie1-4/+7
1993-06-17 * ldfile.c (ldfile_open_command): Don't try .ld extension.David MacKenzie1-9/+30
It wasn't documented (or likely used) and wastes time. (try_open): If EXTEN is empty, don't try it. * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c, ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c, ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls with normal function declarations. * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh. Move *.sc-sh to scripttempl/*.sc. * {emultempl,emulparams,scripttempl}/README: New files. * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files removed, replaced with generic.em. * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from h8[35]00hms.s[ch]. Change their contents to omit the "hms". * *.em (*_get_script): Return script name instead of script contents. * ldlang.c (lang_process): Change caller. * ldlex.l, ldgram.y: Recognize -m option. Check for input files after *all* options in grammar. * ldmain.c (main): Check for -m options. Add default directory for -m. * mkscript.c: File removed. * genscripts.sh: Take two more parameters, tooldirlib and libdir, to add to the default LIB_PATH. Look for input files in the new subdirectories. Create the scripts in emulations subdirectory and don't filter them through mkscript. * configure.in: Make the emulations subdirectory. * Makefile.in: Account for all of the above changes. Remove unused .SUFFIXES. Get libgcc.a path with gcc -print-libgcc-file-name instead of $(libdir)/libgcc.a. Put CFLAGS last in the compilation rules. Add -I../bfd to INCLUDES so sysdep.h is found. * ldfile.c (try_open): If opening without the extension fails, try with the extension even if -v or -V was given. had_script is imported (from ldgram.y), not exported.
1993-03-30 Support for linking and loading at different places:Steve Chamberlain1-34/+55
* ldlex.l: Add "AT" keyword. * ldgram.y: Cleanup, and parse AT. * ldlang.c (print_output_section_statement): Print output address of section in map. (lang_size_sections): Fill sections' lma with load address. * ldlang.h (lang_output_section_statement_type): Add load_base information.
1993-01-08 Fix support for NOLOAD, add INCLUDESteve Chamberlain1-40/+44
* ldfile.c (ldfile_open_command_file): pass file name to lex_push_file. * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD * ldlang.c (wild_doit): make output sections inherit NEVER_LOAD attribute.
1992-08-07 * ldlang.h: add new field "loadable" to output_section_statement.Steve Chamberlain1-7/+9
* ldlang.c (lang_output_section_statement_lookup): initilize new field. (wild_doit): if new field is not set, then stop output section from being loadable. (lang_enter_output_section_statement): set the field from the NOLOAD keyword * ldgram.y: new synax for NOLOAD. Removes a shift/reduce too. * h8300hms.sc-sh, h8300hms.em: get -r right.
1992-05-02 * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS andSteve Chamberlain1-10/+24
PUBLIC. * Makefile.in: now use flex, not lex
1992-04-15Strange link script supportSteve Chamberlain1-8/+20
1992-04-15Personal checkpoint - now should parse some MRI stuffSteve Chamberlain1-71/+132
1992-04-05New lexer.Steve Chamberlain1-48/+50
New targets for h8/300 simulator and DOS
1992-03-02Modifed to care about semi colons again, newlines are ignored - sorrySteve Chamberlain1-23/+16
Per.
1992-01-28 * ldgram.y: map -M behave in the same way as -Map (sets file nameSteve Chamberlain1-5/+2
to be "-". * ldsym.c, ldlang.c: remember that size of a section is dependent on whether or not relaxing has been done. * ldmain.c: don't open a map file if it doesn't have a name * relax.c: all the brains have moved into bfd. * ldwrite.c: ammend comment
1992-01-24 * Makefile.in: added relax, also made three stage go through aSteve Chamberlain1-2/+9
partial link stage. * relax.c : added * config.h: if GNU960 defined, then default emulation mode is GLD960 * ldexp.h, ldexp.c: map to file hooks * ldlang.c: map to file hooks * ldgram.y: added -Map -relax * ldlex.l: added -relax, -Map * ldmain.c: open map file * ldmisc.c: support for map file * ldwrite.c: new relax magic
1992-01-24Merging from VMS port. Doc to follow..Steve Chamberlain1-15/+39
1991-10-11Include bfd.h before sysdep.h, so ansidecl and PROTO() get defined first.John Gilmore1-16/+38
1991-05-18*** empty log message ***Steve Chamberlain1-1/+1
1991-05-07Fixed the shift reduce errors in the grammer using the yacc debugger.Steve Chamberlain1-22/+23
Removed some lint highlighted by the same.
1991-05-03*** empty log message ***Steve Chamberlain1-1/+4
1991-04-24Added the sizeof_headers keyword.Steve Chamberlain1-1/+3
1991-04-23*** empty log message ***Steve Chamberlain1-11/+9
1991-04-19Yet more diffs due to my incompetence.Steve Chamberlain1-13/+7
1991-04-18Fixed some bugs.Steve Chamberlain1-2/+6
1991-04-17Moved declarations from header file into here.Steve Chamberlain1-1/+2
1991-04-17Added support for OUTPUT_FORMAT(name) and FORCE_COMMON_ALLOCATIONSteve Chamberlain1-3/+9
1991-04-16*** empty log message ***Steve Chamberlain1-2/+1
1991-04-14checkpoint before a mergeSteve Chamberlain1-56/+84
1991-04-09*** empty log message ***Steve Chamberlain1-23/+0
1991-04-08*** empty log message ***Steve Chamberlain1-5/+8
1991-04-03Fixed some grammer ambiguitiesSteve Chamberlain1-62/+39
Better error reporting sun3 support
1991-03-21Initial revisionDavid Henkel-Wallace1-0/+693