directory searching code into gld${EMULATION_NAME}_search_dir.
(gld${EMULATION_NAME}_search_dir): New static function, extracted
from gld${EMULATION_NAME}_find_so.
(global_needed, global_found): New static variables.
(gld${EMULATION_NAME}_after_open): New static function.
(gld${EMULATION_NAME}_search_needed): New static function.
(gld${EMULATION_NAME}_try_needed): New static function.
(gld${EMULATION_NAME}_check_needed): New static function.
(ld_${EMULATION_NAME}_emulation): Use new after_open function.
* ld.texinfo, ld.1: Mention -rpath-link on SunOS.
(rs6000-*-aix*): New target; use aixrs6.
* emulparams/aixppc.sh, emulparams/aixrs6.sh: New files.
* emultempl/aix.em: New file.
* scripttempl/aix.sc: New file.
* Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
(eaixppc.c, eaixrs6.c): New targets.
* ldexp.h (exp_get_abs_int): Update declaration.
* ldlang.c (print_output_section_statement): Use fprintf_vma to
print return value of exp_get_abs_int.
PR 8142.
(gld${EMULATION_NAME}_try_needed): Call stat_needed to make sure
that the file has not already been included under another name.
(gld${EMULATION_NAME}_stat_needed): New static function.
pure-text. Pass true, not 1, to lang_add_entry.
* emultempl/sunos.em (find_assign): New static variable.
(found_assign): New static variable.
(gld${EMULATION_NAME}_before_allocation): Rename local h to hdyn.
If not a relocateable link, and no start symbol was specified on
the command line, and there are any undefined symbols, set
link_info.shared. If link_info.shared is set, set the address of
the .text section to 0x20.
(gld${EMULATION_NAME}_find_assignment): Rename from
gld${EMULATION_NAME}_find_statement_assignment. If find_assign is
set, then just set found_assign based on whether an assignment is
found to find_assign.
(gld${EMULATION_NAME}_get_script): Don't use a special script when
producing a shared library.
* emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Remove.
* scripttempl/aout.sc: Remove CREATE_SHLIB tests.
* ldlang.c (entry_from_cmdline): New global variable.
(lang_add_entry): Change cmdline parameter from int to boolean.
Use global entry_from_cmdline rather than function static
from_cmdline.
* ldlang.h (entry_from_cmdline): Declare.
(lang_add_entry): Change declaration of second parameter from int
to boolean.
* ldgram.y: Pass false, not 0, to lang_add_entry.
* ldlex.h (lex_string): Declare.
* ldlex.l (lex_string): Define.
* lexsup.c (parsing_defsym): Define.
(parse_args): In OPTION_DEFSYM case, set lex_string before calling
lex_redirect, and clear it after calling yyparse. Set
parsing_defsym around call to yyparse.
* ldmain.c (main): Set lex_string before calling lex_redirect, and
clear it after calling yyparse.
* ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
in linker scripts correctly.
PR 8092.
* emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define.
* emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the
shared library script when appropriate.
* scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text
section at SIZEOF_HEADERS.
(warning_callback): Add new parameter symbol. Call
warning_find_reloc to try to find the section and VMA.
(warning_find_reloc): New static function.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Pass NULL as symbol parameter to warning callback.
* configure.tgt: Add i386lelf to targ_extra_emuls for
i[345]86-*-linuxaout* and i[345]86-*-linuxoldld. For
i[345]86-*-linux*, set targ_emul to i386lelf, and add elf_i386 to
targ_extra_emuls.
* emulparams/i386lelf.sh: New file, a copy of elf_i386.sh.
* emultempl/elf32.em: If TARGET_IS_i386lelf, use autoconf
recommended mechanism to define DIR and struct dirent.
(libcmp): New static function use only when TARGET_IS_i386lelf.
(gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
* Makefile.in (ALL_EMULATIONS): Add ei386lelf.o
(ei386lelf.c): New target.
* configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
Check for config.h:config.in when creating stamp-h.
* configure: Rebuild.
* Makefile.in (stamp-h): Depend upon config.in rather than
config.h.in. Set CONFIG_HEADERS to config.h:config.in when
calling config.status.
* configure.host: New file.
* configure.tgt: New file.
* aclocal.m4: New file.
* configure: New file, built by autoconf.
* acconfig.h: New file.
* config.h.in: New file, built by autoheader.
* sysdep.h: New file.
* ld.h: Incorporate old contents of config.h.
* config.h: Remove.
* Makefile.in: Various changes for new configure script. Also:
(CC_FOR_BUILD): Remove.
(ldmain.o): Don't bother to ensure that EMUL is non-empty.
(dep.sed): Use @SRCDIR@, not @srcdir@.
* dep-in.sed: Use @SRCDIR@, not @srcdir@.
* genscripts.sh: Create ldscripts if it does not exist.
* ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
* mpw-esh.c, emultemp/*.em: Likewise.
* ldmain.c: Likewise. Include <ctype.h>. Don't try to set
HAVE_SBRK here.
* config/*.mt, config/*.mh: Remove.
parameters.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Change call to warning accordingly.
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If not
relocateable and not shared, put .gnu.warning.SYMBOL sections into
the .text section.