aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
AgeCommit message (Collapse)AuthorFilesLines
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
1994-02-06remove cvs lossageDavid MacKenzie1-7/+1
1994-02-05 * emultempl/lnk960.em (append), emultempl/hppaosf.emDavid MacKenzie1-0/+6
(hppaosf_finish): Call xmalloc, not ldmalloc. * ldmain.c (preserve_output): Function removed. (main): Do it here instead.
1994-02-05 * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)Jeff Law1-33/+41
GNU C specific macros. * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining call to LANG_FOR_EACH_INPUT_SECTION.
1993-12-30 A major rewrite to move the bulk of the linker into BFD so thatIan Lance Taylor2-48/+23
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-17 * ldmain.c (lprefix): Change default from a char to a stringJeff Law2-2/+9
with only one character. (lprefix_len): Set default to one. * ldmain.h (lprefix_len): Declare. * ldsym.c (write_file_locals): Use strncmp rather than a character comparison for lprefix. * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len correctly. * emultmpl/hppaosf.em: Include ldexp.h. (before_parse): Set lprefix and lprefix_len correctly.
1993-11-02 * emultempl/hppaosf.em: Various fixes and support for linker stubJeff Law1-1/+171
generation. (hppaosf_finish, hppaosf_search_for_padding_statements, hppaosf_create_output_section_statements): New functions in support of linker stub generation. (ld_hppaosf_emulation): Redefine to include new emulation-specific routines.
1993-08-24From Peter Hoogenboom <hoogen@shafer.cs.utah.edu>:Ken Raeburn1-29/+1
* emultempl/hppaosf.em (ld_hppaosf_emulation): Correct name for PA ELF emulation is "elf32-hppa" not "elf-big". (hppaosf_before_parse): Remove unneeded processing of environment variables. * scripttempl/hppaosf.sc: Include .hppa_linker_stubs sections in .text segment of output file. * emulparams/hppaosf.sh (OUTPUT_FORMAT): Use elf32-hppa.
1993-08-04Keep m88kbcs.emSteve Chamberlain1-0/+1
1993-07-22move compile-in decision to genscripts.shDavid MacKenzie2-2/+2
1993-07-22The default script is now compiled in; the others are still in the filesystem.David MacKenzie5-14/+830
1993-06-17 * ldfile.c (ldfile_open_command): Don't try .ld extension.David MacKenzie4-0/+233
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.