aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
AgeCommit message (Collapse)AuthorFilesLines
1995-12-19 * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only setIan Lance Taylor1-4/+30
relocateable before calling ldctor_build_sets if the output file is in an XCOFF format.
1995-11-09 * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): AddIan Lance Taylor1-1/+108
new local variable special_sections, and pass it to size_dynamic_sections. Look through the results, and move the sections around in the mapping so that they are defined correctly.
1995-11-01 * emultempl/aix.em: Include ldgram.h.Ian Lance Taylor1-1/+51
(gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on AIX 4.1. * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
1995-10-31really make import_file staticIan Lance Taylor1-1/+1
1995-10-31 * emultempl/aix.em (export_files): Remove.Ian Lance Taylor1-30/+63
(import_files): Make static. (struct export_symbol_list): Define. (export_symbols): New static variable. (gld${EMULATION_NAME}_parse_args): Handle an initial -b option correctly. Call read_file for an export file. (gld${EMULATION_NAME}_before_allocation): Call bfd_xcoff_export_symbol for each export symbol, rather than calling read_file for each export file. (gld${EMULATION_NAME}_read_file): For an export file, make the exported symbols undefined, and store them on the export_symbols list.
1995-10-28Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-11/+27
* emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Don't hang if last option is unrecognised. (gld_${EMULATION_NAME}_set_symbols): Insert created symbols into ABS output section.
1995-10-27 * emultempl/aix.em: Include ldctor.h.Ian Lance Taylor1-1/+124
(gld${EMULATION_NAME}_after_open): New static function. (gld${EMULATION_NAME}_before_allocation): Call find_relocs. (gld${EMULATION_NAME}_find_relocs): New static function. (gld${EMULATION_NAME}_find_exp_assignment): New static function. (ld_${EMULATION_NAME}_emulation): Use new after_open function. * scripttempl/aix.sc: Use CONSTRUCTORS in .data. * ldctor.c (struct set_info): Move definition into ldctor.h. (struct set_element): Likewise. (sets): Make non-static. (ldctor_add_set_entry): Add name parameter. Save it in the new set element. (ldctor_build_sets): Avoid being called twice. Pass set element name to lang_add_reloc. * ldctor.h (struct set_info): Move definition here from ldctor.c. (struct set_element): Likewise. Add new field name. (sets): Declare. (ldctor_add_set_entry): Declare new name parameter. * ldwrite.c (build_link_order): Don't insist that either name or section be NULL in a lang_reloc_statement. * ldmain.c (add_to_set): Pass NULL to ldctor_add_new_set_entry for new name parameter. (constructor_callback): Pass name to ldctor_add_new_set_entry for new name parameter.
1995-10-27 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): TreatIan Lance Taylor1-0/+1
-static as a synonym for -bnso.
1995-10-25tweak option handlingIan Lance Taylor1-0/+4
1995-10-25 * emultempl/aix.em: Add support for various AIX linker options,Ian Lance Taylor1-0/+665
for AIX import and export files, and for AIX shared objects. * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC.
1995-10-17 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): MoveIan Lance Taylor1-122/+497
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.
1995-10-16 * configure.tgt (powerpc-*-aix*): New target; use aixppc.Ian Lance Taylor1-0/+1
(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.
1995-10-07 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don'tIan Lance Taylor1-0/+4
bother searching for needed libraries unless doing a final link.
1995-10-02 * emultempl/elf32.em (global_stat): New file static variable.Ian Lance Taylor1-4/+52
(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.
1995-09-28 * lexsup.c (parse_args): Handle -assert.Ian Lance Taylor1-1/+5
* 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.
1995-09-11Revert Linux directory searching: it turns out that Linux no longerIan Lance Taylor1-134/+0
uses it.
1995-09-08 Add Linux style directory searching.Ian Lance Taylor1-6/+179
* 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.
1995-09-08 * configure.in: Call AC_HEADER_DIRENT.Ian Lance Taylor1-12/+20
* configure, config.in: Rebuild. * emultempl/sunos.em: Use autoconf recommend mechanism to define DIR and struct dirent.
1995-09-06 * configure.in: Rewrite to use autoconf.Ian Lance Taylor1-1/+0
* 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.
1995-08-31Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-0/+486
* ldemul.c (ldemul_parse_args): New. * ldemul.h (ld_emulation_xfer_struct): Add parse_args. * lexsup.c (all pe stuff): Moved into pe.em (parse_args): Call emulation arg parser. * emultempl/pe.em (parse_args): handle PE specfic args.
1995-08-17Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain3-463/+1
* emultempl/{armpe.sc, i386pe.sc}: Deleted. * emultempl/pe.sc: New file performs generic PE support and sorts archive members. * emulparams/{armpe.sh,i386pe.sh}: Use new file. * scripttempl/{armpe.sc, i386pe.sc}: Deleted * scripttempl/pe.sc: New. * Makefile.in: Use new files. b
1995-07-07fsf address update, but not in COPYING filesKen Raeburn5-12/+26
1995-07-04 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):Ian Lance Taylor1-2/+20
Handle etree_provide. PR 7164.
1995-07-04 * emultempl/elf32.em (global_needed): New static variable.Ian Lance Taylor1-22/+225
(global_found): Likewise. (gld${EMULATION_NAME}_after_open): New static function. (gld${EMULATION_NAME}_search_needed): Likewise. (gld${EMULATION_NAME}_try_needed): Likewise. (gld${EMULATION_NAME}_check_needed): Likewise. (ld_${EMULATION_NAME}_emulation): Replace after_open_default with gld${EMULATION_NAME}_after_open. PR 7083.
1995-06-29Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain3-1/+233
* ldmain.c (main): Always initialize PE info in link_info. * lexsup.c (OPTION_BASE_FILE): New option. (parse_args): Handle new option. * emulparams/armpe.sh: Output pei. * emultempl/i386pe.em: Add newline to end. * scripttempl/armpe.sc: Change output and quote the $s. * scripttempl/i386pe.sc: Change output and quote the $s.
1995-05-12Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain2-1/+232
Tom Griest <griest@cs.yale.edu> Initial support for PE executables (eg NT, win32) * Makefile.in (configure.in, ei386pe): Add support. * ldmain.c (main): Initialize PE argument info. * ldwrite.c (print_file_stuff): Don't print out .drectve and .debug section info. * lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP, OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap): Handle new arguments. * config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc: New files
1995-01-27 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):Ian Lance Taylor1-1/+0
Remove unused variable is.
1995-01-24update copyrightsIan Lance Taylor1-1/+49
1994-12-02 * emultempl/miposecoff.em: New file.Ian Lance Taylor2-0/+231
* emulparams/mipsidt.sh (TEMPLATE_NAME): Set to mipsecoff. * emulparams/mipsidtl.sh (TEMPLATE_NAME): Likewise. * scripttempl/mips.sc: Put .rel.sdata sections in .text, and provide __runtime_reloc_start and __runtime_reloc_stop if they are used. Align _fdata to a 16 byte boundary. * Makefile.in (emipsidt.c): Depend upon mipsecoff.em rather than generic.em. (emipsidtl.c): Likewise. (check): Pass CC_FOR_HOST and CFLAGS_FOR_HOST to runtest.
1994-12-02 * ld.h (args_type): Add new field embedded_relocs.Ian Lance Taylor1-0/+1
* ldemul.h (ldemul_after_open, after_open_default): Declare. (ld_emulation_xfer_struct): Add new field after_open. * ldemul.c (ldemul_after_open): New function. (after_open_default): New function. * ldlang.c (lang_process): Call ldemul_after_open. * lexsup.c (parse_args): Handle --embedded-relocs. * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Initialize new after_open field to after_open_default. * emultempl/generic.em, emultempl/gld960.em: Likewise. * emultempl/gld960c.em, emultempl/hppaelf.em: Likewise. * emultempl/linux.em, emultempl/m88kbcs.em: Likewise. * emultempl/sunos.em, emultempl/vanilla.em: Likewise. * ld.texinfo, ld.1: Mention -embedded-relocs.
1994-11-12 * ld.h (args_type): Add field export_dynamic.Ian Lance Taylor1-3/+216
* lexsup.c (parse_args): Recognize --export-dynamic. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Pass export_dynamic argument to bfd_elf32_size_dynamic_sections.
1994-06-16Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)Ian Lance Taylor2-0/+156
* emultempl/linux.em: New file providing support for linking against Linux shared libraries. * config/i386-linux.mt (ei386linux.c): Depend upon linux.em. * emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
1994-06-15Comment fix.Ian Lance Taylor1-1/+1
1994-06-15 Let the user change the dynamic linker used by ELF code.Ian Lance Taylor1-1/+12
* ld.h (args_type): Add new field interpreter. * lexsup.c (parse_args): Add dynamic-linker to longopts, and handle it. * ldmain.c (main): Initialize command_line.interpreter to NULL. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get the ELF backend to return the .interp section. If command_line.interpreter is not NULL, set the contents of .interp to it. * ld.texinfo: Mention -dynamic-linker.
1994-06-10 * emultempl/sunos.em: Only look for .so files if doing a dynamicIan Lance Taylor1-1/+2
link.
1994-06-02Correct handling of .sa file.Ian Lance Taylor1-2/+5
1994-06-02 Add support for SunOS shared libraries.Ian Lance Taylor2-0/+565
* aout.sc: Don't define __DYNAMIC here. Add new sections used by shared library support code. * emultempl/sunos.em: New file. * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos. * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
1994-05-27changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs)Ken Raeburn2-0/+5
1994-05-19 Add support for ELF shared libraries.Ian Lance Taylor2-0/+197
* ld.h (ld_config_type): Add field dynamic_link. * ldmain.c (main): Initialize config.dynamic_link to false. Warn on attempts to use -r with -relax, -call_shared or -s. * lexsup.c (longopts): Separate OPTION_CALL_SHARED from OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values accordingly. Add "dy" and "non_shared" options. Change "Qy" to OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and OPTION_NON_SHARED by setting dynamic_link field accordingly. Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for -r and -Ur. * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try opening a file with a .so extension first. * emultempl/elf32.em: New file. * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000. (NONPAGED_TEXT_START_ADDR): Likewise. (TEMPLATE_NAME): Define as elf32. (DATA_PLT): Define. * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32. * scripttempl/elf.sc: Add placement for new dynamic sections. Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end outside of any section. Don't use ALIGN(8); just let one section VMA follow another. Put .dynbss in .bss. Don't mention debugging sections; they'll be handled correctly anyhow. * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
1994-05-08keep gld960c.emKen Raeburn1-0/+1
1994-05-06* emultempl/generic.em: Use "e" rather than "em_" as prefix for filename.Ken Raeburn1-4/+4
* emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em, emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em: Ditto. * Makefile.in: Changed all generated file names. (ldemul-list.h): Depend on Makefile, not config.status. Changed sed patterns to handle new filenames.
1994-03-12Remove ppc.em; do it all in nlmconv instead.Ian Lance Taylor2-374/+0
1994-02-28 * emultempl/hppaelf.em: Include elf32-hppa.h.Jeff Law1-4/+1
(file_chain): Add decl. (hppa_look_for_stubs_in_section): Delete decl. (hppaelf_finish): Reenable code. Do not pass symbols down to hppa_look_for_stubs_in_section.
1994-02-26 * emultempl/hppaelf.em: First attempt to clean this file up.Jeff Law1-81/+147
Add comments in several functions as to their purpose and how they function (or my current best guess). Clean up horrible spacing and indention that never should have been accepted in the first place. Add FIXMEs for issues which need to be resolved. Disable linker-stub generation until it gets fixed. This allows the linker to at least work on simple code for testing purposes.
1994-02-25 * ldlang.c (lang_size_sections): No longer static (PA ELF callsJeff Law1-0/+5
it via hppaelf_finish). Prototype moved into ldlang.h. (lang_process): Move problematic extra call to lang_size_sections into the PA ELF specific code. * emultempl/hppaelf.em (hppaelf_finish): Extra call to lang_size_sections moved here.
1994-02-25Make correspond to djm's last change.Ian Lance Taylor1-2/+2
1994-02-25 * configure.in (powerpc-*-elf*): New target; use ppc-elf32.Ian Lance Taylor2-0/+374
* config/ppc-elf32.mt: New file. * emulparams/elf32ppc.sh: New file. * emultempl/ppc.em: New file. * Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o. (em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc. (EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
1994-02-25 Use getopt instead of lex and yacc to parse the command line.David MacKenzie2-22/+22
* 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.
1994-02-08Oops.Jeff Law1-1/+1
1994-02-08Renamed hppaosf.em to hppaelf.emJeff Law1-0/+0