Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
(CASE, EXTERN, START): New tokens.
(mri_script_command): Handle CASE, EXTERN, INCLUDE, START.
(casesymlist): New nonterminal.
(extern_name_list): New nonterminal.
* ldlex.l: Accept lower case trailing base specifiers. Don't
ignore the first digit when the base is a suffix. Accept many
EXPRESSION state tokens in MRI state. Support MRI continuation
lines and MRI semicolon comments. Accept all MRI keywords in
lower case. Add CASE, EXTERN, and START MRI keywords.
|
|
bfd_check_format_matches, and, if ambiguous, print a list of
matching formats. If file format is not recognized, treat file as
a linker script.
* ldgram.y (yyerror): If assuming an object file is a script,
mention that. Tweak the format of the error messages.
* ldlex.l (lex_warn_invalid): If assuming an object is a script,
guess that this is not actually a script, and just report that the
file format was not recognized.
* ld.texinfo (Options): Admit that -( may be used more than once.
Add note that unrecognized object files are now treated as linker
scripts.
* ldfile.c (ldfile_input_filename): Make const.
(ldfile_assumed_script): New variable.
(try_open): Change arguments types to const.
(ldfile_find_command_file): Likewise.
(ldfile_open_command_file): Likewise. Also, set lineno to 1.
* ldfile.h: Update declarations for ldfile.c changes.
* ldlex.l: Include <ctype.h>.
(file_name_stack): Change to be const char *.
(lineno_stack): New static variable.
(<<EOF>>): Set lineno as well as ldfile_input_filename.
(lex_push_file): Make name argument const. Initialize
lineno_stack entry.
(lex_redirect): Initialize lineno_stack entry.
(lex_warn_invalid): Handle non printable characters nicely.
* ldlex.h (lex_push_file): Declare second argument as const.
* ldgram.y (ifile_p1): Recognize GROUP.
* ldlex.l: Recognize GROUP.
* ld.texinfo (Option Commands): Document GROUP.
|
|
|
|
field.
(search_head): Declare.
(ldfile_add_library_path): Add new cmdline argument in prototype.
* ldfile.c (search_head): Make non-static.
(search_dirs_type): Move to ldfile.h.
(ldfile_add_library_path): Accept cmdline argument, and save it.
* lexsup.c (parse_args): Pass true for new cmdline argument of
ldfile_add_library_path.
(set_default_dirlist): Likewise.
* ldmain.c (check_for_scripts_dir): Pass false for new cmdline
argument of ldfile_add_library_path.
* ldgram.y (ifile_p1): Likewise.
|
|
(lang_add_entry): Add cmdline argument.
* ldlang.h (lang_add_entry): Change prototype.
* ldgram.y (statement_anywhere): Change lang_add_entry call.
* lexsup.c (parse_args): Likewise.
|
|
fill_opt to avoid an ambiguity when both are used.
* ld.texinfo: Changed accordingly.
|
|
* ldlex.h (input_type): Don't initialize enum constants to
particular values.
* ldlex.l: Use a switch to return the right token based on
input_type, rather than knowing that input_type has a value based
on a token type.
|
|
* lexsup.c: Include ldver.h.
* Makefile.in: Rebuilt dependencies.
|
|
|
|
* ld.texinfo (Options): Document changes to option syntax.
* Makefile.in: Update dependencies.
* ldver.c (help): Tweak dashes in usage message.
* ldgram.y (%union): Remove unused members.
Remove %tokens for command line options; add ones for input types.
(command_line): Rules removed.
(file): Instead of command line, recognize an
input type indicator, then use the nonterminal for that type.
(defsym_expr): New nonterminal from code formerly in command_line.
* ldlex.h: Declare parser input type enum and variable.
Don't declare parse_line.
* ldlex.l: Remove unused variables. Make some used ones static
and comment them.
(COMMAND): Start state and its rules removed.
At start of yylex, return input state token if at start of input.
(lex_redirect): Don't need to set yyout.
(ldlex_command): Function removed.
* ldmain.c (main): Instead of calling parse_line, set up the
redirections and call yyparse directly.
* ldmisc.c (vfinfo): If there's no input filename, print nothing, not
"command line".
* lexsup.c: Remove #if 0'd code.
(parse_line): Function removed.
(parse_args): Rewrite to use getopt_long_only.
(set_default_dirlist): New function from code formerly in
ldgram.y:command_line.
(set_section_start): New function.
* emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
compiled-in link scripts in "{" and "}", as the grammar no longer
wants them to be.
|
|
exit successfully instead of complaining if no input files are
given.
|
|
* 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.
|
|
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.
|
|
cosmetic changes, declared various things in header files, removed
various extern declarations from .c files. No substantive
changes.
|
|
(command_line_option): Accept and ignore them (for now).
* ldlex.l (<COMMAND>): Handle -non_shared and -call_shared.
|
|
(command_line_option): Accept OPTION_L NAME (whitespace after -L).
* ldlex.l (<COMMAND>): Accept -L without FILENAME.
|
|
|
|
Share some Texinfo documentation with BFD.
|
|
|
|
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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
PUBLIC.
* Makefile.in: now use flex, not lex
|
|
|
|
|
|
New targets for h8/300 simulator and DOS
|
|
Per.
|
|
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
|
|
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
|
|
|
|
|
|
|
|
Removed some lint highlighted by the same.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Better error reporting
sun3 support
|
|
|