Add a new script operator, PROVIDE, to define a symbol only if it
is needed.
* ldgram.y (PROVIDE): New token.
(assignment): Accept PROVIDE.
* ldlex.l (PROVIDE): New token.
* ldexp.h (node_type): Add etree_provide to node_class enum.
(exp_provide): Declare.
* ldexp.c (exp_fold_tree): Handle etree_provide.
(exp_provide): New function.
(exp_print_tree): Handle etree_provide.
* ld.texinfo: Document PROVIDE.
* 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.
* mpw-config.in: New file, MPW configuration fragment.
* mpw-build.in: New file, MPW build script fragment.
* mpw-make.in: New file, MPW makefile fragment.
(This file is semi-automatically generated from Makefile.in.)
* ldfile.c (slash): If MPW, set to `:'.
* ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
prevent redefinition errors.
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.
* ld.texinfo: new doc.
* ldgram.y, ldlex.l: understand -y<symbol>
* ldmain.c (Q_enter_file_symbols): if had -y, lookup symbol and
print info. (add_ysym): new function.
* ldsym.h: (ldsym_type): new define SYM_Y.
chars in filenames
* ldexp.c (exp_unop): pass down abs_output_section - now can have
unary -ve constants.
* ldlang.c (lang_finish): warn when an entry symbol supplied on
the command line can't be found.