diff options
author | obrien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
commit | 328e45595b12375b6d16a846069507d25086abdb (patch) | |
tree | ae2a6f4f4987889b7bd2af7bdf0b86fa580df011 /contrib/binutils/ld | |
parent | 7fbb72605a1c3bcb81f8b6bb6297ffef30f84335 (diff) | |
download | FreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.zip FreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.tar.gz |
Import of GNU Binutils version 2.11.0.
Believe it or not, this is heavily stripped down.
Diffstat (limited to 'contrib/binutils/ld')
66 files changed, 18099 insertions, 15237 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog index 39a6b79..a964658 100644 --- a/contrib/binutils/ld/ChangeLog +++ b/contrib/binutils/ld/ChangeLog @@ -1,10116 +1,1720 @@ -2000-11-06 Alan Modra <alan@linuxcare.com.au> +2001-04-02 Alan Modra <alan@linuxcare.com.au> - Merge most place_orphan changes from mainline. - 2000-09-07 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix - broken list handling. Create __start_SECNAME and __stop_SECNAME - when no place-holder. Add some comments. Test both SEC_CODE and - SEC_READONLY for hold_text to prevent .rodata orphan poisoning. - Handle case where no output section statement created. - - 2000-09-06 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't - try shuffling sections when the orphan happens to be the place - holder. Keep count of unique section names generated so we speed - the search for a new name. - - 2000-04-25 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete. - (output_rel_find): New function. - (hold_section, hold_use): Delete. - (hold_text, hold_rodata, hold_data, hold_bss, hold_rel, - hold_interp): Make local to place_orphan. - (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find - rather than place_section to find possible previous use of orphan. - Similarly find the place-holder output sections. Use returned - value from lang_enter_output_section_statement rather than calling - lang_output_section_statement_lookup. - * ldlang.c (lang_enter_output_section_statement): Return output - section statement. - * ldlang.h (lang_enter_output_section_statement): Change - declaration too. - * ldlang.h (lang_output_section_statement): Export it. - * ldlang.c (lang_output_section_statement): Ditto. + * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k. + (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise. - 2000-04-18 H.J. Lu <hjl@gnu.org> - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call - lang_leave_output_section_statement () after calling - lang_enter_output_section_statement (). - - 2000-04-18 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (struct orphan_save): Add section field. - (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in - better order, and place first orphan section as we did before the - 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place. - Don't call make_bfd_section here, let wild_doit do the job for us. - Don't build a statement list when we'll only throw it away. +2001-03-27 Hans-Peter Nilsson <hp@axis.com> - 2000-04-14 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process - ~SEC_ALLOC sections too. Init start address of debug sections. + * configure.tgt (cris-*-*): Change default emulation to criself. + (cris-*-*aout*): New rule. - 2000-04-12 Alan Modra <alan@linuxcare.com.au> - * emultempl/elf32.em (struct orphan_save): New. - (hold_text, hold_rodata, hold_data, hold_bss, hold_rel, - hold_interp): Make them struct orphan_save. - (gld${EMULATION_NAME}_place_section): Modify for new hold_*. - (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to - the end of the relevant section list. Also add associated section - statements to the end of any previous orphan statements. +2001-03-27 Matthew Wilcox <willy@ldl.fc.hp.com> -2000-11-05 Alan Modra <alan@linuxcare.com.au> + * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000. + (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto. - * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer, - yy_is_interactive, yy_at_bol, and yy_fill_buffer. - * ldlex.c: Regenerate. +2001-03-17 Ulrich Drepper <drepper@redhat.com> - * Makefile.am (DISTCLEANFILES): Add stringify.sed. - * Makefile.in: Regenerate. + * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME + is an absolute path look only for this file and not along the path. -2000-10-16 Philip Blundell <pb@futuretv.com> +2001-03-16 Philip Blundell <philb@gnu.org> - * configure.in: Set version number to 2.10.1. * configure: Regenerate. -2000-10-12 Peter Jeremy <peter.jeremy@alcatel.com.au> - - From 2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au> - * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath - in error message. - -2000-04-14 Matthew Green <mrg@cygnus.com> - - * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support. - -2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG> - - * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all - input objects to be ECOFF. - (check_sections): einfo takes %B, not %P, to print a BFD name. - -2000-07-31 Rodney Brown <RodneyBrown@pmsc.com> - - * configure.tgt: Select targ_emul=elf_i386 for Unixware 7 - (i586-sco-sysv5uw7.1.0). - -2000-06-18 Alan Modra <alan@linuxcare.com.au> - - * NEWS: Update list of targets supporting --gc-sections. +2001-03-11 Philip Blundell <philb@gnu.org> - * scripttempl/elf.sc: KEEP .eh_frame contents. - * scripttempl/elfd30v.sc: Same here. + * configure.in: Set version to 2.11. -2000-05-22 David O'Brien <obrien@FreeBSD.org> +2001-03-05 Alan Modra <alan@linuxcare.com.au> - * configure.tgt: Recognize alpha-*-freebsd*. - -2000-05-26 Eli Zaretskii <eliz@is.elta.co.il> - - * ldmain.c: Include filenames.h. - (set_scripts_dir): Support backslashes in program name. + * emultempl/m68kelf.em (m68k_elf_after_allocation): Call + after_allocation_default, not gld..._before_allocation. -2000-05-23 Philip Blundell <pb@futuretv.com> +001-02-18 David O'Brien <obrien@FreeBSD.org> - * configure.in: Set version to 2.10. - * configure: Regenerate. + * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64, + FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries. -2000-05-15 David O'Brien <obrien@FreeBSD.org> +2001-02-17 David O'Brien <obrien@FreeBSD.org> - * lexsup.c (parse_args): Update the year in the copyright notice. + * configure.host: Add a generic FreeBSD configuration entry such that + all [modern] FreeBSD systems on all platforms will look the same. -2000-05-13 Philip Blundell <pb@futuretv.com> +2001-02-13 Richard Henderson <rth@redhat.com> - From Joel Sherrill <joel@OARcorp.com>: - * configure.tgt (sparc-*-rtemsaout*, sparc-*-rtemself*): New. - (sparc-*-rtems*): Use ELF. - (i960-*-rtemself*, i960-*-rtemscoff*): New. - (i[3456]86-*-rtemscoff*): New. - (i[3456]86-*-rtems*): Use ELF. - (sh-*-rtemscoff*): New. - (m68*-*-rtemscoff*, m68*-*-rtemself): New. - (m68*-*-rtems*): Use ELF. + * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove. -2000-05-03 Alan Modra <alan@linuxcare.com.au> +2001-02-11 Philip Blundell <philb@gnu.org> - From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de> - * lexsup.c (set_section_start): Use bfd_scan_vma rather than - strtoul. + * Makefile.am: Remove mention of earmelf_linux26.o. + * Makefile.in: Regenerate. + * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000. + * emulparams/armelf_linux26.sh: Delete. + * configure.tgt: Remove mention of armelf_linux26 emulation. -2000-04-29 Andreas Jaeger <aj@suse.de> +2001-02-09 David Mosberger <davidm@hpl.hp.com> - * ld.h: Correctly check GCC version. + * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add + .IA_64.unwind.* pattern to unwind table section and + .IA_64.unwind_info* pattern to unwind info section. -2000-04-21 Richard Henderson <rth@cygnus.com> +2001-01-25 Jim Driftmyer <jdrift@stny.rr.com> - * scripttempl/elfd30v.sc: Place .gcc_except_table. + * ldlang.c (lang_leave_overlay): Don't set lma_region when + load_base is specified. -2000-04-19 Alan Modra <alan@linuxcare.com.au> +2001-01-24 Hans-Peter Nilsson <hp@axis.com> - * ld.texinfo (Simple Example): Remove extraneous paragraph. + * emultempl/elf32.em: Correct spelling in comments and listed + options. -2000-04-04 Alan Modra <alan@linuxcare.com.au> +2001-01-23 Alan Modra <alan@linuxcare.com.au> - * po/ld.pot: Regenerate. + * ldlang.c (lang_leave_overlay): Only set lma_region from the + default for the first section of a group of overlay sections. - * lexsup.c (help): Restore translated part of bug string. +2001-01-22 Alan Modra <alan@linuxcare.com.au> - * Makefile.am (MKDEP): Use gcc -MM rather than mkdep. - (DEP): Quote when passing vars to sub-make. Add warning message - to end. - (DEP1): Rewrite for "gcc -MM". - (CLEANFILES): Add DEP2. - Update dependencies. + * Makefile.am (GENSCRIPTS): Pass exec_prefix. * Makefile.in: Regenerate. + * genscripts.sh: Use exec_prefix parameter to specify tool lib. + Check for null tool_dir. -2000-04-03 Alan Modra <alan@linuxcare.com.au> +2001-01-16 Jim Wilson <wilson@redhat.com> - * ld.h: #include "bin-bugs.h" - * lexsup.c (help): Use REPORT_BUGS_TO. + * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind + and IA_64.unwind.info. -2000-03-27 Denis Chertykov <denisc@overta.ru> +2001-01-16 H.J. Lu <hjl@gnu.org> - * configure.tgt (avr-*-*): New target support. - * Makefile.am: Likewise. - * scripttempl/elf32avr.sc: New script file. - * emulparams/avr1200.sh: New file. - * emulparams/avr23xx.sh: New file. - * emulparams/avr4433.sh New file. - * emulparams/avr44x4.sh New file. - * emulparams/avr85xx.sh New file. - * emulparams/avrmega103.sh New file. - * emulparams/avrmega161.sh New file. - * emulparams/avrmega603.sh New file. - * Makefile.in: Regenerate. + * ldlang.c (lang_check): Merge the private data only if the + input file has contents. -2000-03-09 Andreas Jaeger <aj@suse.de> +2001-01-14 Alan Modra <alan@linuxcare.com.au> - * Makefile.am (check-DEJAGNU): Also unset LANG. - * Makefile.in: Rebuild. + * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux. -2000-03-06 Ian Lance Taylor <ian@zembu.com> + * emultempl/hppaelf.em (hppaelf_after_parse): New function, + enabling search for libmilli. On a relocatable link, make .text + sections unique. + (LDEMUL_AFTER_PARSE): Define. + (hppaelf_finish): Correct spelling of relocatable in comments. - * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty - archive. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't + rummage through the script for sections on the unique list. + Correct length of strncmp for ".note". + (gld${EMULATION_NAME}_check_needed): Rearrange function. -2000-03-02 H.J. Lu <hjl@gnu.org> + * ldlang.c (unique_section_list): New var. + (unique_section_p): New function. + (walk_wild_section): Don't match sections on unique_section_list. + (lang_add_unique): New function. + Correct spelling of relocatable in comments. - * emulparams/elf32mcore.sh: Include "getopt.h". + * ldlang.h (struct unique_sections): Declare. + (unique_section_list): Declare. + (unique_section_p): Declare. + (lang_add_unique): Declare. -2000-03-01 Ian Lance Taylor <ian@zembu.com> + * lexsup.c (ld_options): Allow --unique to take an optional arg. + (parse_args [OPTION_UNIQUE]): Call lang_add_unique. - * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware. + * ld.texinfo (--unique): Update. -2000-03-01 H.J. Lu <hjl@gnu.org> +2001-01-13 Nick Clifton <nickc@redhat.com> - * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR. - * emulparams/shpe.sh: Likewise. + * lexsup.c (parse_args): Remove spurious white space. -2000-03-01 Nick Clifton <nickc@cygnus.com> +2001-01-12 Nick Clifton <nickc@redhat.com> - * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED - to unused parameters. + * lexsup.c (parse_args): Update copyright date. - * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static - functions only used by DLL code. - (_place_orphan): Initialise 'dollar'. +2001-01-12 Philip Blundell <pb@futuretv.com> -2000-03-01 H.J. Lu <hjl@gnu.org> + * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin. - * ldmain.c (undefined_symbol): Take one more arg, fatal, to - indicate if the undefined symbol is a fatal error or not. - Don't delete the output file if "fatal" is false. +2001-01-10 Kazu Hirata <kazu@hxi.com> -2000-02-29 H.J. Lu <hjl@gnu.org> + * scripttempl/h8300.sc: Fix formatting. Fix a comment typo. + * scripttempl/h8300h.sc: Fix formatting. + * scripttempl/h8300s.sc: Likewise. + * scripttempl/h8500.sc: Likewise. + * scripttempl/h8500b.sc: Likewise. + * scripttempl/h8500c.sc: Likewise. + * scripttempl/h8500m.sc: Likewise. + * scripttempl/h8500s.sc: Likewise. - * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)". - Set LC_COLLATE and LC_ALL to null and export them. It is for - sort which expects the C locale. - Add $(LIBS) to all $(HOSTING_LIBS). - * Makefile.in: Rebuild. +2000-01-07 David O'Brien <obrien@BSDi.com> -2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au> + * emultempl/elf32.em: Only perform Linux ld hints processing when + targeting Linux. - * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em, - beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em, - linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em} - (ld_emulation_xfer_struct): Add missing NULL initialiser for - find_potential_libraries. +2001-01-07 Philip Blundell <philb@gnu.org> -2000-02-28 Jim Blandy <jimb@redhat.com> + * ld.texinfo (Bug Reporting): Update email address for reports. - * ldgram.y (exclude_name_list): Don't require a comma to separate - list entries; the lexer considers commas to be valid part of a - filename, so in something like `foo, bar' the comma is considered - part of the first filename, `foo,'. - * ld.texinfo: Update section on EXCLUDE_FILE lists. +2000-12-31 Nick Clifton <nickc@redhat.com> -2000-02-27 Loren J. Rittle <ljrittle@acm.org> + * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long + options by checking for a return value of '?' not -1. - * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for - host "i[3456]86-*-freebsdelf*". +2000-12-28 Nick Clifton <nickc@redhat.com> -2000-02-27 Mark Elbrecht <snowball3@bigfoot.com> + * lexsup.c (struct ld_option): Add new enum value: + EXACTLY_TWO_DASHES. + (ld_options[]): Change -omagic, -output and -oformat options + to be EXACTLY_TWO_DASHES. + (OUTPUT_COUNT): Use ARRAY_SIZE. + (parse_args): Change parameter 'argc' to unsigned. + Place EXACTLY_TWO_DASHES options into new really_longopts + array. + If getopt_long_only fails, try calling getopt_long using the + really_longopts array. + (help): Print a double dash for both EXACTLY_TWO_DASHES and + TWO_DASHES options. - * scripttempl/i386go32.sc: Move misplaced semicolons. + * ldlex.h: Fix prototype of parse_args. -2000-02-25 Ian Lance Taylor <ian@zembu.com> + * ld.texinfo: Document that long options starting with 'o' + must be preceeded by two dashes. Change example of a single + dashed long option from -oformat to -trace-symbol. - * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o. - (ALL_64_EMULATIONS): Remove eelf64hppa.o. - (eelf64hppa.c, ehppaelf.c): Remove targets. - * Makefile.in: Rebuild. +2000-12-26 Danny Smith <danny_r_smith_2001@yahoo.co.nz> -2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br> + * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define. + (longopts[]): New --no-default-excludes option. + (gld_${EMULATION_NAME}_list_options): Document. + (gld_${EMULATION_NAME}_parse_args): Handle. - * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on - GNU/Linux/sparc, but keep the default as 32. +2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG> - * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make - it default if sparcv9 or sparc64. + * ldlang.c (new_stat): Revert the last beautification with "innocent" + whitespace, it breaks the K&R C preprocessor. -2000-02-24 Nick Clifton <nickc@cygnus.com> +2000-12-11 DJ Delorie <dj@redhat.com> - * Makefile.am: Add rules to build emipspe.o and earmpe.o. - * Makefile.in: Regenerate. - * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe. + * ld.texinfo: Add notes about --whole-archive and gcc. - * ldemul.h (ld_emulation_xfer_struct): Add new field: - find_potential_libraries. - * ldemul.c (ldemul_find_potential_libraries): New function. +2000-11-18 Fred Fish <fnf@be.com> - * ldfile.c (ldfile_open_file_search): Allow function to be - exported. - (ldfile_open_file): Call ldemul_find_potential_libraries. - * ldfile.h: Add prototype for ldfile_open_file_search. + * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define. + (ld_options): Entry for --allow-shlib-undefined. + (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED. + * ldmain.c (main): Initialize link_info.allow_shlib_undefined + to false. + * ld.texinfo: Document new command line switch. - * pe-dll.c: Add support for ARM, MIPS and SH targets. +2000-12-12 Geoffrey Keating <geoffk@redhat.com> - * emulparams/mipspe.sh: New file. Parameters for mips-pe target. - * emulparams/shpe.sh: New file. Parameters for sh-pe target. + * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): + .fixup is actually read/write. + * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise. + * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise. + * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise. - * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs. - (gld_X_find_potential_libraries): New function. Search for - libraries called "*.lib". +Mon Dec 11 14:50:33 MET 2000 Jan Hubicka <jh@suse.cz> - * scriptempl/pe.sc: Add .pdata section. + * NEWS: Add note about x86_64 architecture. -2000-02-23 Richard Henderson <rth@cygnus.com> +2000-12-06 Mark Elbrecht <snowball3@bigfoot.com> - * scripttempl/elfd10v.sc: Remove dynamic linking hooks. - Add and use memory regions. + * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end. + Set DWARF2 sections to a VMA of zero. -2000-02-23 Linas Vepstas (linas@linas.org) +2000-12-01 Joel Sherrill <joel@OARcorp.com> - * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New. + * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*): + New targets. + (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. + (sparc*-*-rtems*): Switched from a.out to ELF. - * Makefile.am: Add support for Linux/IBM 370. - * configure.tgt: Likewise. +2000-11-30 Jan Hubicka <jh@suse.cz> + * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o + (eelf_x86_64.c): New. * Makefile.in: Regenerate. + * configure.tgt: Add support for x86_64-*-linux-gnu*. + * emulparams/elf_x86_64.sh: New. -2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-11-30 Hans-Peter Nilsson <hp@axis.com> - * ldlang.c (print_input_section, print_data_statement, - print_reloc_statement, print_padding_statement, insert_pad, - size_input_section, lang_check_section_addresses, - lang_size_sections, lang_do_assignments, lang_set_startof, - lang_one_common): Change `opb' to unsigned. - (lang_do_assignments): Also change `size' to unsigned. + * emulparams/crislinux.sh (ENTRY): Change back to _start. + (TEXT_START_SYMBOLS): Remove conditional setting of __start. -2000-02-16 Richard Henderson <rth@cygnus.com> + * scripttempl/crisaout.sc: Change all RELOCATING not related to + merging non-a.out sections into CONSTRUCTING. - * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION. +2000-11-28 Nick Clifton <nickc@redhat.com> -2000-02-16 Timothy Wall <twall@cygnus.com> + * ld.1 (COPYING): Mention that the GNU Free Documentation + License is present in the sources, but not the output, and + also available from the GNU website. + (GNU Free Documentation License): Comment out this section. - * mri.c (mri_draw_tree): Add default LMA region argument to call - to lang_leave_output_section_statement. - * ldlang.h: Update prototypes with LMA region arguments. - * ldlang.c (lang_size_sections): Encapsulate region bounds - checking in os_check_region call. - (os_check_region): New function. - (lang_output_section_statement_lookup): Initialize lma_region. - (lang_leave_output_section_statement): Add LMA region argument. - (lang_leave_overlay): Ditto. - * ldgram.y: Handle LMA region syntax. - * ld.texinfo (Output Section Description): Describe LMA region usage. - * emultempl/armelf.em (gld$place_orphan): Add default value for - lma region in call to lang_leave_output_statement. - * emultempl/elf32.em (gld$place_orphan): Add default value for - lma region in call to lang_leave_output_statement. - * emultempl/pe.em (gld$place_orphan): Add default value for - lma region in call to lang_leave_output_statement. - - -2000-02-04 Timothy Wall <twall@redhat.com> +2000-11-28 David O'Brien <obrien@dragon.nuxi.com> - * ldlang.c (lang_check_section_addresses): Use bytes instead of - octets when calculating section end addresses. + * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF + does not use them. -2000-02-04 Timothy Wall <twall@redhat.com> +2000-11-25 David O'Brien <obrien@FreeBSD.org> - * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation. + * ld.1: Remove old date so it does not give the impression the manpage + is way out of date. -2000-02-03 Timothy Wall <twall@redhat.com> +2000-11-24 Nick Clifton <nickc@redhat.com> - * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not - octet count. - * ld/ldlang.c (print_input_section, print_data_statement, - print_reloc_statement, print_padding_statement): Print target - address values and section sizes as bytes, not octets. - (insert_pad) Calculate padding size in octets, and adjust "dot" - by bytes. - (size_input_section) Always adjust "dot" by bytes, not octets. - (lang_check_section_addresses, lang_do_assignments) Adjust - "dot" by bytes, not octets. Use the larger of the directive size - or octets_per_byte for the number of octets actually allocated in - the output section. - (lang_set_startof) Make sure STARTOF returns a target address. - (lang_one_common) Record size changes in octets. - (lang_abs_symbol_at_end_of) Section end symbol's value is - recorded in target bytes. - * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc. - to be clear about behavior when an octet is smaller than one byte. - -2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + * configure.tgt (xscale-coff): Add target. + (xscale-elf): Add target. - * ldcref.c (output_cref): Don't pass message strings to printf - as format arg. - Update copyright. +2000-11-24 Fred Fish <fnf@be.com> - * ldmisc.c (vfinfo): Same here. - Update copyright. + * ldmain.c (main): Remove redundant init of config.make_executable + to true. -2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-11-15 Richard Henderson <rth@redhat.com> - * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em, - generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em, - mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct): - Add missing NULL initialisers, and comments. + * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M. - * testsuite/ld-srec/sr3.cc (__rethrow): New. +2000-11-14 Kazu Hirata <kazu@hxi.com> -2000-01-21 Nick Clifton <nickc@cygnus.com> + * scripttempl/h8300.sc: Fix formatting. + * scripttempl/h8300h.sc: Likewise. + * scripttempl/h8300s.sc: Likewise. - * ldlang.c (lang_size_sections): Fix typo in comment. +Tue Nov 14 00:59:19 2000 Denis Chertykov <denisc@overta.ru> -2000-01-18 H.J. Lu <hjl@gnu.org> + * scripttempl/elf32avr.sc: Fix bug in .eeprom segment. - * ldlang.c (lang_size_sections): Also update the current - address of a region if the SEC_NEVER_LOAD bit is not set. +2000-11-09 Philip Blundell <pb@futuretv.com> -2000-01-10 Philip Blundell <pb@futuretv.com> + * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME + around orphan sections whose names can be represented in C. - * configure.tgt (arm*-*-conix*): New target. +2000-11-07 Jim Wilson <wilson@redhat.com> -2000-01-07 Nick Clifton <nickc@cygnus.com> + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local + hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata. - * ld.texinfo (Options): Remind users to preceed linker command - line switches with -Wl, (or whatever is appropriate) if it is - being invoked by a comnpiler driver program. - Fix description of the behaviour of the -n command line switch. - -Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com> - - * ld.h (wildcard_spec): Change exclude_name to exclude_name_list. - (name_list): New. - * ld.texinfo (EXCLUDE_FILE): Update documentation. - * ldgram.y (wildcard_spec): Support a list of excluded_files. - (exclude_name_list): New. - ldlang.c (walk_wild_section): Support list of excluded files. - (print_wild_statement): Likewise. - (lang_add_wild): Likewise. - * ldlang.h (lang_wild_statement_type): Likewise. - * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support. - -2000-01-04 Mumit Khan <khan@xraylith.wisc.edu> +2000-11-06 Nick Clifton <nickc@redhat.com> - * pe-dll.c (pe_dll_warn_dup_exports): New variable. - (process_def_file): Use. - (pe_dll_compat_implib): New variable. - (make_one): Use. - - * pe-dll.h: Add exports of pe_dll_warn_dup_exports and - pe_dll_compat_implib. - - * emultempl/pe.em (longopts): Add warn-duplicate-exports and - compat-implib options. - (gld_${EMULATION_NAME}_list_options): List new options. - (gld_${EMULATION_NAME}_parse_args): Handle. + * ld.texinfo: Add GNU Free Documentation License. + * ldint.texinfo: Add GNU Free Documentation License. + * ld.1: Add GNU Free Documentation License. - * pe-dll.c (pe_dll_generate_implib): Use the correct name for output - dll. - - * deffilep.y (opt_name): Allow "." in name. +2000-11-05 Alan Modra <alan@linuxcare.com.au> -1999-12-02 Nick Clifton <nickc@cygnus.com> + * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer, + yy_is_interactive, yy_at_bol, and yy_fill_buffer. - * Makefile.am: Fix arm-epoc-pe dependencies. + * Makefile.am (DISTCLEANFILES): Add stringify.sed. + Move 2000-11-02 Makefile.in changes to this file. * Makefile.in: Regenerate. - - * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe. - - * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for - EPOC by placing .rdata into .text. - -1999-11-26 Andreas Schwab <schwab@suse.de> - - * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for - STRINGIFY. Use yes/no instead of true/false as value for cache - variable. - * configure: Regenerate. - -1999-11-24 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD - attributes in order to be checked. - -1999-11-22 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_check_section_addresses): Fix test to determine - if a section should be tested. - (IGNORE_SECTION): New macro. - -Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com) - - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - Clean up code to use EXTRA_SHLIB_EXTENSION. -1999-11-03 Nick Clifton <nickc@cygnus.com> +2000-11-03 Nick Clifton <nickc@redhat.com> - * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian. - * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian. + * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose + constructors and destructors. + * scripttempl/h8300h.sc: Ditto. + * scripttempl/h8300s.sc: Ditto. + * scripttempl/h8500.sc: Ditto. + * scripttempl/h8500b.sc: Ditto. + * scripttempl/h8500c.sc: Ditto. + * scripttempl/h8500m.sc: Ditto. + * scripttempl/h8500s.sc: Ditto. + * scripttempl/v850.sc: Ditto. + * scripttempl/w65.sc: Ditto. + * scripttempl/z8000.sc: Ditto. -1999-11-01 Steve Chamberlain <sac@pobox.com> +2000-11-02 Per Lundberg <plundis@chaosdev.org> - * ldlang.c (section_already_linked): Rework to use hash table. - (already_linked_newfunc): New function. - (already_linked_table_init): New function. - (already_linked_table_free): New function. - (lang_process): Initialize and free the already_linked hash table. + * Makefile.in (e_i386_chaos.c): New rule. + (ALL_EMULATIONS): Added e_i386_chaos.o. + * emulparams/elf_i386_chaos.sh: New file. + * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos. -1999-10-27 Andreas Jaeger <aj@suse.de> +2000-10-20 Jakub Jelinek <jakub@redhat.com> - * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for - target "mips*-*-linux-gnu*". + * emulparams/elf64_sparc.sh (TEXT_START_ADDR, + NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets. + Fix sed invocation, so that it coped with '/' in Solaris 64bit + library path suffix. + Based on patch by Andrew Macleod <amacleod@cygnus.com>. -1999-10-27 Scott Bambrough <scottb@netwinder.org> +2000-10-18 Hans-Peter Nilsson <hp@axis.com> - * emultempl/armelf.em: Include ctype.h to prevent compile time - warnings. + * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32), + for consecutive sections. -1999-10-26 Nick Clifton <nickc@cygnus.com> +2000-10-17 Chandrakala Chavva <cchavva@redhat.com> - * emultempl/armcoff.em (gld{}_finish): Remove extraneous - underscore from prototype. - * emultempl/armelf.em (gld{}_finish): Remove extraneous - underscore from prototype. - -1999-10-07 Geoffrey Keating <geoffk@cygnus.com> - - * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs - being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*. - (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*. - (.rel.sbss): Make like .rel.bss. - (.rela.sbss): Make like .rel.bss. - (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when - ld -r. - (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS, - .dynsbss. - -1999-09-29 Andrew Haley <aph@cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer - merging sections when not relocating. - -1999-09-28 Mumit Khan <khan@xraylith.wisc.edu> - - * pe-dll.c (process_def_file): Move the offset lookup from here to - (fill_exported_offsets): here. New static function. - (fill_edata): Use. - -1999-09-28 Mumit Khan <khan@xraylith.wisc.edu> - - * deffilep.y (tokens): Add upper and lower case versions of DATA, - CONSTANT, NONAME and PRIVATE tokens. - (command): Use DATAU. - (expline): Allow for drectve syntax as well. - (exp_opt_list): Likewise. - (exp_opt): Likewise. - * pe-dll.c (make_one): Only generate the idata entries for data - symbols. - -1999-09-28 Geoffrey Keating <geoffk@cygnus.com> - - * scripttempl/elf.sc (.sdata): Include .gnu.linkonce.s.* sections - in .sdata too. - -1999-09-26 Nick Clifton <nickc@cygnus.com> - - * scripttempl/elf.sc (.bss): Accept sections named .bss.* - (.sbss): Accept sections names .sbss.* - -1999-09-22 Nick Clifton <nickc@cygnus.com> - - * Makefile.am: Add earm_epoc_pe.c build target. + * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific + options. + * ld.texinfo: Added notes about this new option. -Sat Sep 18 07:57:10 1999 Jeffrey A Law (law@cygnus.com) +2000-10-16 Nick Clifton <nickc@redhat.com> - * emulparms/elf64hppa.sh (OTHER_READONLY_SYMBOLS): Remove ".stubs", - they've been renamed to ".stub", which is handled automatically - by elf.sc. + * emultempl/pe.em (_after_open): Add tests of return values from + bfd functions. Emit appropriate error messages if necessary. -Fri Sep 17 11:00:33 1999 Jeffrey A Law (law@cygnus.com) +2000-10-13 Nick Clifton <nickc@redhat.com> - * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Kill completely. - (DATA_START_SYMBOLS): Kill __hp_load_map definition + * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms' + local variables - they are not used, but leave in the call to + bfd_canonicalize_symtab. + (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of + pe_dll_search_prefix. -Thu Sep 16 10:59:56 1999 Jeffrey A Law (law@cygnus.com) +2000-10-12 Charles Wilson <cwilson@ece.gatech.edu> - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - Use the same filename extension for the bfd_elf_dt_needed_name call - as we did for finding the library. + * emultempl/pe.em (pe_dll_search_prefix): New variable, + (longopts): New --dll-search-prefix option. + (gld_${EMULATION_NAME}_list_options): Document. + (gld_${EMULATION_NAME}_parse_args): Handle. + (gld_${EMULATION_NAME}_open_dynamic_archive): When linking + dynamically, search for a dll named '<prefix><basename>.dll' + in preference to 'lib<basename>.dll' if --dll-search-prefix + is specified. - * emulparms/elf64hppa.sh (DATA_START_SYMBOLS): Define. - (OTHER_READWRITE_SECTIONS): No longer define __hp_load_map. +2000-10-12 Alan Modra <alan@linuxcare.com.au> - * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Define. + * ldlang.c (section_already_linked): Set kept_section instead of + sec->comdat->sec. -Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com) +2000-10-10 Kazu Hirata <kazu@hxi.com> - * emulparms/elf64hppa.sh (SHLIB_TEXT_START_ADDR): Define. - (SHLIB_DATA_ADDR): Likewise. + * deffile.h: Fix formatting. + * lexsup.c: Likewise. + * mri.c: Likewise. - * emulparms/elf64hppa.sh (TEXT_DYNAMIC): Define. +2000-10-09 Paul Sokolovsky <Paul.Sokolovsky@technologist.com> - * emulparms/elf64hppa.h (OTHER_READWRITE_SECTIONS): No longer combine - the .plt, .dlt, .opd into a single output section. Provide values - for __gp and __hp_load_map. + * pe-dll.c (make_one): Do not generate code thunk for DATA + exports. + (process_def_file): deduce DATA flag for auto-export sumbols. -1999-09-14 Michael Meissner <meissner@cygnus.com> +2000-10-09 Kazu Hirata <kazu@hxi.com> - * configure.in (Canonicalization of target names): Remove adding - ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 - generates $ac_config_sub with a ${CONFIG_SHELL} already. - * configure: Regenerate. + * ld.h: Fix formatting. + * ldcref.c: Likewise. + * ldctor.h: Likewise. + * ldemul.c: Likewise. + * ldemul.h: Likewise. + * ldexp.c: Likewise. + * ldexp.h: Likewise. + * ldfile.c: Likewise. + * ldfile.h: Likewise. + * ldlang.c: Likewise. + * ldlang.h: Likewise. + * ldmain.c: Likewise. + * pe-dll.c: Likewise. -1999-09-14 Donn Terry <donn@interix.com> + * pe-dll.c: Revert some formatting fixes. - * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for - terminating null. +2000-10-08 Kazu Hirata <kazu@hxi.com> -1999-09-14 Ulrich Drepper <drepper@cygnus.com> + * pe-dll.c: Fix formatting. - * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target. - * config.in: Add EXTRA_SHLIB_EXTENSION. +2000-10-05 Kazu Hirata <kazu@hxi.com> - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION - is defined. + * ldlang.c: Fix formatting. -1999-09-14 Nick Clifton <nickc@cygnus.com> +2000-10-03 DJ Delorie <dj@redhat.com> - * Makefile.in: Add earm_epoc_pe.c build target. + * pe-dll.c (fill_edata): initialize entire block + (make_one): fill in correct section. -Tue Sep 14 05:26:34 1999 Jeffrey A Law (law@cygnus.com) +2000-10-03 Kazu Hirata <kazu@hxi.com> - * emulparms/elf64hppa.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.dlt. + * ldexp.c: Fix formatting. -1999-09-13 Donn Terry <donn@interix.com> +2000-10-02 DJ Delorie <dj@redhat.com> - * emultempl/pe.em: Remove the output file at the start, in case it - is not writable. + * emultempl/pe.em (gld_*_after_open): detect case where there two + import libraries for same dll; rename one to ensure proper link + order. -Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com) + * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix + typo + (generate_edata): fix typo - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - Search for file with .sl extension if no file with a .so extension - is found. +2000-09-29 Hans-Peter Nilsson <hp@axis.com> - * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt - at the start of the .dlt output section. + * scripttempl/crisaout.sc (ENTRY): Now __start. + (.text): Add default setting for __start. + Remove CONSTRUCTORS handling. + (/DISCARD/): Add .gnu.warning.*. + * emulparams/crislinux.sh (ENTRY): Now __start. + (TEXT_START_SYMBOLS): New; provide __Stext and __start default. + * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris. + (ENTRY): Now __start. + (INITIAL_READONLY_SECTIONS): Add KEEP for .startup. + (EXECUTABLE_SYMBOLS): Add default setting for __start. -1999-09-12 Ian Lance Taylor <ian@zembu.com> +2000-09-29 Kazu Hirata <kazu@hxi.com> - * pe.em: Don't include "../bfd/libbfd.h". - (gld_${EMULATION_NAME}_after_open): Use xmalloc rather than - bfd_alloc. + * deffile.h: Fix formatting. + * ld.h: Likewise. + * ldcref.c: Likewise. + * ldctor.c: Likewise. + * ldctor.h: Likewise. + * ldemul.c: Likewise. + * ldemul.h: Likewise. + * ldexp.c: Likewise. + * ldexp.h: Likewise. + * ldfile.c: Likewise. + * ldfile.h: Likewise. + * ldlang.c: Likewise. + * ldlang.h: Likewise. + * lexsup.c: Likewise. + * mri.c: Likewise. + * pe-dll.c: Likewise. - * pe-dll.h: New file. - * pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed - to avoid warnings. - (edata_sz, reloc_sz): Change from int to size_t. - (pe_details_type): Change type of imagebase_reloc from int to - unsigned int. - (pe_detail_list): Fully initialize last entry. - (pe_dll_id_target): Change parameter to const. - (pe_dll_generate_def_file): Likewise. - (pe_dll_generate_implib): Likewise. - (pe_implied_import_dll): Likewise. Change dll_name to const. - * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in - pe-dll.h. - (init): Fully initialize __dll__ entry. - (gld_${EMULATION_NAME}_after_open): Remove unused variables - sequence, elt, and i. - * deffile.h: Add preprocessor guard. - * deffilep.y (def_debug): Remove. - * Makefile.am: Rebuild dependencies. - (HFILES): Add pe-dll.h. +2000-09-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com> -1999-09-12 Donn Terry <donn@interix.com> + * pe-dll.c (process_def_file): Uninitialized data wasn't + exported with --export-all-symbols switch. - * ld.h (ld_abort): Declare. - (abort): Define. - * ldmisc.c (ld_abort): Define. +2000-09-28 DJ Delorie <dj@redhat.com> - * scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup. - Move .bss section after .rdata. Move .reloc section after .rsrc. + * pe-dll.c (fill_edata): rearrange the data so that ordinals and + noname work properly. - * lexsup.c (parse_args): Use strtoul for --split-by-reloc - argument. +2000-09-28 Alan Modra <alan@linuxcare.com.au> - * lexsup.c (parse_args): If we get an unrecognized argument, - mention --help. + * ld.texinfo (HPPA ELF32): New section. - * ldlang.c (section_already_linked): Use comdat information if it - is available. + * emultempl/hppaelf.em (group_size): New. + (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs. + (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE. + (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate + options to prevent abbreviations matching. + (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat. + (PARSE_AND_LIST_ARGS_CASES): Handle it. - * emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If - OVERRIDE_SECTION_ALIGNMENT is defined, change to that. - (gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is - defined, rather than a.exe. - (init): Define __subsystem__ as ${SUBSYSTEM}. - (set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol - name. +2000-09-21 Michael Sokolov <msokolov@ivan.Harhan.ORG> -1999-09-12 Ian Lance Taylor <ian@zembu.com> + * emultempl/m68kelf.em: Conditionalise the embedded relocs feature + on the m68*-*-elf target. Make it support COFF input objects. - * ldlang.c (open_output): Change local variable desired_endian - from int to enum bfd_endian. +2000-09-21 Kazu Hirata <kazu@hxi.com> - * emulparams/arm_epoc_pe.sh: Define ENTRY, SUBSYSTEM and - INITIAL_SYMBOL_CHAR. - * emulparams/armpe.sh: Likewise. - * emulparams/morepe.sh: Likewise. - * emulparams/ppcpe.sh: Likewise. - * emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup. - (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM. + * ldmain.c: Fix formatting. + * ldmisc.c: Likewise. + * ldver.c: Likewise. + * ldwrite.c: Likewise. -Fri Sep 10 00:22:50 1999 Jeffrey A Law (law@cygnus.com) +2000-09-21 Alan Modra <alan@linuxcare.com.au> - * emulparms/elf64hppa.sh (LIB_PATH): Define. + * ldwrite.c (clone_section): Silence gcc warnings. - * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before - unwinders so that they are closer to the text section. - (OTHER_BSS_SECTIONS): Define. - (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS. - (INIT_START, INIT_END): Define. - (FINI_START, FINI_END): Define. - * scripttempl/elf.sc: Add support for INIT_START, INIT_END, - FINI_START, FINI_END and OTHER_BSS_SECTIONS. +2000-09-20 Alan Modra <alan@linuxcare.com.au> -Thu Sep 9 21:43:58 1999 Jeffrey A Law (law@cygnus.com) + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle + out of memory failure. - * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page. - (DATA_ADDR): Define. + * ldwrite.c (ldwrite): Remove unnecessary einfo arg. + (clone_section): Handle out of memory failures. Rename var to + avoid c++ reserved word. -1999-09-09 Stan Shebs <shebs@andros.cygnus.com> +2000-09-18 Alan Modra <alan@linuxcare.com.au> - * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004. + * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename + stub_name param to stub_sec_name. + (hppaelf_finish): Modify call to elf32_hppa_size_stubs. -1999-09-09 Andreas Schwab <schwab@suse.de> +2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG> - * ld.texinfo: Fix arguments of @var to not contain punctuation. + * emultempl/m68kelf.em: New file. + * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it. + * Makefile.am (em68kelf.c): Add dependency on m68kelf.em. + * Makefile.in: Regenerate. -Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com) +2000-09-15 Alan Modra <alan@linuxcare.com.au> - * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define. + * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$ + only as needed. -1999-09-08 Ulrich Drepper <drepper@cygnus.com> +2000-09-13 Nick Clifton <nickc@redhat.com> - * emulparams/elf64hppa.sh (ELFSIZE): New. Set to 64. + * ldmain.c (multiple_definition): Disable relaxation if + multiple symbol definitions are encountered - otherwise the + linker could abort with an assertion failure. -Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com) +2000-09-10 Nick Clifton <nickc@redhat.com> - * emulparms/elf64hppa.sh (ENTRY): Define to main. + * mri.c: Fix formatting. -1999-09-03 Scott Bambrough <scottb@netwinder.org> +2000-09-07 H.J. Lu <hjl@gnu.org> - * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for - target "arm*-*-linux-gnu*" + * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM. + * configure: Rebuild. -1999-09-04 Steve Chamberlain <sac@pobox.com> +2000-09-07 H.J. Lu <hjl@gnu.org> - * configure.tgt (pjl-*-*, pj-*-*): New targets. - * emulparams/pjelf.sh: New file. - * emulparams/pjlelf.sh: New file. - * scripttempl/pj.sc: New file. - * Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o. - (epjelf.o, epjlelf.o): New targets. + * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h. * Makefile.in: Rebuild. -Fri Sep 3 20:17:08 1999 Jeffrey A Law (law@cygnus.com) +2000-09-07 Alan Modra <alan@linuxcare.com.au> - * emulparams/elf64hppa.sh (MAXPAGESIZE): Define. - (OTHER_READONLY_SECTIONS, DATA_PLT): Likewise. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix + broken list handling. Create __start_SECNAME and __stop_SECNAME + when no place-holder. Add some comments. Test both SEC_CODE and + SEC_READONLY for hold_text to prevent .rodata orphan poisoning. + Handle case where no output section statement created. -Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com) +2000-09-07 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com> - * emulparams/elf64hppa.sh: New file. - * configure.tgt (hppa*w-*-*): Use elf64hppa emulation. - * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o - (eelf64hppa.c): Add dependencies. + * configure.tgt (sh-*-linux*): Added. + * Makefile.am: Added eshelf_linux and eshlelf_linux. * Makefile.in: Rebuilt. + * emulparams/shelf_linux.sh: New file. + * emulparams/shlelf_linux.sh: New file. -1999-08-25 Philip Blundell <pb@nexus.co.uk> - - * emulparams/armelf.sh (OTHER_BSS_SYMBOLS): Add __end__. - * emulparams/armelf_linux.sh: Likewise. - * emulparams/armelf_linux26.sh: Likewise. - -1999-08-24 Nick Clifton <nickc@cygnus.com> - - From a patch submitted by Roland McGrath <roland@baalperazim.frob.com> - - * configure.tgt (arm-*-netbsd*): New target. - * Makefile.am (ALL_EMULATIONS): Add earmnbsd.o. - (earmnbsd.c): New rule with deps. - * Makefile.on: Regenerate. - * emulparams/armnbsd.sh: New file. - -1999-08-23 Nick Clifton <nickc@cygnus.com> - - * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Define. - Implement --base-file command line switch. - - * emultempl/elf32.em: Add ability for individual targets to have - their own command line switches by defining PARSE_AND_LIST_ARGS. - -1999-08-19 Andreas Schwab <schwab@suse.de> - - * configure.host: Use ${CC} instead of gcc for finding compiler - related files. - -1999-08-11 Nick Clifton <nickc@cygnus.com> - - * scripttempl/mcorepe.sc (OUTPUT_FORMAT): Fix typo. - -1999-08-09 Mark Elbrecht <snowball3@bigfoot.com> - - * scripttempl/i386go32.sc: Handle g++ exception sections. - -1999-08-09 Ian Lance Taylor <ian@zembu.com> - - From Wally Iimura <iimura@microunity.com>: - * ldlang.c (lang_size_sections): When checking whether an address - is within a region, don't get confused by wrapping around at the - end of the address space. - -1999-08-08 Ian Lance Taylor <ian@zembu.com> - - * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to - SEC_SMALL_DATA. +2000-09-06 Alan Modra <alan@linuxcare.com.au> - * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to - MKDEP. Rebuild dependencies. - * Makefile.in: Rebuild. - -1999-08-08 Jakub Jelinek <jj@ultra.linux.cz> - - * configure.host (sparc-*-linux-gnu*): New host. - (sparc64-*-linux-gnu*): New host. - -1999-08-06 Ian Lance Taylor <ian@zembu.com> - - * lexsup.c (is_num): Reindent. - (parse_args): Mention program name in error message. - - * emultempl/ostring.sed: Rename from stringify.sed. - * emultempl/astring.sed: New file. - * Makefile.am (stringify.sed): New target. - (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to - stringify.sed. - * configure.in: Define and substitute STRINGIFY. - * emultempl/*.em: Use stringify.sed from build directory rather - than source directory. - * emultempl/elf32.em: Use stringify.sed rather than inline sed - script. - * emultempl/gld960.em, emultempl/gld960c.em: Likewise. - * emultempl/hppaelf.em, emultempl/linux.em: Likewise. - * emultempl/lnk960.em, emultempl/sunos.em: Likewise. - * configure, Makefile.in: Rebuild. - -1999-08-05 Donn Terry <donn@interix.com> - - * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and - INITIAL_SYMBOL_CHAR. - * emulparams/i386pe_posix.sh: New file. - * Makefile.am (YACC): If bison is not in the source tree, use - @YACC@ rather than bison -y. - (LEX): If flex is not in the source tree, use @LEX@ rather than - flex. - (ALL_EMULATIONS): Add ei386pe_posix.o. - (ei386pe_posix.c): New target. - * configure.tgt (i[3456]86-*-interix*): New target. - * configure.host (i[3456]86-pc-interix*): New host. - * Makefile.in: Rebuild. - -1999-08-03 Ian Lance Taylor <ian@zembu.com> - - * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000. - * emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise. - -1999-08-03 H.J. Lu <hjl@gnu.org> - - * Makefile.am (ALL_EMULATIONS): Remove ego32.o. - (ego32.c): Remove. - * Makefile.in: Rebuild. - -1999-07-22 Philip Blundell <pb@nexus.co.uk> - - * emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define. - (OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise. - * emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define. - - * configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*, - thumb-*-linux-gnu*): New targets. - -1999-07-21 Mark Elbrecht <snowball3@bigfoot.com> - - * scripttempl/i386go32.sc: Add handling of linkonce sections. - - * configure.bat: Remove; obsolete. - * emulparams/go32.sh: Remove; obsolete. - * scripttempl/go32coff.sc: Remove; obsolete. - -1999-07-21 H.J. Lu <hjl@gnu.org> - - * configure.tgt (mips*el-*-vxworks*): New target. - -1999-07-21 Brad M. Garcia <bgarcia@fore.com> - - * configure.tgt (i[3456]86-*-vxworks*): New target. - -Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com> - - * ldlang.c (lang_gc_sections): Only handle the start symbol - specially if there is one. - -Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com> - - * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add - .MIPS.events and .MIPS.content handling. - * emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise. - -1999-07-17 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (get_target): New function: Return true iff the - given target is the target being sought. - (stricpy): New function: Like strcpy but convert to lower - case as well. - (strcut): New function: Like strstr but remove the located - substring as well. - (name_compare): New function: Compute a compatability rating - for two target names. - (winner): New variable: Best target found by - closest_target_match() so far. - (closest_target_match): New function: Find the target which is - the closest match to the original target. - (get_first_input_target): New function: Find the target format - of the first of the linker's input file. - (open_output): Be more clever about deciding the output target - format. - -1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> - - * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH. - -Thu Jul 15 15:55:15 1999 Mark P. Mitchell <mark@codesourcery.com> - - * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6. - -1999-07-15 Ian Lance Taylor <ian@zembu.com> - - * configure.in: Bump version number to 2.9.5. - * configure: Rebuild. - -1999-07-14 Richard Henderson <rth@cygnus.com> - - * ldlang.c (wild_doit): Copy SEC_SHORT to output section. - - * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the - same order seen for the main sections. Add - OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS. - -1999-07-12 Andreas Schwab <schwab@suse.de> - - * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in - structure initializations. - - * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing - comma in initializer. - -1999-07-11 Ian Lance Taylor <ian@zembu.com> - - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Fill in structure initializations. - -1999-07-10 Ian Lance Taylor <ian@zembu.com> - - * ldfile.c: Revert patch of 1999-07-08. - (ldfile_try_open_bfd): If we are searching for the file, skip - files with an incompatible architecture. - -1999-07-09 Nick Clifton <nickc@cygnus.com> - - * scripttempl/armcoff.sc (OUTPUT_FORMAT): Include big endian and - little endian formats. - -1999-07-08 Felix Lee <flee@cygnus.com> - - * scripttempl/mcorepe.sc: fix quoting problem, for bash 2.x - -1999-07-08 Jakub Jelinek <jj@ultra.linux.cz> - - * ldfile.c (ldfile_open_file_search): Skip libraries made for - incompatible architectures in the search path. Let the user know - about any such skips. - -Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> - - * configure.tgt (hppa*-linux-gnu*): New target. - -1999-07-07 Mark Mitchell <mark@codesourcery.com> - - * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip. - (eelf64bmip): New target. - * Makefile.in: Regenerated. - * configure.tgt (mips-sgi-irix6*): Add 64-bit emulation. - * emulparams/elf64bmip.sh: New file. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't + try shuffling sections when the orphan happens to be the place + holder. Keep count of unique section names generated so we speed + the search for a new name. -1999-07-05 Nick Clifton <nickc@cygnus.com> +2000-09-06 Alexandre Oliva <aoliva@redhat.com> - * emultempl/pe.em (after_open): Abort if input format is ARM and - output format is not. - * emultempl/armcoff.em (after_open): Abort if input format is ARM - and output format is not. - * emultempl/armelf.em (after_open): Abort if input format is ARM - and output format is not. + * configure: Rebuilt with new libtool.m4. -1999-07-02 Ian Lance Taylor <ian@zembu.com> +2000-09-05 Nick Clifton <nickc@redhat.com> - * ldlang.c: Revert change of 1999-06-23. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config.in: Regenerate. + * po/ld.pot: Regenerate. -1999-06-30 Mark Mitchell <mark@codesourcery.com> + * ldint.texinfo: Remove CVS revision marker - it foils local + comparisons. + + * emultempl/ticoff.em: Remove extraneous comma. + +2000-09-05 Alan Modra <alan@linuxcare.com.au> + + * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC + to stub section flags. + (hppa_for_each_input_file_wrapper): New. + (hppa_lang_for_each_input_file): New. + (lang_for_each_input_file): Define to call above. + (multi_subspace): New. + (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs. + (PARSE_AND_LIST_PROLOGUE): Define. + (PARSE_AND_LIST_LONGOPTS): Define. + (PARSE_AND_LIST_OPTIONS): Define. + (PARSE_AND_LIST_ARGS_CASES): Define. + (hppaelf_finish): Call elf32_hppa_set_gp. + (hppaelf_set_output_arch): Remove. + (LDEMUL_SET_OUTPUT_ARCH): Remove. + + * emulparams/hppalinux.sh (ELFSIZE): Define. + (MACHINE): Define. + (OTHER_READONLY_SECTIONS): Define. + (DATA_PLT): Define. + (GENERATE_SHLIB_SCRIPT): Define. - * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o. - (eelf32bmipn32.c): New target. - * Makefile.in: Regenerated. - * configure.tgt (mips-sgi-irix6*): Make n32 the default - emulation. - * emulparams/elf32bmipn32.sh: New file. - -1999-06-28 Jim Pick <jim@jimpick.com> + * ldlang.c: Add missing prototypes, and tidy others. Change CONST + to const throughout. Change `void *' to `PTR' throughout. + (lang_memory_default): Function is local to file, add `static'. - * emultempl/armelf.em: Added code so that .xs linker scripts are - called so that ARM shared libraries are built correctly. + * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em. + (ehppalinux.c): Likewise. + (earmelf.c): Likewise. + (earmelf_linux.c): Likewise. + (earmelf_linux26.c): Likewise. + * Makefile.in: Regenerate. -1999-06-22 Mark Mitchell <mark@codesourcery.com> + * ld.h (ld_config_type): Add unique_orphan_sections. + * lexsup.c (OPTION_UNIQUE): Define. + (ld_options): Add "--unique". + (parse_args): Handle it. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't + search for an existing output section if unique_orphan_sections is + set. Make use of bfd_get_unique_section_name rather than + duplicating code here. + * ld.texinfo: Describe --unique. - * ldmain.c (main): Initialize link_info.init_function and - link_info.fini_function. - * lexsup.c (OPTION_INIT): New macro. - (OPTION_FINI): Likewise. - (ld_options): Add descriptions for them. + * lexsup.c (ld_options): Make split-by-reloc arg optional. Add + optional arg to split-by-file. (parse_args): Handle them. + * ld.texinfo: Update description of these options. + * ldwrite.c (clone_section): Pass in the section name. Replace + local code with bfd_get_unique_section_name. + (split_sections): Tidy code and comments. Use a list traversal + more appropriate to the list construction. Handle cooked section + sizes. Split when split_by_reloc reached rather than exceeded. + Track section size and split when split_by_file reached. Fix + link_order_tail (even though it's not used). + (ldwrite): Modify condition for calling split_sections to suit + changed split_by_reloc and split_by_file. + * ldmain.c (main): Init config.split_by_reloc and + config.split_by_file to -1. + * ld.h (ld_config_type): Change split_by_reloc to unsigned. + Change split_by_file to bfd_size_type. + +2000-09-02 Nick Clifton <nickc@redhat.com> + + * configure.in: Increase version number to 2.10.91. + * NEWS: Mention new ability to support removal of duplicate DWARF2 + debug information. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. -1999-06-23 Ian Lance Taylor <ian@zembu.com> - - * ldlang.c (section_already_linked): Only discard link once - sections if we are building constructors. - -1999-06-22 Nick Clifton <nickc@cygnus.com> - - * ld.texinfo (Location Counter): Describe behaviour of - location counter inside section statements. - -1999-06-20 Mark Mitchell <mark@codesourcery.com> - - * scripttempl/elf.sc (WRITABLE_RODATA): New variable for - controlling whether or not .rodata is in the data segment or the - text segment. - -1999-06-18 Nick Clifton <nickc@cygnus.com> - - * emultempl/pe.em: Add new command line switch --thumb-entry. - * emultempl/armelf.em: Add new command line switch --thumb-entry. - * emultempl/armcoff.em: Add new command line switch --thumb-entry. - * ld.texinfo: Document new ARM command line switch: --thumb-entry. -1999-06-20 H.J. Lu <hjl@gnu.org> - - * configure.in (all_libpath): Accumulate across all enabled targets. - -Sun Jun 20 14:10:33 1999 Richard Henderson <rth@cygnus.com> - - * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of - DEFAULT_EMULATION. - * emultempl/elf32.em: Likewise. - * emultempl/sunos.em: Likewise. - -Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com> - - * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL. - * configure.in (all_emuls): Add targ_extra_libpath. - (all_libpath, EMULATION_LIBPATH): Define. - * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath. - * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH. - -Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> - - * ld.texinfo: Fix use of @item vs. @itemx. - -1999-06-13 Ian Lance Taylor <ian@zembu.com> - - From Thomas Zenker <thz@lennartz-electronic.de>: - * ldgram.y (attributes_opt): Use attributes_list instead of NAME. - (attributes_list, attributes_string): New nonterminals. - * ldlang.c (lang_set_flags): Add invert parameter. Don't handle - '!'. - * ldlang.c (lang_set_flags): Update declaration. - -1999-06-12 Ian Lance Taylor <ian@zembu.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add - entry_symbol as an undefined symbol when doing a relocateable - link. From <jeffdb@goodnet.com>. - -1999-06-12 David O'Brien <obrien@freebsd.org> - - * configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF. - -1999-06-09 Nick Clifton <nickc@cygnus.com> - - * lexsup.c (help): Restore previous format of output. - -1999-06-04 Nick Clifton <nickc@cygnus.com> - - * emultempl/pe.em: If compiling for arm_epoc_pe rename - interworking functions to avoid a name space clash. - -1999-06-02 Jason Merrill <jason@yorick.cygnus.com> - - * scripttempl/v850.sc: Add initp support. - -1999-06-02 Nick Clifton <nickc@cygnus.com> - - * emultempl/pe.em: Rename global arm interworking functions to - avoid name collision when all targets BFD is built. - -1999-05-30 Cort Dougan <cort@attis.cs.nmt.edu> - - * Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o. - * configure.tgt (powerpc-*-linux-gnu): Use it. - * emulparams/elf32ppclinux.sh: New file. - -1999-05-29 Ian Lance Taylor <ian@zembu.com> - - * ld.texinfo (Options): Clarify that options which refer to files - must be properly ordered. - -1999-05-29 Nick Clifton <nickc@cygnus.com> - - * emultempl/armelf.em (..._parse_args): New function: Parse - command line option. Accept arm-elf specific command line option - '-p' or '--no-pipeline-knowledge'. - (..._list_options): New function: Describe the new command line - option. - (..._before_allocation): Pass the value of the new variable - no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation. - - * emultemp/armelf_oabi.em (..._before_allocation): Pass zero as - the third parameter to bfd_elf32_arm_process_before_allocation. - -1999-05-28 Nick Clifton <nickc@cygnus.com> - - * lexsup.c (help): Minor formatting changes. - -1999-05-28 Martin Dorey <mdorey@madge.com> - - * configure.tgt (i960-*-elf*): New target. - * emulparams/elf32_i960.sh: New file. - * Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o. - (eelf32_i960.c): New target. - * Makefile.in: Rebuild. - -1999-05-26 Nick Clifton <nickc@cygnus.com> - - * emulparams/armelf_oabi.sh (TEMPLATE_NAME): Set to armelf_oabi. +2000-09-02 Daniel Berlin <dberlin@redhat.com> -1999-05-24 Philip Blundell <philb@gnu.org> + * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info + sections. + * scripttempl/elf32var.sc: Ditto. + * scripttempl/elfd10v.sc: Ditto. + * scripttempl/elfd30v.sc: Ditto. + * scripttempl/elfi370.sc: Ditto. + * scripttempl/elfm68hc11.sc: Ditto. + * scripttempl/elfm68hc12.sc: Ditto. + * scripttempl/elfi386beos.sc: Ditto. + * scripttempl/v850.sc: Ditto. - * emultempl/armelf.em (before_parse): Set config.dynamic_link and - config.has_shared. - * emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define. - * emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise. +2000-08-31 Alexandre Oliva <aoliva@redhat.com> -1999-04-13 Philip Blundell <philb@gnu.org> + * acinclude.m4: Include libtool and gettext macros from the + top level. + * aclocal.m4, configure: Rebuilt. - * emultempl/armelf.em: Add definitions related to shared objects - (copied from elf32.em). +2000-08-25 Nick Clifton <nickc@redhat.com> -Wed May 19 12:44:26 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + * ldlang.c (open_output): When choosing the target for a + particular endianness, do nothing if the target is not + supported. - * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and - earm26linux.o, add earmelf_linux.o and earmelf_linux26.o. - * Makefile.in: Regenerated. +2000-08-25 H.J. Lu <hjl@gnu.org> -1999-05-16 Nick Clifton <nickc@cygnus.com> + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't + check -rpath nor LD_RUN_PATH for cross link. + * ld.texinfo: Document the change. - * emulparams/elf32mcore.sh (GENERATE_SHLIB_SCRIPT): Define. - (TEMPLATE_NAME): Define. +2000-08-24 Hans-Peter Nilsson <hp@axis.com> -Thu May 13 09:48:09 1999 Joel Sherrill (joel@OARcorp.com) + * NEWS: Mention support for CRIS. - * configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets. - (mips*el-*-rtems*, powerpcle-*-rtems*): New targets. +2000-08-23 H.J. Lu <hjl@gnu.org> -1999-05-10 DJ Delorie <dj@cygnus.com> + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get + the current runpath list from bfd_elf_get_runpath_list () + before search. - * scripttempl/pe.sc: Specify the output arch, which Ian says is - the Right Thing to do. +2000-08-22 H.J. Lu <hjl@gnu.org> - * emultempl/pe.em: various changes to parameterize the - target-specific information. - (gld_i386pe_after_open): Detect and fix MS import libraries - by renaming the member objects (which are all named the same). + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search + the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after + LD_LIBRARY_PATH for native linker. Display the needed DSO if + trace_file_tries is non-zero. + (gld${EMULATION_NAME}_try_needed): Report the needed DSO found + if trace_file_tries is non-zero. - * pe-dll.c: various changes to parameterize the target-specific - information. - (generate_reloc): support relocs more generically to allow for - expansion. - (pe_exe_build_sections): new; used to add .relocs to .exes - (pe_exe_fill_sections): ditto + * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH. + * NEWS: Mention it. -1999-05-10 Catherine Moore <clm@cygnus.com> +2000-08-14 Jason Eckhardt <jle@cygnus.com> - * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): - Check for TARGET_IS_arm_epoc_pe. - (gld_${EMULATION_NAME}_before_allocation): Likewise. + * NEWS: Mention i860 support. -1999-05-12 Anthony Green <green@cygnus.com> +2000-08-14 Andreas Schwab <schwab@suse.de> - * ldlang.c (walk_wild, walk_wild_file, walk_wild_section, - output_section_callback, gc_section_callback): New functions for - generic section walks. - (wild, lang_gc_wild): Use walk_wild. - (wild_file, lang_gc_wild_file): Deleted. Common logic moved to - walk_wild_file. - (wild_section, lang_gc_wild_section): Deleted. Common logic moved - to walk_fild_section. Unique logic moved into callbacks - output_section_callback and gc_section_callback. + * scripttempl/elf.sc: Fix last change to use correct comment + syntax. -1999-04-26 Tom Tromey <tromey@cygnus.com> +2000-08-10 Geoff Keating <geoffk@cygnus.com> - * aclocal.m4, configure: Updated for new version of libtool. + * scripttempl/elf.sc: Add a comment giving the correspondence + between sections, per-datum sections, and linkonce sections. Make + the comment true even for .bss, .sdata, .sdata2, .sbss, and + .sbss2. -1999-04-12 Philip Blundell <pb@nexus.co.uk> +2000-08-10 Jason Eckhardt <jle@cygnus.com> - * emulparams/armelf_linux.sh: New file. Support for ARM - GNU/Linux ELF ABI. - * emulparams/armelf_linux26.sh: New file. APCS-26 version of above. - * configure.tgt: For arm*-*-linux-gnu*, set default emulation to - `armelf_linux', and also include `armelf_linux26' and `armelf'. - * Makefile.am: Add rules to make earmlinux.c and earmlinux26.c. - (ALL_EMULATIONS): Add earmlinux.o and earmlinux26.o. + * emulparams/elf32_i860.sh: New file. + * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}. + * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o. + (eelf32_i860.c): New rule. * Makefile.in: Regenerate. -1999-04-11 Richard Henderson <rth@cygnus.com> - - * Makefile.am (ALL_EMULATIONS): Add elf_i386_be.o. - * configure.tgt (i[3456]86-*-beos*): Use it. - * emulparams/elf_i386_be.sh: New file. - * Makefile.in: Rebuild. - - * configure.in (environ): Detect declaration. - * ldmain.c (main): Don't declare environ. - * sysdep.h (environ): Declare if needed. - * configure, config.in: Rebuild. - -1999-04-11 Richard Henderson <rth@cygnus.com> - - * ldgram.y (ldgram_vers_current_lang): New. - (vers_defns): Accept `extern "lang" { }' syntax. - * ldlex.l (vers_node_nesting): New. - (V_IDENTIFIER): Accept . and $ in symbols. - (VERS_NODE): Accept `extern "lang" { }' tokens. Nest VERS_NODE states. - * ldlang.c (lang_new_vers_regex): New `lang' argument. Update callers. - (lang_vers_match_lang_c): New function. - (lang_vers_match_lang_cplusplus): New function. - (lang_vers_match_lang_java): New function. - (lang_do_version_exports_section): Fix iteration. Don't free - section contents, as it is still in use by the patterns. - -1999-04-10 Richard Henderson <rth@cygnus.com> - - * ldmain.c (main): Init link_info.no_undefined. - * lexsup.c: Add command-line option --no-undefined. - -1999-04-06 Ian Lance Taylor <ian@zembu.com> - - * ld.h (LC_MESSAGES): Never define. - * ldmain.c (main): Don't pass LC_MESSAGES to setlocale if the - system does not define it. - -1999-04-06 H.J. Lu <hjl@gnu.org> - - * ldmain.h (demangling): Declare. - * ldmain.c (demangling): New global variable. - (main): Initialize demangling. - * ldmisc.c (vfinfo): Don't demangle symbol if ! demangling. - * lexsup.c (ld_options, parse_args): Handle --demangle and - --no-demangle. - * ld.texinfo, ld.1: Document --demangle/--no-demangle. - - * ldlex.l (V_IDENTIFIER): Allow '.' in symbol. - -1999-04-05 Chris Torek <torek@BSDI.COM> - - * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Check that - a shared library really exists, avoiding broken symlinks. - - * ldfile.c (ldfile_open_file): Generate a better error message if - we can't find a -l file. - -1999-04-05 DJ Delorie <dj@cygnus.com> - - * configure.tgt (i386-*-pe): add targ_extra_ofiles for other PE - targets (i386-pe and i386-winnt) - -1999-04-04 Ian Lance Taylor <ian@zembu.com> - - * deffilep.y: Include "sysdep.h" and "ldmisc.h". - (def_file_add_directive): Change return type to void. Remove - unused locals sh_reserve, sh_commit, and j. - (def_ungetc): Always return a value. - (def_lex): Correct parenthesization of || within &&. - * deffile.h (def_file_add_directive): Update declaration. - * pe-dll.c: Include <time.h>, <ctype.h>, and "ldemul.h". - (generate_edata): Remove unused local i. - (quoteput): Add cast to avoid warning. - (pe_dll_generate_def_file): Fix type in format string. - (quick_symbol): Remove unused local blhe. - (pe_dll_generate_implib): Add cast to avoid warning. - (pe_process_import_defs): Remove unused locals ar_head, ar_tail, - and n. - (pe_as16): Comment out. - -1999-04-04 Don Bowman <don@pixsci.com> - - * configure.tgt: Add mips*-*-vxworks* target. - -1999-03-31 Nick Clifton <nickc@cygnus.com> - - * Makefile.in (ALL_EMULATIONS): Add earm_epoc_pe.o - Add build rule and dependencies for earm_epoc_pe.c. - - * emulparams/arm_epoc_pe.sh: New file. - - * configure.tgt: Add 'targ_extra_ofiles' for ARM based PE - targets. - -1999-03-31 Philip Blundell <pb@nexus.co.uk> - - * configure.tgt: Match `arm*-*-linux-gnu*' not - `armv*-*-linux-gnu'. +2000-08-10 Nick Clifton <nickc@cygnus.com> -1999-03-26 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + * emulparams/mipspe.sh (ENTRY): Add definition. - * scripttempl/elf.sc: Put the .eh_frame and .gcc_except_table - sections in the data segment. +2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au> -Fri Mar 26 12:05:51 1999 Catherine Moore <clm@cygnus.com> - - * ld.h (wildcard_spec): Add exclude_name. - * ldgram.y (EXCLUDE_FILE): New token. - (wildcard_spec): Set exclude_name. - (file_NAME_list): Recognize EXCLUDE_FILE. - * ldlang.c (wild_section): Check for excluded files. - (print_wild_statement): Print excluded files. - (lang_add_wild): New argument exclude_filename. - Set exclude_filename. - * ldlang.h (lang_wild_statement_type): Add exclude_filename. - * ldlex.l: New token EXCLUDE_FILE. - * mri.c (mri_draw_tree): Add argument to lang_add_wild. - * scripttempl/elf.sc (CTOR, DTOR): Exclude crtend.o from ctor wildcard. - Reorder sorted and unsorted ctors. - * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise. - * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise. - * scripttempl/elfppc.sc (CTOR, DTOR): Likewise. - -1999-03-26 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_gc_sections): If entry_symbol is not defined, - default to "start". - -1999-03-03 Nick Clifton <nickc@cygnus.com> - - * scripttempl/elf.sc: Add explicit placements for the .eh_frame - and .gcc_except_table sections. - -Wed Mar 3 09:13:34 1999 Catherine Moore <clm@cygnus.clm> - - * scripttempl/elf.sc: Remove .end.ctors and .end.dtors - sections. Reorder .ctors section entries. - * scripttempl/elfd10v.sc: Likewise. - * scripttempl/elfd30v.sc: Likewise. - * scripttempl/elfppc.sc: Likewise. - -1999-02-26 Jim Lemke <jlemke@cygnus.com> - - * ldmain.c (main): Wrong error msg for -r and --mpc860c0. - -1999-02-25 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_check_section_addresses): Remove extraneous - backslash. - -Thu Feb 25 15:07:24 1999 Catherine Moore <clm@cygnus.com> - - * scripttempl/elf.sc: Don't gather .ctor and .dtor sections - for relocateable links. - * scripttempl/elfd10v.sc: Likewise. - * scripttempl/elfd30v.sc: Likewise. - * scripttempl/elfppc.sc: Likewise. - -1999-02-22 Jim Lemke <jlemke@cygnus.com> - - * ldint.texinfo: remove extraneous right brace. - * ldmain.c (main): initialize and check option "mpc860c0". - * lexsup.c (ld_options, parse_args): add option "mpc860c0". - -Wed Feb 17 12:10:06 1999 Stan Cox <scox@cygnus.com> - - * mpw-elfmips.c (gldelf32ebmip_before_allocation): Remove special - .reginfo section handling. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Likewise. - * emulparams/elf32elmip.sh (INITIAL_READONLY_SECTIONS): Removed - * emulparams/elf32ebmip.sh (INITIAL_READONLY_SECTIONS): Removed - -1999-02-17 Nick Clifton <nickc@cygnus.com> - - Patch from: Scott Bambrough <scottb@corelcomputer.com> - - * configure.tgt: Added armv*-*-linux-gnu to $targ_emul - recognition. - -Wed Feb 17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> - - * emultempl/armelf_oabi.em - (bfd_elf32_arm_allocate_interworking_sections, - bfd_elf32_arm_get_bfd_for_interworking, - bfd_elf32_arm_process_before_allocation): Define them to use the - old ABI versions of the functions. - -Tue Feb 16 16:48:19 1999 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Change AC_PREREQ to 2.13. Change AM_PROG_INSTALL - to AC_PROG_INSTALL. Change AM_EXEEXT to AC_EXEEXT. - * Makefile.am (earmelf_oabi.c): Changes spaces to tab. - * acconfig.h: Remove. - * aclocal.m4: Rebuild. - * configure: Rebuild. - * Makefile.in: Rebuild. - -Mon Feb 15 18:21:48 1999 Vladimir N. Makarov <vmakarov@cygnus.com> - - * ldexp.h (struct etree_value_type): Change valid onto valid_p. - - * ldexp.c (new_abs): Ditto. - (new_rel, new_rel_from_section, fold_binary, invalid, fold_name, - exp_fold_tree, exp_binop, exp_trinop, stat_alloc, - exp_get_abs_int): Ditto - - * ldlang.c (print_assignment, lang_size_sections, - lang_do_assignments): Ditto. - -1999-02-11 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_check_section_addresses): New function: Check - addresses assigned to section for overlaps. - (lang_process): Call lang_check_section_addresses if suitable. - - * ld.h: Add new boolean field to args_type structure: - 'check_section_addresses'. - - * ldmain.c: Initialise check_section_addresses field to true. - - * lexsup.c: Add new command line options '--no-check-sections' and - '--check-sections'. - - * ld.texinfo: Document new command line options '--check-sections' - and '--no-check-sections'. - -1999-02-08 Nick Clifton <nickc@cygnus.com> - - * configure.tgt: Add support for StrongARM target. - -Wed Feb 3 19:41:01 1999 Ian Lance Taylor <ian@cygnus.com> - - * ldctor.c (ldctor_build_sets): Just set SEC_KEEP once. Check for - an owner of a section before using it to look up a reloc type. - Don't set SEC_KEEP for the absolute section. - -Mon Feb 1 11:39:46 1999 Catherine Moore <clm@cygnus.com> - - * Makefile.am (earmelf_oabi.o): New. - * Makefile.in: Regenerate. - * configure.tgt (arm-*-oabi): New. - (thumb-*-oabi): New. - * emulparams/armelf_oabi.sh: New. - * emultempl/armelf_oabi.em: New. - -1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com> + * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath + in error message. - * scripttempl/elfppc.sc: Add support for -fleading-underscores - switch in all linker generated symbols. +2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * configure.tgt (powerpc{,le}*-*-vxworks): Add as aliases for - powerpc{,le}-*-eabi. + * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate + the final size of .bss section. + * scripttempl/elfm68hc12.sc: Likewise. -Wed Jan 20 17:01:48 1999 Ian Lance Taylor <ian@cygnus.com> +2000-08-04 Alan Modra <alan@linuxcare.com.au> - * configure.tgt (i[3456]86-*-solaris2*): New target. From Pavel - Roskin <pavel_roskin@geocities.com>. + * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to + gld${EMULATION_NAME}_parse_args for consistency. Combine + lastoptind and prevoptind vars, and keep track of last optind. + (gld_${EMULATION_NAME}_list_options): Rename to + gld${EMULATION_NAME}_list_options. -1999-01-19 Nick Clifton <nickc@cygnus.com> +2000-08-03 Rodney Brown <RodneyBrown@pmsc.com> - * ldlang.c (lang_size_sections): Count loadable sections as - contributing to the size of the current segment. + * configure.tgt: Select targ_emul=elf_i386 for Unixware 7 + (i586-sco-sysv5uw7.1.0). -1999-01-15 Nick Clifton <nickc@cygnus.com> +2000-07-27 H.J. Lu <hjl@gnu.org> - * ldlang.c (lang_size_sections): Only update the current - address of a region if the section just placed into it is an - allocated section. + * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed. + (PARSE_AND_LIST_PROLOGUE): New. + (PARSE_AND_LIST_LONGOPTS): Likewise. + (PARSE_AND_LIST_OPTIONS): Likewise. + (PARSE_AND_LIST_ARGS_CASES): Likewise. + (PARSE_AND_LIST_EPILOGUE): Likewise. -1999-01-12 Nick Clifton <nickc@cygnus.com> +2000-07-28 Alan Modra <alan@linuxcare.com.au> - * Makefile.am: Replace efr30.o with eelf32fr30.o. + * emultempl/armelf.em: Elide functions common to elf32.em, + ie. most of the file. + (arm_elf_after_open): New. Do arm specific things then call + gld${EMULATION_NAME}_after_open. + (arm_elf_before_allocation): New. Call + gld${EMULATION_NAME}_before_allocation then do arm specifics. + (PARSE_AND_LIST_PROLOGUE): Define. + (PARSE_AND_LIST_SHORTOPTS): Define. + (PARSE_AND_LIST_LONGOPTS): Define. + (PARSE_AND_LIST_OPTIONS): Define. + (PARSE_AND_LIST_ARGS_CASES): Define. + (LDEMUL_AFTER_OPEN): Define. + (LDEMUL_BEFORE_ALLOCATION): Define. + (LDEMUL_BEFORE_PARSE): Define. + (LDEMUL_FINISH): Define. + + * emultempl/hppaelf.em: Similarly zap most of this file. + (hppaelf_add_stub_section): Prototype. + (hppaelf_layaout_sections_again): Prototype. + (hook_in_stub): Prototype. + (LDEMUL_SET_OUTPUT_ARCH): Define. + (LDEMUL_FINISH): Define. + (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define. + + * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32. + (EXTRA_EM_FILE): New. + * emulparams/armelf_linux.sh: Likewise. + * emulparams/armelf_linux26.sh: Likewise. + * emulparams/hppalinux.sh: Likewise. + * emulparams/hppaelf.sh: Likewise. + (NOP): Define. + + * emultempl/elf32.em: Fix formatting. + (EXTRA_EM_FILE): Source it. + (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL, + LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION, + LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET, + LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH, + LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS, + LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN, + LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE, + LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE, + LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to + allow functions in this file to be overridden. + (PARSE_AND_LIST_SHORTOPTS): Handle it. + + * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h. + + * emultempl/elf32.em: Reorganize file. + +2000-07-27 Ivan Kokshaysky <ink@jurassic.park.msu.ru> + + * emulparams/elf64alpha.sh: Implement "-taso" emulation + specific option to fit 64-bit executable in the lower + 31-bit address range. This is done by changing start + address of .interp (the very first section of executable) + and then setting EF_ALPHA_32BIT elf header flag. + +2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG> + + * emultempl/m68kcoff.em: New file. + * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template. + * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than + generic.em. * Makefile.in: Regenerate. - * configure.tgt: Replace fr30 with elf32fr30. - - * emulparams/elf32fr30.sh: New file: Replaces fr30.sh, and uses - generic elf.sc script. Also replaces the .stack section with a - user definable symbol __stack. - -1999-01-11 Nick Clifton <nickc@cygnus.com> +2000-07-20 H.J. Lu <hjl@gnu.org> - * scripttempl/fr30.sc: Fill .init and .fini sections with NOP - pattern. + * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags" + and "disable-new-dtags" to stop getopt from treating -d/-e as + abbreviations for these options. -1999-01-03 Ken Raeburn <raeburn@cygnus.com> +2000-07-20 H.J. Lu <hjl@gnu.org> - * Makefile.am (check-DEJAGNU): No longer provide HOSTING_EMU, - HOSTING_CRT0, HOSTING_LIBS; the test suite can extract them from - configure.host and configure.tgt now. - * Makefile.in: Rebuild. - -1998-12-27 Ulrich Drepper <drepper@cygnus.com> - - * lexsup.c (parse_args, case OPTION_RPATH): Avoid adding duplicate - elements to rpath. - -Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> - - * Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o. - (ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead. - * configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES) - if configuring with all targets. - * configure, Makefile.in, aclocal.m4: Rebuild. - - * emultempl/pe.em (pe_enable_stdcall_fixup): Make static. - (pe_dll_do_default_excludes): Removed, unused. - (pe_def_file, pe_dll_export_everything, pe_dll_kill_ats, - pe_dll_stdcall_aliases): Don't initialize them, this file may be - compiled more than once. - * pe-dll.c (pe_def_file, pe_dll_export_everything, - pe_dll_do_default_excludes, pe_dll_kill_ats, - pe_dll_stdcall_aliases): Define and initialize them here instead. - (generate_reloc): Fix allocation of reloc_addresses array to use - bfd_vma instead of unsigned long. Fix element size in qsort call. - (reloc_sort): Compare pointers to bfd_vma instead of unsigned - long. - -Mon Dec 7 21:10:09 1998 J.J. van der Heijden <j.j.vanderheijden@student.utwente.nl> - - * configure.tgt (i[3456]86-*-mingw32*): Add cygwin target specific - files. - -Sun Dec 6 16:33:33 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (m68*-*-gnu*): New target. From Aymeric Vincent - <aymeric.vincent@emi.u-bordeaux.fr>. - -1998-12-04 Nick Clifton <nickc@cygnus.com> - - * emulparams/fr30.sh (TEXT_START_ADDR): Change TEXT_START_ADDR - from 0x100000 to 0x10000 so that it fits in 20 bits. - -Sat Nov 28 22:32:20 1998 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.h (ldemul_recognized_file): Declare. - -Sat Nov 28 22:30:55 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> - - * ldlang.c (lang_add_wild): Don't pretend that there is an input - file if the filename is a wildcard pattern. - -1998-11-25 DJ Delorie <dj@cygnus.com> - - * ldemul.h (ld_emulation_xfer_struct): new hook "recognized_file" - * ldemul.c (ldemul_recognized_file): new function, new hook - * ldint.texinfo: document new hook. - * ldlang.c (load_symbols): call recognized_hook for all objects we - do recognize, in case the emulation needs to handle them - specially. PE DLLs use this. - * pe-dll.c (pe_dll_generate_def_file): take out hack and debug - printfs - * emultempl/pe.em (gld_i386_recognized_file): new function - (gld_i486_unrecognized_file): take out hack - -1998-11-23 DJ Delorie <dj@cygnus.com> - - * pe-dll.c (fill_edata): fill in timestamp - (make_head): name object files sequentially to ensure - they link in the right order. - (make_tail): same here - (pe_process_import_defs): use sequential names for bfds to ensure - proper link order. - (pe_implied_import_dll): new function; handles linking directly - against DLLs by simulating IMPORTS directives. * emultempl/pe.em - (gld_i386pe_before_parse): hack bfd to not recognize .dll files - via bfd_pe_dll_not_recognized_hack - -1998-11-23 DJ Delorie <dj@cygnus.com> - - * emultempl/pe.em (gld_i386pe_parse_args): Conditionalize call to - pe_dll_add_excludes + * ld.texinfo: Add documentation for --disable-new-dtags and + --enable-new-dtags. -Mon Nov 23 14:36:18 1998 Nick Clifton <nickc@cygnus.com> + * ldmain.c (main): Initialize link_info.new_dtags to false. - * emultempl/pe.em (after_parse): Only create an undefined entry - symbol if one has been specified. + * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add + --disable-new-dtags and --enable-new-dtags. + (gld_${EMULATION_NAME}_list_options): Likewise. -1998-11-23 DJ Delorie <dj@cygnus.com> +2000-07-05 Kenneth Block <krblock@computer.org> - * emultempl/pe.em (gld_i386pe_after_open): call - pe_process_import_defs - * pe-dll.c (pe_dll_generate_def_file): calculate BASE from - pe_data, only print if actually set. Print version only if - set. - (save_relocs): save relocs for both input and output. - (make_one): support internal/external different names. - (pe_dll_generate_implib): support new make_one - (pe_process_import_defs): new function; handles IMPORT - directives in .def files. + * ld/lexsup.c: Add optional style to demangle switch + * ld/ld.texinfo: Document optional style to demangle switch. -Fri Nov 20 13:06:49 1998 Nick Clifton <nickc@cygnus.com> +2000-07-20 Hans-Peter Nilsson <hp@axis.com> - * ldmisc.c (vfinfo): Cope with empty symbol names. - -Thu Nov 19 13:31:15 1998 Nick Clifton <nickc@cygnus.com> + * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o, + ecrislinux.o. + (ecrisaout.c, ecriself.c, ecrislinux.c): New rules. + Regenerate dependencies. + * Makefile.in: Rebuild. + * configure.tgt (cris-*-*): New target. + * emulparams/crisaout.sh, emulparams/criself.sh, + emulparams/crislinux.sh, scripttempl/crisaout.sc: New files. + * po/POTFILES.in, po/ld.pot: Regenerate. - * scripttempl/pe.sc: Add provision of '_end' symbol. +2000-07-20 H.J. Lu <hjl@gnu.org> -Wed Nov 18 18:18:43 1998 Geoffrey Noer <noer@cygnus.com> + * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options): + Print out ignored -z options. - * configure.tgt: change refs from cygwin32* to cygwin*. - * aclocal.m4: regenerate - * configure.in: don't need to call AM_CYGWIN32. - * configure: regenerate +2000-07-19 H.J. Lu <hjl@gnu.org> -Mon Nov 16 22:14:07 1998 DJ Delorie <dj@cygnus.com> + * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed. + (PARSE_AND_LIST_PROLOGUE): New. + (PARSE_AND_LIST_LONGOPTS): Likewise. + (PARSE_AND_LIST_OPTIONS): Likewise. + (PARSE_AND_LIST_ARGS_CASES): Likewise. - * emultempl/pe.em (gld_i386_finish): generate import library - * deffile.h: add hint member. - * pe-dll.c (pe_dll_generate_implib): New function with helpers; - generates the import library directly from the export table. - (fill_edata): remember the actual hint for the import library. + * ldmain.c (main): Clear link_info.flags and link_info.flags_1. -Sat Nov 14 14:36:24 1998 Ian Lance Taylor <ian@cygnus.com> + * lexsup.c (ld_options): Comment out 'z'. + (parse_args): Likewise. - * ld.1: Some cleanups from NOKUBI Hirotaka <hnokubi@yyy.or.jp>. + * emultempl/elf32.em: Include "elf/common.h". + (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z + options. + (gld_${EMULATION_NAME}_list_options): Likewise. -Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com> + * ld.texinfo: Add documentation for the recognized -z options. - * po/ld.pot: Regenerated. - * po/POTFILES.in: Regenerated. - * configure: Regenerated. - * aclocal.m4: Regenerated. - * Makefile.in: Regenerated. +2000-07-19 H.J. Lu <hjl@gnu.org> -Wed Nov 11 18:10:15 1998 DJ Delorie <dj@cygnus.com> + * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call + bfd_elf_set_dt_needed_soname (). - * pe-dll.c (generate_reloc): don't output PE relocs for sections - that won't be loaded. +2000-07-18 DJ Delorie <dj@cygnus.com> -Wed Nov 11 13:44:54 1998 DJ Delorie <dj@cygnus.com> + * pe-dll.c (pe_dll_id_target): check object target name also - * pe-dll.c (fill_edata): don't strip underscores +2000-07-18 Hans-Peter Nilsson <hp@axis.com> -Tue Nov 10 21:28:19 1998 DJ Delorie <dj@cygnus.com> + * scripttempl/elf.sc (.init): Only do ${INIT_START} and + ${INIT_END} if relocating. + (.fini): Likewise ${FINI_START} and ${FINI_END}. - * ld.texinfo: added i386pe option summary +2000-07-16 Charles Wilson <cwilson@ece.gatech.edu> -Tue Nov 10 17:53:17 1998 DJ Delorie <dj@cygnus.com> + * src/ld/emultempl/pe.em (gld_*_open_dynamic_archive): New search + order for dynamic library '-lfoo' on pei386: libfoo.dll.a, + foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility + errors introduced by the old dynamic lib search order. - * pe-dll.c (process_def_file): properly note undefined exported - symbols, clean up old code. - (pe_dll_generate_def_file): don't crash if pe_def_file is NULL - * emultempl/pe.em (gld_i386_parse_args): add - (en/dis)able-stdcall-fixups - (pe_fixup_stdcalls): warn about stdcall fixups - (gld_i386_unrecognized_file): make exported symbols undefs so that - archive members get pulled in +2000-07-17 DJ Delorie <dj@cygnus.com> -Tue Nov 10 14:50:51 1998 Catherine Moore <clm@cygnus.com> + * pe-dll.c (process_def_file): auto-export data items also + (pe_process_import_defs): also see if _imp_ form needed - * scripttempl/elfd10v.sc: Add KEEP attribute to .init, - .fini, .dtors and .ctors. Add .data and .text - wildcards to support section garbage collection. +2000-07-12 Charles Wilson <cwilson@ece.gatech.edu> -Mon Nov 9 22:52:50 1998 DJ Delorie <dj@indy.delorie.com> + * pe-dll.c (make_one): fix a typo in the __imp_ name decoration + for dll import libraries - * deffilep.y: properly handle relocs with multiple def_files, - cache import module names +2000-07-12 Mark Elbrecht <snowball3@bigfoot.com> -Mon Nov 9 22:44:58 1998 DJ Delorie <dj@cygnus.com> + * scripttempl/i386go32.sc: Support the g++ attribute init_priority in + gcc 2.95.2 and later. - * pe-dll.c (process_def_file): don't assume exports won't move - during a realloc +2000-07-11 Kazu Hirata <kazu@hxi.com> -Mon Nov 9 16:41:30 1998 DJ Delorie <dj@cygnus.com> + * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error + message. - * pe-dll.c: New file; direct support for PE DLLs - * deffile.h: New file; direct support for PE DLLs - * deffilep.y: New file; direct support for PE DLLs - * emultempl/pe.em: add direct support for PE DLLs - * configure.tgt: allow target-specific extra files - * configure.in: allow target-specific extra files - * ldlang.c (lang_add_assignment): return the assignment so that - one can change the value later based on the object files (pe-dll - DEF files do this) - * ldint.texinfo: add section for emulation walkthrough - * Makefile.am: add new files and target-specific extra files - * emultempl/pe.em (gld_i386_list_options): list dll-specific - options. - * pe-dll.c (process_def_file): auto-export everything if - nothing is otherwise exported. - -Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com> +2000-07-10 Alan Modra <alan@linuxcare.com.au> - * Makefile.am: Add support for FR30 target. - * configure.tgt: Add support for FR30 target. + * ldemul.h (struct lang_input_statement_struct): Remove forward + declaration. + (struct search_dirs): Likewise. + * ldfile.h (struct lang_input_statement_struct): Likewise. + Protect file from multiple inclusion. + * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain + declaration from macro to file scope. + + * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order. + * ldgram.y: Likewise here. + * ldlang.c: And here. + * ldmain.c: And here. + * mpw-elfmips.c: And here. + * mpw-eppcmac.c: And here. + * emultempl/aix.em: And here. + * emultempl/armcoff.em: And here. + * emultempl/armelf.em: And here. + * emultempl/armelf_oabi.em: And here. + * emultempl/beos.em: And here. + * emultempl/elf32.em: And here. + * emultempl/hppaelf.em: And here. + * emultempl/linux.em: And here. + * emultempl/lnk960.em: And here. + * emultempl/pe.em: And here. + * emultempl/sunos.em: And here. + * mpw-esh.c: And here. Include ldexp.h and ldlang.h too. + * mpw-idtmips.c: Ditto. + * emultempl/generic.em: Ditto. + * emultempl/gld960.em: Ditto. + * emultempl/gld960c.em: Ditto. + * emultempl/mipsecoff.em: Ditto. + * emultempl/ticoff.em: Ditto. + * emultempl/vanilla.em: Ditto. + + * pe-dll.c: Include ldfile.h + * ldver.c: Include ldexp.h, ldlang.h, ldfile.h + + * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing + arguments to bfd_elf32_size_dynamic_sections call. + (gldelf32ebmip_place_orphan): Add missing arguments to + lang_leave_output_section_statement call. + +2000-07-10 H.J. Lu <hjl@gnu.org> + + * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with + DLL_SUPPORT. + (strhash): Likewise. + (compute_dll_image_base): Likewise. + (pe_undef_found_sym): Likewise. + (pe_undef_cdecl_match): Likewise. + (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the + argument "arch" with ATTRIBUTE_UNUSED. + +2000-07-10 Alan Modra <alan@linuxcare.com.au> + + * configure.tgt: Remove extraneous hppa*-*-linux-gnu*. + + From Ryan Bradetich <rbradetich@uswest.net> + * ldwrite.c (SSIZE): Remove to cure macro redefinition warning. + +2000-07-09 Alan Modra <alan@linuxcare.com.au> + + Changes to create multiple linker stubs, positioned immediately + before the section where they are required. + * emultempl/hppaelf.em: Include elf32-hppa.h. + (stub_sec, file_chain): Delete. + (hppaelf_create_output_section_statements): Don't make a stub + section here. + (hook_stub_info): New struct. + (hook_in_stub): New function. + (hppaelf_add_stub_section): New function. + (hppaelf_finish): Do nothing for relocateable links. Modify the + call to elf32_hppa_size_stubs. Move code for updating section + layout from here... + (hppaelf_layaout_sections_again): ..to here, a new function. + + * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix + broken list handling. Pass in a pointer to the list. + (hppaelf_finish): Update call to hppaelf_delete_padding_statements + for above changes. + (hppaelf_before_parse): Prototype. + (hppaelf_set_output_arch): Prototype. + (hppaelf_create_output_section_statements): Prototype. + (hppaelf_delete_padding_statements): Prototype. + (hppaelf_finish): Prototype. + + Merge from elf32.em + * emultempl/hppaelf.em: Include ctype.h. + (struct orphan_save): New. + (gld${EMULATION_NAME}_place_orphan): New. + (output_rel_find): New. + (hppaelf_get_script): Update from elf32.em. + (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation. + Change emulation_name field to "${EMULATION_NAME}". Add + gld${EMULATION_NAME}_place_orphan. + + * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add + ehppalinux.o, sort it. Regenerate dependencies. + (ehppalinux.c): Depend on hppaelf.em * Makefile.in: Regenerate. - * emulparams/fr30.sh: New file. - * scripttemp/fr30.sc: New file. - -Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com> - - * ldmain.c (main): Don't report error for dynamic links and - --gc-sections. - -1998-10-26 16:05 Ulrich Drepper <drepper@cygnus.com> - - * lexsup.c (ld_options): Change text of -O to Optimize output file". - (parse_args): Set link_info.optimize based on -O argument. - * ldmain.c (main): Initialize link_info.optimze to false. - * ld.texinfo: Describe -O option. - * ld.1: Likewise. - -Mon Oct 12 14:29:56 1998 Nick Clifton <nickc@cygnus.com> - - * scripttempl/v850.sc: Move .sbss and .scommon sections into their - own segment, so that they can be next to the .bss section and so - initialised by the same piece of code. - -Fri Oct 9 15:59:52 1998 Catherine Moore <clm@cygnus.com> - - * scripttempl/elf.sc: Merge .sdata.* etc sections. - * ldctor.c (ldctor_build_sets): Set SEC_KEEP for - ctor sections. - -Mon Oct 5 09:40:43 1998 Catherine Moore <clm@cygnus.com> - - * ldmain.c (main): Error if --gc-sections and - dyanmic linking. - * scripttempl/v850.sc: Add KEEP attribute to .init, - .fini, .dtors and .ctors. Add .data and .text - wildcards to support section garbage collection. - -Wed Sep 30 11:19:15 1998 Nick Clifton <nickc@cygnus.com> - - * scripttempl/v850.sc: Rename .call_table section to - .call_table_data and create a new section called - .call_table_text. - -Sun Sep 20 00:43:26 1998 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elf.sc: Add alignment at the end of the .bss - section, so that it is included in the memsize of the segment. - -Fri Sep 18 13:42:42 1998 Catherine Moore <clm@cygnus.com> - * emultempl/elf32.em (gld_place_orphan): Don't process for - sections with SEC_EXCLUDE flag. + * configure.tgt: targ_emul=hppalinux for hppa*linux -Fri Sep 4 09:24:02 1998 Nick Clifton <nickc@cygnus.com> + * emulparams/hppalinux.sh: New. + * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex. - * emulparams/d30velf.sh (TEXT_SIZE): Increased to 2000K. - (DATA_SIZE): Increased to 2000K. +2000-07-08 Alan Modra <alan@linuxcare.com.au> -Thu Sep 3 17:30:58 1998 Richard Henderson <rth@cygnus.com> + * lexsup.c (parse_args): Copy section name. - * emulparams/d10velf.sh (TEMPLATE_NAME): Use elf32. +2000-07-07 Charles Wilson <cwilson@ece.gatech.edu> -Mon Aug 31 01:06:00 1998 Catherine Moore <clm@cygnus.com> + * emultempl/pe.em: institute the following search order for + dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import + libs), libfoo.dll, foo.dll (link direct to dll). Fall back to + static lib (libfoo.a) if none of the above are found. - * Makefile.am: Change armelf.sc to elf.sc - * Makefile.in: Regenerate. +2000-07-07 Mumit Khan <khan@xraylith.wisc.edu> -Mon Aug 31 11:12:04 1998 Catherine Moore <clm@cygnus.com> + * emultempl/pe.em (pe_enable_auto_image_base): New variable. + (longopts): New --{enable,disable}-auto-image-base options. + (gld_${EMULATION_NAME}_list_options): Document. + (gld_${EMULATION_NAME}_parse): Handle. + (strhash): New static function. + (compute_dll_image_base): New static function. + (gld_${EMULATION_NAME}_set_symbols): Use. - * emulparams/armelf.sh: Change SCRIPT_NAME to - elf. Change TEXT_START_ADDR to 0x8000. Define - OTHER_TEXT_SECTIONS, OTHER_BSS_SYMBOLS and - OTHER_BSS_END_SYMBOLS. - * scripttempl/elf.sc: Modify to use - OTHER_BSS_END_SYMBOLS. - * scripttempl/elfarm.sc: Remove file. +2000-07-05 DJ Delorie <dj@redhat.com> -Tue Aug 18 12:05:34 1998 Catherine Moore <clm@cygnus.com> + * MAINTAINERS: new - * emultempl/armelf.em (gld_armelf_before_allocation): - Add bfd_ prefix to elf32_arm_process_before_allocation - and elf32_arm_allocate_interworking_sections. - (gld_armelf_after_open): Add bfd_ prefix to - elf32_arm_get_bfd_for_interworking. +2000-07-01 Koundinya K <kk@ddeorg.soft.net> -Fri Aug 14 15:34:29 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. - - * ldgram.y: Include "ldctor.h". - (statement): Accept SORT around CONSTRUCTORS. - * ldctor.c: Include <ctype.h>. - (constructors_sorted): New global variable. - (ctor_prio, ctor_cmp): New static functions. - (ldctor_build_sets): Sort constructors if requested. - * ldctor.h (constructors_sorted): Declare. - * ldlang.c (print_statement): Print sorted CONSTRUCTORS - correctly. - * scripttempl/elf.sc: Add sort around CONSTRUCTORS. - * ld.texinfo (Output Section Keywords): Document SORT - (CONSTRUCTORS). - -Thu Aug 13 12:20:39 1998 Catherine Moore <clm@cygnus.com> - - * emulparams/armelf.sh: Define TEMPLATE_NAME to armelf. - * scripttempl/elfarm.sc: Include .glue_7t and .glue7 - sections. - * emultempl/armelf.em: New file. - -Thu Aug 13 12:52:45 1998 H.J. Lu <hjl@gnu.org> - - * Makefile.am (ld.dvi): Use " instead of ' for MAKEINFO. + * configure.tgt: Add traditional mips (mips*-*-sysv4*) target. + * emulparams/elf32btsmip.sh: New file. + * Makefile.am: Add traditional mips target. * Makefile.in: Rebuild. -Tue Aug 11 16:17:01 1998 Catherine Moore <clm@cygnus.com> - - * scripttempl/elfarm.sc: Change text start address - back to zero. - -Tue Aug 11 10:01:12 1998 Jeffrey A Law (law@cygnus.com) - - * emulparms/mn10200.sh (MAX_PAGESIZE): Define to 1. - * emulparms/mn10300.sh (MAX_PAGESIZE): Define to 1. - -Sun Aug 9 20:31:27 1998 Catherine Moore <clm@cygnus.com> - - * scripttempl/elfarm.sc: Set text start address to - 0x8000. Add __bss_end definition. - -Sat Aug 1 11:47:37 1998 Catherine Moore <clm@cygnus.com> - - * scripttempl/elfarm.sc: New file. - * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm. - -Fri Jul 31 15:56:16 1998 Catherine Moore <clm@cygnus.com> +2000-07-01 H.J. Lu <hjl@gnu.org> - * emulparams/armelf.sh: New file. - * configure.tgt: Recognize thumb-elf and arm-elf. - * Makefile.am (earmelf.o): New. - * Makefile.in: Rebuild. - -Fri Jul 24 12:00:57 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am (install-exec-local): Don't remove the file before - checking whether $(bindir) == $(tooldir)/bin. From Maciej - W. Rozycki <macro@ds2.pg.gda.pl>. + * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for + automake to use YLWRAP. * Makefile.in: Rebuild. - * configure.tgt: Recognize h8[35]00*-coff* as well as -hms*. - -Thu Jul 23 11:15:12 1998 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/aout.sc: If ALIGNMENT is defined, use it to set - alignment of end symbol. - * scripttempl/elf.sc: Likewise. - * emulparams/sun4.sh (ALIGNMENT): Define. - * emulparams/elf32_sparc.sh (ALIGNMENT): Define. - * ldint.texinfo (emulation parameters): Document ALIGNMENT. - - * lexsup.c (parse_args): Add missing break statement. - - * ldlang.c (lang_gc_sections_1): Add default case to switch to - avoid warnings. +2000-07-01 Alan Modra <alan@linuxcare.com.au> -Tue Jul 14 15:42:17 1998 Richard Henderson <rth@cygnus.com> - - * configure.tgt (i?86-*-beos{pe,elf,}*): Recognize. - * Makefile.am (ei386beos.o): New. - * emulparams/i386beos.sh: New file. - * emultempl/beos.em, scripttempl/i386beos.sc: New file. - -Tue Jul 14 15:35:42 1998 Richard Henderson <rth@cygnus.com> - - * lexsup.c: New option --version-exports-section. - * ld.h (struct args_type): Add version_exports_section. - * ldlang.c (lang_do_version_exports_section): New function. - (lang_process): Call it. + * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed + (CLEANFILES): Add DEPA. + * Makefile.in: Regenerate. -Mon Jul 13 13:20:23 1998 Steve Chamberlain <sac@transmeta.com> +2000-06-30 Timothy Wall <twall@ppc> - * ldlex.l: Accept ASSERT. - * ldgram.y (exp): Add ASSERT_K case. - * ldexp.h (node_type): Add etree_assert to node_class enum. - (etree_type): Add assert_s field. - (exp_assert): Declare. - * ldexp.c (exp_fold_tree): Handle etree_assert. - (exp_assert): New function. - (exp_print_tree): Handle etree_assert. - * ld.texinfo (Miscellaneous Commands): Document ASSERT. + * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode + the page in the upper octet of the address. -Wed Jul 8 14:03:12 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl> - * ldgram.y: Change MAX to MAX_K and MIN to MIN_K, to avoid - conflicts with system header files. Change all uses. + * emulparams/avrmega161.sh (ARCH): Change to avr:5. - * Makefile.am (MAINTAINERCLEANFILES): Define. - * Makefile.in: Rebuild. +2000-06-24 Alan Modra <alan@linuxcare.com.au> -Tue Jul 7 18:03:22 1998 Ian Lance Taylor <ian@cygnus.com> + * NEWS: arm-elf does --gc-sections too. - * Makefile.am (ldver.texi): New target. - (ld.info, ld.dvi): Depend upon ldver.texi. - * ld.texinfo: Include ldver.texi. Mention version number on title - page and in top node. - * Makefile.in: Rebuild. +2000-06-22 Alan Modra <alan@linuxcare.com.au> -Mon Jul 6 14:55:13 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (i[3456]86-*-solaris*): New target. - -Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (wild_section): Don't get an assertion failure if the - section is discarded. - - * scripttempl/pe.sc: Use SORT to sort sections appropriately. - * emultempl/pe.em (sort_by_file_name): Remove. - (sort_by_section_name): Remove. - (sort_sections_1, sort_sections): Remove. - (gld_${EMULATION_NAME}_before_allocation): Don't call - sort_sections. - (hold_section, hold_section_name): New static variables. - (hold_use, hold_text, hold_rdata, hold_data, hold_bss): Likewise. - (gld_${EMULATION_NAME}_place_orphan): Rewrite. Look for a good - place to put the section. Align the section. Sort the input - sections by name. - (gld_${EMULATION_NAME}_place_section): New static function. - - * ldlang.c (wild_sort): When sorting by file name, sort by archive - name first. - - * emultempl/pe.em (set_pe_subsystem): Don't call - ldlang_add_undef. - (gld_${EMULATION_NAME}_after_parse): New static function. - (ld_${EMULATION_NAME}_emulation): Use new after_parse function - rather than after_parse_default. - - * ldgram.y (extern_name_list): Do not require symbols to be - separated by commas. - (ifile_p1): Add EXTERN. - * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI - mode. - * ld.texinfo (Options): Mention that EXTERN is equivalent to -u. - (Miscellaneous Commands): Document EXTERN. - -Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com> - - * ld.h (args_type): Add gc_sections. - * ldgram.y (ldgram_had_keep, KEEP): New. - (input_section_spec_no_keep): Rename from old input_section_spec. - (input_section_spec): New. Recognize KEEP. - * ldlang.c (wild_section): Handle keep sections. - (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New. - (lang_gc_sections_1, lang_gc_sections): New. - (lang_process): Invoke lang_gc_sections. - (lang_add_wild): Add keep argument. Update all callers. - * ldlang.h (lang_wild_statement_struct): Add keep_sections. - * ldlex.l (KEEP): Match it. - * ldmain.c (main): Error on -r and --gc-sections. - * lexsup.c: Add --gc-sections. - - * scripttempl/elf.sc: Merge .text.* etc sections appropriately. - Mark startup sections with KEEP. - * scripttempl/elfppc.sc: Likewise. - - * ld.texinfo: Update for --gc-sections and KEEP. - -Wed Jul 1 15:21:20 1998 Ian Lance Taylor <ian@cygnus.com> - - From Peter Jordan <pjordan@chla.usc.edu>: - * scripttempl/i386go32.sc: Correct constructor handling for -u. - -Tue Jun 23 15:17:27 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am (install-data-local): Make ldscripts subdirectory. - * Makefile.in: Rebuild. + * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we + find one. + * Makefile.in: Regenerate. -Tue Jun 23 15:17:04 1998 Mike Stump <mrs@wrs.com> +2000-06-21 H.J. Lu <hjl@gnu.org> - * Makefile.am (install-exec-local): Don't let EXEEXT interfere - with the program transform name. + * Makefile.am: Rebuild dependency. * Makefile.in: Rebuild. -Sun Jun 21 23:55:16 1998 Jeffrey A Law (law@cygnus.com) +2000-06-20 H.J. Lu <hjl@gnu.org> - * ld.texinfo: Note that -relax may make symbolic debugging - impossible on some platforms. - -Tue Jun 16 12:51:13 1998 Geoff Keating <geoffk@ozemail.com.au> - - * Makefile.am (Makefile): Remove target. - (config.status): New target. + * Makefile.am: Rebuild dependency. * Makefile.in: Rebuild. - * configure.host (powerpc*-*-linux-gnu*): New host. - -Fri Jun 12 17:38:07 1998 Doug Evans <devans@seba.cygnus.com> - - * scripttempl/elf.sc (INPUT_FILES): Optional INPUT spec. - - * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Change top of - stack to 8MB. - -Fri Jun 12 19:33:17 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am (HFILES): Remove config.h. - (EMULATION_OFILES, POTFILES): Move patch of May 14 from - Makefile.in to Makefile.am. - (earmcoff.c): Depend upon armcoff.em, not generic.em. - * po/Make-in (all-yes): Correct misspelling in $(PACKAGE). - ($(srcdir)/$(PACKAGE).pot): Pass -C to $(XGETTEXT). - * Makefile.in, po/POTFILES.in, po/ld.pot: Rebuild. - -Fri Jun 12 13:43:17 1998 Tom Tromey <tromey@cygnus.com> - - * po/Make-in (all-yes): If maintainer mode, depend on .pot file. - ($(PACKAGE).pot): Unconditionally depend on POTFILES. - -Tue Jun 9 09:36:48 1998 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_finish): Add CONST type modifier to declaration - of 'send'. - -Fri Jun 5 18:19:59 1998 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set - config.has_shared to true. - * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): - Likewise. - * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): - Likewise. - -Tue Jun 2 12:55:03 1998 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_finish): If the entry symbol is not found, try - parsing it as a number. - * ld.texinfo (Options): Document this. - -Mon Jun 1 14:01:20 1998 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Input Section Wildcards): Document SORT keyword. - -Mon May 18 12:42:53 1998 Doug Evans <devans@canuck.cygnus.com> - - * ld.h (ld_config_type): New member has_shared. - * ldmain.c (main): Initialize it. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it. - * lexsup.c (parse_args): Treat -shared as error if not supported. +2000-06-20 Timothy Wall <twall@cygnus.com> -Mon May 18 13:14:43 1998 Ian Lance Taylor <ian@cygnus.com> + * scripttempl/tic54xcoff.sc: New. + * ldlang.c (wild_doit): Propagate SEC_BLOCK flag. + * gen-doc.texi: Add flag for TI COFF. + * ld.texinfo: Add documentation for TI COFF handling switches. + * emultempl/ticoff.em: New. TI COFF handling. + * configure.tgt: Add tic54x target. + * Makefile.am: Add tic54x target. + * Makefile.in: Ditto. - From Jason Merrill <jason@cygnus.com>: - * ldlang.c (wild_sort): Correct order of sort. - * scripttempl/elf.sc: Put *crtbegin.o before other .ctors and - .dtors. - * scripttempl/elfd10v.sc: Likewise. - * scripttempl/elfd30v.sc: Likewise. - * scripttempl/elfppc.sc: Likewise. +2000-06-20 Alan Modra <alan@linuxcare.com.au> -Fri May 15 00:22:35 1998 Ian Lance Taylor <ian@cygnus.com> + * ldmain.c (set_scripts_dir): Correct pointer comparison when + checking for backslashes. - * ldlex.l: Recognize keyword SORT. - * ldgram.y (current_file): Change to struct wildcard_spec. - (%union): Add new fields cname and wildcard. - (wildcard_name, wildcard_spec): New nonterminals. - (file_NAME_list): Use wildcard_spec. - (input_section_spec): Change current_file usage. - * ld.h (struct wildcard_spec): Define. - * ldlang.h (lang_wild_statement_struct): Add new fields - sections_sorted and filenames_sorted. - (lang_add_wild): Update declaration. - * ldlang.c (wild_sort): New static function. - (wild_section): Use wild_sort. - (print_wild_statement): Print sorting information. - (lang_add_wild): Add new parameters sections_sorted and - filenames_sorted. Change all callers. - * mri.c (mri_draw_tree): Update calls to lang_add_wild. - * scripttempl/elf.sc: Sort .ctors.* and .dtors.* by section name. - * scripttempl/elfd10v.sc: Likewise. - * scripttempl/elfd30v.sc: Likewise. - * scripttempl/elfppc.sc: Likewise. +2000-06-19 Alan Modra <alan@linuxcare.com.au> -Thu May 14 18:39:16 1998 Richard Henderson <rth@cygnus.com> + * NEWS: Move entries not in 2.10 above "Changes in version 2.10". - * emulparams/m32relf.sh (TEMPLATE_NAME): Define. - -Thu May 14 14:51:24 1998 Nick Clifton <nickc@cygnus.com> - - * ldemul.h: Add new prototype: ldemul_list_emulation_options. - (ld_emulation_xfer_struct): Add new field: list_options. - * ldemul.c (ldemul_list_options): New function. Call the - list_options field of the ld_emulation_xfer_struct for each - supported emulation, if such a function is present. - * lexsup.c (help): Call ldemul_list_emulation_options. - * emultempl/pe.em (gld_<>_list_options): New function. Describe - the pe emulation specific command line options. - * emultempl/armcoff.em (gld<>_list_options): New function. - Describe the armcoff emulation specific command line options. - - * emultempl/pe.em: Add a new command line option: - --support-old-code. - * emultempl/armcoff.em: Ditto. - * ld.texinfo: Document the --support-old-code option. - - * Makefile.in: Add emulation files for POTFILES.in target. - * emultempl/pe.em: Internationalise suitable strings. - * emultempl/armcoff.em: Internationalise suitable strings. - * po/POTFILES.in: Rebuilt. - -Sun May 10 22:36:30 1998 Jeffrey A Law (law@cygnus.com) - - * po/Make-in (install-info): New target. - -Tue Apr 28 19:18:30 1998 Tom Tromey <tromey@cygnus.com> - - * ldmain.c (main): Conditionally call setlocale. - * ld.h: Include <locale.h> if HAVE_LOCALE_H. - (LC_MESSAGES): Now can be defined even when ENABLE_NLS. - -Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Change version number to 2.9.4 - * configure: Rebuild. - - * ld.texinfo (Options) [-rpath-link]: Mention ld.so.conf. - - Based on patch from H.J. Lu <hjl@gnu.org>: - * emultempl/elf32.em (global_vercheck_needed): New file static - variable. - (global_vercheck_failed): New file static variable. - (gld${EMULATION_NAME}_after_open): Check for shared libraries - twice, once with force set to 0 and once with it set to 1. - (gld${EMULATION_NAME}_check_ld_so_conf): Add force parameter. - Change all callers. - (gld${EMULATION_NAME}_search_needed): Likewise. - (gld${EMULATION_NAME}_try_needed): Likewise. If not force, check - whether the libraries needs any incompatible versions. - (gld${EMULATION_NAME}_vercheck): New static function. +2000-06-18 Alan Modra <alan@linuxcare.com.au> -Wed Apr 22 16:01:35 1998 Tom Tromey <tromey@cygnus.com> + * NEWS: Update list of targets supporting --gc-sections. - * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + * scripttempl/elf.sc: KEEP .eh_frame contents. + * scripttempl/elfd30v.sc: Same here. -Wed Apr 22 12:40:56 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-18 Stephane Carrez <stcarrez@worldnet.fr> - * Makefile.am (check-DEJAGNU): Add $(INTLLIBS) to LIBIBERTY when - invoking runtest. + * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12 + and m68hc11 (elf). * Makefile.in: Rebuild. + * configure.tgt: Recognize m68hc12 and m68hc11. + * scripttempl/elfm68hc12.sc: New file. + * emulparams/m68hc12elfb: New emulation. + * emulparams/m68hc12elf: New emulation. + * emulparams/m68hc11elfb.sh: New file. User configurable emulation + (includes a memory.x script to define the ROM and RAM banks). + * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh: + New configuration files for support of Motorola 68hc11 - * lexsup.c (parse_args): Change -l options into --library options - to avoid confusion between -li and -library. - - * ld.texinfo (MEMORY): Clarify use of >REGION. - -Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com> - - * Many files: Added gettext invocations around user-visible - strings. - * ld.h: Added gettext-related includes and defines. - * ldmain.c: Call setlocale, bindtextdomain, textdomain. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, - HAVE_LC_MESSAGES): Define. - * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and - po/Makefile. Use AM_PROG_LEX. - (TDIRS): AC_SUBST early on, to avoid having value split when it - happens to cross line 90 of the generated sed script. - * Makefile.am (SUBDIRS): New macro. - (POTFILES): Likewise. - (po/POTFILES.in): New target. - (ld_new_LDADD): Added INTLLIBS. - (ld_new_DEPENDENCIES): Added INTLDEPS. - * po/Make-in, po/POTFILES.in, po/gas.pot: New files. - -Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Simple Example): Rewrite a few things as suggested - by Nick Clifton <nickc@cygnus.com>. - (PROVIDE): Likewise. - -Tue Apr 21 09:55:06 1998 Nick Clifton <nickc@cygnus.com> - - * emultempl/pe.em: Rename external arm interworking functions - to conform to BFD naming conventions. Add code to _after_open() - function to obtain a bfd for use by the interworking code. +2000-06-15 Alan Modra <alan@linuxcare.com.au> - * emultempl/armcoff.em: Rename external arm interworking functions - to conform to BFD naming conventions. Add new _after_open() - function to obtain a bfd for use by the interworking code. + * ldmain.c (main): Only change SEC_READONLY for final link. -Sun Apr 19 19:23:09 1998 Richard Henderson <rth@cygnus.com> +2000-06-13 H.J. Lu <hjl@gnu.org> - * ldlang.c (lang_size_sections) [case lang_assignment_statement_enum]: - Update dot and the default memory section even when relaxing. - -Sat Apr 18 18:41:12 1998 Richard Henderson <rth@cygnus.com> - - * ldlang.c (lang_one_common): Manipulate the section's cooked size - rather than its raw size. - -Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org> - - * configure.in (TESTBFDLIB): New. Defined and substituted. - * Makefile.am (TESTBFDLIB): Changed to @TESTBFDLIB@. - * configure, Makefile.in: Rebuild. - -Mon Apr 6 15:33:39 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am (ld.info): Invoke makeinfo with -I options directly - rather than relying on default rule. Don't depend upon - bfdsumm.texi. - (ld.dvi): Likewise. - (bfdsumm.texi): Remove target. - (CLEANFILES): Take bfdsumm.texi out of value. - * Makefile.in: Rebuild. + * configure: Regenerate. -Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-08 David O'Brien <obrien@FreeBSD.org> - * scripttempl/pe.sc: Use shell variables to avoid depending upon - how $ is handled when expanding a shell substitution. + * configure.in (VERSION): Update to show this is the CVS mainline. -Fri Apr 3 00:56:50 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG> - * Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum. - (DISTCLEANFILES): Add site.exp and site.bak. - * Makefile.in: Rebuild. + * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all + input objects to be ECOFF. + (check_sections): einfo takes %B, not %P, to print a BFD name. - * configure.in: Put the tdirs in a file and use AC_SUBST_FILE, - rather than in a shell variable and using AC_SUBST. - * Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs. - (distclean-local): New target. - * configure, Makefile.in: Rebuild. +2000-06-05 Michael Matz <matz@ifh.de> - * ld.texinfo: Completely rewrite linker script documentation. + * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in + version scripts. -Mon Mar 30 12:47:33 1998 Ian Lance Taylor <ian@cygnus.com> + * ldlex.l (V_IDENTIFIER): Accept `::' in symbols. - * configure.in: Set version to 2.9.1. - * configure: Rebuild. +2000-05-23 Marek Michalkiewicz <marekm@linux.org.pl> - * Branched binutils 2.9. + * emulparams/avr1200.sh (STACK): Define as 0. + * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address. + * emulparams/avr4433.sh (STACK): Likewise. + * emulparams/avr44x4.sh (STACK): Likewise. + * emulparams/avr85xx.sh (STACK): Likewise. + * emulparams/avrmega103.sh (STACK): Likewise. + * emulparams/avrmega161.sh (STACK): Likewise. + * emulparams/avrmega603.sh (STACK): Likewise. + * scripttempl/elf32avr.sc (__data_start): Define for gcrt1. + (__stack): Define from ${STACK} for main(). -Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com> +2000-05-26 Alan Modra <alan@linuxcare.com.au> - * Makefile.am (MOSTLYCLEANFILES): Remove tmpdir. - (mostlyclean-local): New target to remove tmpdir. - * Makefile.in: Rebuild. + * Makefile.am: Update dependencies with "make dep-am" + * Makefile.in: Regenerate. - Fix some gcc -Wall warnings: - * ldcref.c (output_cref): Add casts to avoid warnings. - * ldfile.c (ldfile_add_arch): Likewise. - * ldlang.c (lang_leave_overlay_section): Likewise. - * lexsup.c (OPTION_COUNT): Likewise. - (parse_args): Likewise. - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): - Likewise. - * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Likewise. - * ldlang.c (lang_check): Initialize variables to avoid warnings. - * ldwrite.c (build_link_order): Likewise. - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Likewise. - * emultempl/armcoff.em (gld${EMULATION_NAME}_before_allocation): - Remove unused variables. - - * Makefile.am (MOSTLYCLEANFILES): Correct name (was - MOSTCLEANFILES). - * Makefile.in: Rebuild. +2000-05-26 Eli Zaretskii <eliz@is.elta.co.il> -Fri Mar 27 16:39:25 1998 Ian Lance Taylor <ian@cygnus.com> + * ldmain.c: Include filenames.h. + (set_scripts_dir): Support backslashes in program name. - * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Put - ARM code inside ifdef TARGET_IS_armpe. +2000-05-22 Igor Shevlyakov <igor@windriver.com> -Wed Mar 25 11:34:13 1998 Ian Lance Taylor <ian@cygnus.com> + * ldmain.c (main): When deciding if ".text" section should be + read-only, don't forget to reset SEC_READONLY because it + could be already set. - Based on patch from H.J. Lu <hjl@gnu.org>: - * Makefile.am (LDDISTSTUFF): New variable. - (diststuff): New target. - * Makefile.in: Rebuild. +2000-05-22 Thomas de Lellis <tdel@windriver.com> - * scripttempl/pe.sc: Only include .idata\$[0-7] in .idata when - relocating. + * ld.1: Add documentation for new command line option: + --section-start <sectionname>=<sectionorg> + This is a generic version of -Ttext etc. which accepts + any section name as a parameter instead of just text/data/ + bss. + * ld.texinfo: More docs. + * NEWS: More docs. + * lexsup.c: (parse_args): Recognize new command line option. + (ld_options): Add new option. -Tue Mar 24 15:59:29 1998 Nick Clifton <nickc@cygnus.com> +2000-05-18 H.J. Lu <hjl@gnu.org> - * scripttempl/pe.sc (.text): Add .glue_7 and .glue_7t sections to - hold Arm/Thumb stubs. + * lexsup.c (parse_args): `i' == `r', not `q'. - * emultempl/pe.em (gld_pe_before_allocation): Call - arm_process_before_allocation (for ARM/Thumb targets) in order to - gather interworking stb information. +Thu May 18 10:47:57 2000 Jeffrey A Law (law@cygnus.com) -Mon Mar 23 18:54:15 1998 Joel Sherrill <joel@OARcorp.com> + * configure.tgt (hppa*64*-*-*): Enable PA64 target. - * configure.tgt: (sh*-*-rtems*): Switched from ELF to COFF. +2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com> + Rick Gorton <gorton@scrugs.lkg.dec.com> -Fri Mar 20 19:17:13 1998 Ian Lance Taylor <ian@cygnus.com> + Add support for '-q' == '--emit-relocs' switch. + * ldmain.c (main): Default to false. + * lexsup.c (parse_args): Turn on emitrelocations flag if set. + * NEWS: Describe the emitrelocations switch. + * ld.texinfo: Describe the emitrelocations switch. - * aclocal.m4, configure: Rebuild with libtool 1.2. +2000-05-16 Charles Wilson <cwilson@ece.gatech.edu> -Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com> + * ld/emultempl/pe.em (_open_dynamic_archive): New function: Search + the library path for "foo.dll" and "libfoo.dll" dynamic libraries + before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo' + link options. - * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy - section to avoid copying certain data on fork. The linker used to - include this between __data_start__ and __data_end__, but that - breaks building the cygwin32 dll. The fix is to rename the - section ".data_cygwin_nocopy" and explictly include it after - __data_end__. +2000-05-15 David O'Brien <obrien@FreeBSD.org> -Wed Mar 18 09:42:24 1998 Nick Clifton <nickc@cygnus.com> + * lexsup.c (parse_args): Update the year in the copyright notice. - * configure.tgt (targ_extra_emuls): Add thumb-pe target. +2000-05-13 Alan Modra <alan@linuxcare.com.au> -Sun Mar 8 23:34:14 1998 Stan Cox <scox@equinox.cygnus.com> + * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain): + Replace defines with those from intl/libgettext.h to quieten gcc + warnings. - * configure.tgt (sparclite*-*-elf): Added. +2000-05-10 H.J. Lu <hjl@gnu.org> -Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com> + * ldlang.c (open_input_bfds): Don't load the same file within + a group again if the whole archive has been loaded already. - * ldlang.c (lang_size_sections): If the default memory region is - *default*, see if there is a memory region that could be used. +2000-05-03 Alan Modra <alan@linuxcare.com.au> -Thu Feb 26 17:09:53 1998 Michael Meissner <meissner@cygnus.com> + From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de> + * lexsup.c (set_section_start): Use bfd_scan_vma rather than + strtoul. - * scripttempl/elfd30v.sc: Add support for .eit_v section and put - it at 0xfffff020. - * emulparams/d30v{elf,_o,_e}.sh: Ditto. +Mon May 1 17:34:34 2000 Jim Wilson <wilson@cygnus.com> -Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com> + * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}. - * emultempl/pe.em (sort_sections): Permit the wildcard to include - a trailing '*' when sorting grouped sections. - * scripttempl/pe.sc: Include grouped sections using NAME\$*. Only - include them when relocating. + * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for + host "ia64-*-linux-gnu*". -Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com> +2000-04-29 Andreas Jaeger <aj@suse.de> - * Makefile.am (install-exec-local): Install properly when ln - fails or tooldir == prefix. + * ld.h: Correctly check GCC version. -Fri Feb 13 15:24:06 1998 Ian Lance Taylor <ian@cygnus.com> +Tue Apr 25 11:20:43 2000 Jeffrey A Law (law@cygnus.com) - * Makefile.am (AUTOMAKE_OPTIONS): Define. - * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + * Makefile.am: Add PA64 support. Add missing dependencies for + PA32 elf support. + * Makefile.in: Rebuilt. + * configure.tgt: Add PA64 support (currently disabled). -Thu Feb 12 14:10:44 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-25 Alan Modra <alan@linuxcare.com.au> - * scripttempl/elf.sc: Align the _end symbol according to the ELF - format size. From Gordon W. Ross <gwr@mc.com>. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete. + (output_rel_find): New function. + (hold_section, hold_use): Delete. + (hold_text, hold_rodata, hold_data, hold_bss, hold_rel, + hold_interp): Make local to place_orphan. + (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find + rather than place_section to find possible previous use of orphan. + Similarly find the place-holder output sections. Use returned + value from lang_enter_output_section_statement rather than calling + lang_output_section_statement_lookup. + * emultempl/armelf.em: Same here. + * emultempl/pe.em: Similar to above, but no need for output_rel_find. - NetBSD patches from Gordon W. Ross <gwr@mc.com>: - * configure.host (alpha*-*-netbsd*): New host. - * configure.tgt (alpha*-*-netbsd*, powerpc-*-netbsd*): New - targets. + * ldlang.c (lang_enter_output_section_statement): Return output + section statement. + * ldlang.h (lang_enter_output_section_statement): Change + declaration too. - * lexsup.c (help): Update bug-gnu-utils address. - * ld.texinfo (Bug Reporting): Likewise. + * ldlang.h (lang_output_section_statement): Export it. + * ldlang.c (lang_output_section_statement): Ditto. -Tue Feb 10 18:05:56 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-24 Nick Clifton <nickc@cygnus.com> - * ldlang.c (lang_size_sections): Warn if some memory regions were - defined, but a loadable section is going into the default memory - region. + * ld.texinfo (Output Section Data): Add note that section data + commands cannot appear outside of section directives. -Tue Feb 10 16:17:20 1998 H.J. Lu <hjl@gnu.org> +2000-04-2 Matthew Green <mrg@cygnus.com> - * ldlex.l (V_IDENTIFIER): Allow '.' as symbol prefix. + * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support. -Tue Feb 10 15:09:45 1998 Ian Lance Taylor <ian@cygnus.com> +Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com> + David Mosberger <davidm@hpl.hp.com> - * Makefile.am (Makefile): Add target, for dependencies on - configure.host and configure.tgt. - * configure.host, configure.tgt: Change -linux* to -linux-gnu*. + * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o. + (eelf64_ia64.c): New rule. * Makefile.in: Rebuild. + * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets. + * emulparams/elf64_ia64.sh: New file. -Mon Feb 9 13:44:40 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * scripttempl/elfd10v.sc (.stack): Move stack to 0x00..7FFE. - - * emulparams/d10velf.sh (READONLY_START_ADDR): Read only section - moved to 0x00.....4. - -Sat Feb 7 15:41:26 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure, aclocal.m4: Rebuild with new libtool. - -Thu Feb 5 12:16:11 1998 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/pe.sc: Remove ${RELOCATING-0} from all sections. - From Thomas de Lellis <tdel@wrs.com>. - - * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. +2000-04-21 Richard Henderson <rth@cygnus.com> -Wed Feb 4 13:02:32 1998 Ian Lance Taylor <ian@cygnus.com> + * scripttempl/elfd30v.sc: Place .gcc_except_table. - * Makefile.am (ld_new_LDADD): Remove @LEXLIB@. - * Makefile.in: Rebuild. +2000-04-19 Alan Modra <alan@linuxcare.com.au> -Mon Feb 2 19:34:54 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU> - - Add tms320c30 support: - * configure.tgt (tic30-*-*aout*, tic30-*-*coff*): New targets. - * emulparams/tic30aout.sh: New file. - * emulparams/tic30coff.sh: New file. - * scripttempl/tic30aout.sc: New file. - * scripttempl/tic30coff.sc: New file. - * Makefile.am (ALL_EMULATIONS): Add etic30aout.o and - etic30coff.o. - (etic30aout.c, etic30coff.c): New targets. - * Makefile.in: Rebuild. + * dep-in.sed: Match space at start of file name, not at end. -Mon Feb 2 14:10:59 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-18 H.J. Lu <hjl@gnu.org> - * configure.host: Correct HOSTING_CRT0 in alpha*-*-linux* case to - accept either ld.so or ld-linux.so. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call + lang_leave_output_section_statement () after calling + lang_enter_output_section_statement (). + * emultempl/armelf.em: Likewise. -Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com> +2000-04-18 Alan Modra <alan@linuxcare.com.au> - * Makefile.am ({CC,CXX}_FOR_TARGET): Change program_transform_name - to transform. + * emultempl/elf32.em (struct orphan_save): Add section field. + (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in + better order, and place first orphan section as we did before the + 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place. + Don't call make_bfd_section here, let wild_doit do the job for us. + Don't build a statement list when we'll only throw it away. + * emultempl/armelf.em: Ditto. + * emultempl/pe.em: Similarly. + +2000-04-14 Geoff Keating <geoffk@cygnus.com> + + * scripttempl/elfppc.sc: Remove. + * emulparams/elf32ppc.sh: Use elf.sc. + * emulparams/elf32lppc.sh: Use elf.sc. + * emulparams/elf32ppclinux.sh: Use elf.sc. + * emulparams/elf32ppcsim.sh: New file. + * emulparams/elf32lppcsim.sh: New file. + * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim. + (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim. * Makefile.in: Regenerate. + * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim. -Fri Jan 30 19:15:17 1998 Geoff Keating <geoffk@ozemail.com.au> - - * scripttempl/elfppc.sc: Put .dynsbss in .sbss. - -Fri Jan 30 11:43:49 1998 H.J. Lu <hjl@gnu.ai.mit.edu> - - * Makefile.am (eelf32bsmip.c, eelf32lsmip.c): New targets. - * Makefile.in: Rebuild. - -Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu> - - * ldfile.c (slash): Set to backslash if _WIN32 but not - __CYGWIN32__. - (ldfile_open_file_search): If __MSDOS__ or _WIN32, accept a - leading backslash or a leading x: as an absolute path. - (ldfile_find_command_file): Use slash rather than / when - generating name to try. - * lexsup.c (PATH_SEPARATOR): Define. - (set_default_dirlist): Use PATH_SEPARATOR rather than ':'. - -Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com> - - * emulparams/elf64_sparc.sh (ELFSIZE): 64 - (TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later. - (DATA_PLT): Needed by v9 abi. - -Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> - - * configure.tgt (i[3456]86-*-mingw32*): New entry. - -Wed Jan 28 15:51:58 1998 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elf.sc: Only include linkonce sections in final - sections when relocating. - -Wed Jan 28 14:10:01 1998 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Options): Add a brief description of the types of - information included in a link map. - - * ld.texinfo (Options): Mention LDEMULATION in description of -m. - (Environment): Mention LDEMULATION. - - * ld.texinfo (Options): Clarify --export-dynamic a bit. - -Thu Jan 22 16:07:23 1998 Richard Henderson <rth@cygnus.com> - - * ldlex.l (<SCRIPT>{WILDCHAR}*): Take care for the comments this - pattern could match. - -Wed Jan 21 22:26:46 1998 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): When doing - a relocateable link, set the image base to 0, and don't define the - various symbols. - * emulparams/i386pe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define. - * scripttempl/pe.sc: Swap the .data and .bss sections so that - .data comes first. If doing a relocateable link, use - RELOCATEABLE_OUTPUT_FORMAT if it is defined, and start the - sections at 0, and don't define any symbols. - - * ldlang.c (lang_memory_default): Correct parenthisization of - expression. - -Wed Jan 21 21:20:32 1998 Manfred Hollstein <manfred@s-direktnet.de> - - * emultempl/sunos.em: Don't include sys/types.h and sys/stat.h - here; they are included already via sysdep.h. - -Tue Jan 6 13:40:02 1998 Richard Henderson <rth@cygnus.com> - - * scripttempl/i960.sc: Don't explicitly set .data and .bss start. - -Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com> - - * ldgram.y (attributes_opt): Pass region pointer to - lang_set_flags, not ®ion->flags. - - * ldlang.c (lang_memory_default): New function to figure out a - default memory region for a section if it was not specified. - (lang_memory_region_lookup): Zero flags, not_flags field. - (lang_map{,_flags}): Print attribute flags in memory map. - (lang_size_sections): Call lang_memory_default to get default - memory region. - (lang_set_flags): Implement attribute flags for real. Take new - argument to give the flags we are to skip for this region. - - * ldlang.h (memory_region_struct): Add not_flags field, make both - flags fields flagword type. - (lang_output_section_state): Make flags field flagword type. - (lang_set_flags): Update prototype to match new calling sequence. - (lang_memory_region_default): Add prototype. - - * emulparams/d30v{_e,_o,elf}.sh ({TEXT,DATA,EMEM}_DEF_SECTION): - Define whether or not the region gets default sections, and if so, - what sections. - - * scripttempl/elfd30v.sc (MEMORY): Set up which of the regions get - default sections. - -Thu Jan 1 22:58:04 1998 Michael Meissner <meissner@cygnus.com> - - * scripttempl/elfd30v.sc (.eh_frame): Link into the data section. - -Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300h.sc: Fix typo. - * scripttempl/h8300s.sc: Likewise. - -Sun Dec 21 12:51:49 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldexp.c (fold_name): Don't crash if the symbol is defined in a - section with no output section, such as a shared library section. - -Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Keep track of where we are in the option - parsing before calling ldemul_parse_args, so that we don't call it - multiple times on the same argument and confuse the getopt - internals. - -Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com> - - * configure.tgt (d30v-elf-*): Rename d30velf_e to d30v_e and - d30velf_o to d30v_o to work in DOS environments. - * Makefile.{am,in}: Ditto. - - * emulparams/d30v_{o,e}: Rename from d30velf_{o,e}. - * emulparams/d30velf_{o,e}: Deleted. - -Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com> - - * scripttempl/armcoff.sc: Add glue sections (code taken from Arm - branch). - - * emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff. - - * emultempl/armcoff.em: New file, imported from Arm branch. - -Wed Dec 10 14:10:44 1997 Michael Meissner <meissner@cygnus.com> - - * scripttempl/elfd30v.sc: Add .rel and .rela sections for all - defined sections. Set up __{D,C}TOR_{LIST,END}__. Add onchip and - external memory sections for rodata. Delete .string, .rodata1, - and .data1 sections. - -Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com> - - * Makefile.am: Add Oct 23 changes to Makefile.in here. - - * Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o. - - * Makefile.{am,in}: (ALL_EMULATIONS): Add etic80coff.o. - - * Makefile.{am,in}: (ALL_EMULATIONS): Add ed30velf{,_e,_o}.o. - (ed30velf_e.c): Like d30velf, except .text/.data/etc always go in - external memory. - (ed30velf_o.c): Like d30velf, except .text/.data/etc always go in - onchip memory. - - * emulparams/d30velf.sh (STACK_START_ADDR): Top of default - stack. - ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas. - ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and - .bss should go in. - - * emulparams/d30velf_{e,o}.sh: New files to be explicit whether - .text, .data, etc go in external memory or onchip memory. - - * configure.tgt (d30v-*-*ext*): New configuration to default - .text, .data, etc. in external memory. - (d30v-*-*onchip*): New configuration to default .text, .data, - etc. in onchip memory. - (d30v-*-*): Add d30velf_{e,o} emulations. - - * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in - either the onchip text/data areas or the external memory area. - (MEMORY): Get sizes from d30velf.sh. - (.e{data,text,bss}): Put sections in the external memory region. - (.stext): Put section in the onchip text region. - (.s{data,bss}): Put sections in the onchip data region. - (__stack): Assign from ${STACK_START_ADDR}. - (.text): Put in ${TEXT_MEMORY} memory region. - (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory - region. - (.bss): Put in ${BSS_MEMORY} memory region. - -Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com> - - * configure.tgt (targ_extra_emuls): Add support for Thumb target. - -Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldlex.l: Don't define hex_mode. Correct number regexp to not - accept hex digits without a leading $ or 0x. Handle leading $ - correctly. Pass 0 rather than hex_mode to bfd_scan_vma. - * ldlex.h (hex_mode): Don't declare. - -Sun Nov 16 20:16:45 1997 Michael Meissner <meissner@cygnus.com> - - * emulparams/d30velf.sh ({DATA,EMEM}_START_ADDR): Define as start - of internal data area and external memory on chip. - - * scripttempl/elfd30v.sc: Define a MEMORY region that describes - the 3 regions of memory on the chip. Put .text/.init/.fini into - the text memory region, put other segments into the data memory - region. Add more of the standard elf sections. Default __stack - to be 0x20008000, which is 1 byte beyond end of the internal data - region. - -Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd - variant. - -Sun Nov 2 14:51:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu> - - * configure.host (alpha*-*-linux*): Correct HOSTING_CRT0. Set - HOSTING_LIBS. - -Thu Oct 30 12:25:55 1997 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (args_type): Add warn_mismatch field. - * ldmain.c (main): Initialize warn_mismatch field. - * lexsup.c (parse_args): Handle --no-warn-mismatch option. - * ldlang.c (ignore_bfd_error): New static function. - (lang_check): If warn_mismatch is false, don't warn about - mismatched input files. - * ld.texinfo, ld.1: Document new option. - -Thu Oct 23 14:38:18 1997 Nick Clifton <nickc@cygnus.com> - - * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack' - to avoid conflicts with C code which is defining a variable called - 'stack'. - -Thu Oct 23 00:57:45 1997 Richard Henderson <rth@dot.cygnus.com> - - * Makefile.in (ALL_EMULATIONS): Move eelf64_sparc.o ... - (ALL_64_EMULATIONS): ... here. - (eelf64_sparc.c): Template should be elf32 not generic. - * emulparams/elf64_sparc.sh (TEMPLATE_NAME): New definition. - -Thu Oct 23 00:44:20 1997 Richard Henderson <rth@dot.cygnus.com> - - * configure.tgt: Add sparc64-*-linux*. - * emulparams/elf64_sparc.sh (GENERATE_SHLIB_SCRIPT, NOP): New. - -Wed Oct 22 11:29:25 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/pe.sc: Put .eh_frame in .rdata. - -Fri Oct 17 00:00:13 1997 Richard Henderson <rth@cygnus.com> - - * ldlang.c (lang_register_vers_node): Only check globals<=>locals, - since we need to be able to export different versions of the same - symbol. - -Wed Oct 15 14:52:36 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/pe.sc: Put .stab and .stabstr sections at end. +2000-04-14 Alan Modra <alan@linuxcare.com.au> -Wed Oct 8 12:37:05 1997 Richard Henderson <rth@cygnus.com> - - * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*; - config.guess now recognizes alphaev5 etc. - -Fri Oct 3 14:23:02 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat - -s and -u as -static and -unix. - -Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (wild_doit): Rewrite flag handling for clarity. If we - are not adding the first input section, and SEC_READONLY is clear - on the output section, then don't copy it from the input section. - If SEC_READONLY is not set on the input section, then clear it on - the output section. - - * configure.tgt (mips*-sgi-irix[56]*): Use elf32bsmip rather than - elf32bmip. - (mips*el-*-linux*): Change elf32lmip to elf32lsmip and elf32bmip - to elf32bsmip. - (mips*-*-linux*): Likewise. - * emulparams/elf32bsmip.sh: New file; just like elf32bmip.sh, but - setting ENTRY to __start. - * emulparams/elf32lsmip.sh: New file; just like elf32lmip.sh, but - setting ENTRY to __start. - * scripttempl/elf.sc: Always set ENTRY to _start if it was not - already set. - -Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com> - - * emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New - Variables. - - * scripttempl/v850.sc: Move read only areas out of zero and small - data sections and into their own sections. - -Wed Sep 24 16:59:15 1997 Joel Sherrill <joel@oarcorp.com> - - * configure.tgt (sh*-*-rtems*): New target, like sh-*-elf*. - -Wed Sep 24 11:33:14 1997 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Section Options): Improve documentation of NOLOAD - directive. - - * aclocal.m4: Rebuild with new libtool. - * configure: Rebuild. - -Mon Sep 22 17:24:06 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (wild_doit): Revert patch of September 3. - -Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com> - - * Makefile.am, Makefile.in: Add rule for ev850.c - * configure.tgt (targ_extra_emuls): Add v850 target. - -Wed Sep 17 16:43:39 1997 Nick Clifton <nickc@cygnus.com> - - * emulparams/v850.sh (CALL_TABLE_START_ADDR): New entry. - * scripttempl/v850.sc: Add call table data area - -Mon Sep 15 11:29:13 1997 Ken Raeburn <raeburn@cygnus.com> - - Merge change from Martin Hunt: + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process + ~SEC_ALLOC sections too. Init start address of debug sections. + * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto. + * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto. + Also set all relocateable section start addresses. - * scripttempl/elfd30v.sc: Put .rodata in the .text section. +2000-04-13 Geoff Keating <geoffk@cygnus.com> -Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com> + * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections. + Add new BSS_PLT variable for when .plt need not be contained in + the file. Move _etext so that it is also after .fini, and provide + both etext and _etext with a leading underscore. Mark the start + and end of .sbss. - * ldlang.c (lang_memory_region_lookup): Remove extraneous - initialization of p. +2000-04-12 Alan Modra <alan@linuxcare.com.au> -Thu Sep 4 09:03:33 1997 Ian Lance Taylor <ian@cygnus.com> + * emultempl/elf32.em (struct orphan_save): New. + (hold_text, hold_rodata, hold_data, hold_bss, hold_rel, + hold_interp): Make them struct orphan_save. + (gld${EMULATION_NAME}_place_section): Modify for new hold_*. + (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to + the end of the relevant section list. Also add associated section + statements to the end of any previous orphan statements. + * emultempl/armelf.em: Similarly. + * emultempl/pe.em: Similarly. - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): In - expression produced for -bpT and -bpD options, align to a 32 byte - boundary rather than an 8 byte boundary. - * scripttempl/aix.sc: Put .tocbss at start of .bss section. +2000-04-11 Alan Modra <alan@linuxcare.com.au> - * ldmisc.h, ldmisc.c, ldcref.c: Rename finfo to lfinfo, to avoid - function name conflict with AIX 4.2 unistd.h header file. + * ld.texinfo (Simple Example): Remove extraneous paragraph. -Wed Sep 3 15:12:32 1997 Ian Lance Taylor <ian@cygnus.com> +Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com> - * ldlang.c (wild_doit): Clear SEC_HAS_CONTENTS from a - noload_section. + * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add + --enable-build-warnings option. + * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions. + * Makefile.in, configure: Re-generate. -Fri Aug 29 00:32:31 1997 Ian Lance Taylor <ian@cygnus.com> +2000-04-04 Alan Modra <alan@linuxcare.com.au> - * Makefile.am (ld_new_DEPENDENCIES): Remove @LEXLIB@. - * Makefile.in: Rebuild. + * po/ld.pot: Regenerate. -Thu Aug 28 10:12:10 1997 Doug Evans <dje@canuck.cygnus.com> + * lexsup.c (help): Restore translated part of bug string. - * configure.tgt (arc-*-elf*): Recognize. - * Makefile.am (ALL_EMULATIONS): Add earcelf.o. + * Makefile.am (MKDEP): Use gcc -MM rather than mkdep. + (DEP): Quote when passing vars to sub-make. Add warning message + to end. + (DEP1): Rewrite for "gcc -MM". + (CLEANFILES): Add DEP2. + Update dependencies. * Makefile.in: Regenerate. - * emulparams/arcelf.sh: New file. - -Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com> - * ldlang.c (wildcardp): Don't let a backslash by itself cause a - pattern to be treated as a wildcard pattern. - - * ldgram.y (atype): Accept parentheses with no type. - - * ld.texinfo (Section Definition): Clarify use of whitespace. - (Section Placement): Likewise. - -Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com> +2000-04-03 Alan Modra <alan@linuxcare.com.au> - * configure.tgt (targ_extra_emuls): Add support for v850e target. + * ld.h: #include "bin-bugs.h" + * lexsup.c (help): Use REPORT_BUGS_TO. -Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com> +2000-03-27 Denis Chertykov <denisc@overta.ru> - * configure.tgt (targ_extra_emuls): Add support for v850e target. + * configure.tgt (avr-*-*): New target support. + * Makefile.am: Likewise. + * scripttempl/elf32avr.sc: New script file. + * emulparams/avr1200.sh: New file. + * emulparams/avr23xx.sh: New file. + * emulparams/avr4433.sh New file. + * emulparams/avr44x4.sh New file. + * emulparams/avr85xx.sh New file. + * emulparams/avrmega103.sh New file. + * emulparams/avrmega161.sh New file. + * emulparams/avrmega603.sh New file. + * Makefile.in: Regenerate. -Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com> +2000-03-09 Andreas Jaeger <aj@suse.de> - * Makefile.am (ld.info): Change dependency from - $(BFDDIR)/doc/bfdsumm.texi to bfdsumm.texi. - (ld.dvi): Likewise. - (bfdsumm.texi): New target. - (CLEANFILES): Add bfdsumm.texi. + * Makefile.am (check-DEJAGNU): Also unset LANG. * Makefile.in: Rebuild. - * Makefile.am: New file, based on old Makefile.in. - * acinclude.m4: New file, from old aclocal.m4. - * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove - shared library handling; now handled by libtool. Replace - AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC, - AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE, - AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT. - * configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR. - * acconfig.h: Mention PACKAGE and VERSION. - * stamp-h.in: New file. - * ldver.c (ld_program_version): Set ld_program_version from - VERSION. - * ldgram.y, ldlex.l: Replace VERSION with VERSIONK. - * Makefile.in: Now built with automake. - * aclocal.m4: Now built with aclocal. - * configure, config.in: Rebuild. - -Mon Jul 28 19:04:50 1997 Rob Savoye <rob@chinadoll.cygnus.com> - - * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for - win32 dependencies. - * configure: Regenerated with autoconf 2.12. - * Makefile.in: Add $(EXEEXT) to executable. - -Tue Jul 22 18:50:38 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE> - - * emulparams/i386go32.sh (OUTPUT_FORMAT): Set to "coff-go32". - (SEGMENT_SIZE): Set to 0x200. - * scripttempl/i386go32.sc: Rewrite. - * configure.tgt (i[3456]86-*-msdosdjgpp*): New target. - -Mon Jul 7 12:39:42 1997 Ian Lance Taylor <ian@cygnus.com> - - From Manfred Hollstein <manfred@s-direktnet.de>: - * configure.host (i[3456]86-*-linux*libc1*): Renamed from - i[3456]86-*-linux*. - (i[3456]86-*-linux*): New host. - -Thu Jun 26 13:54:03 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/pe.sc: Put .rsrc after .reloc. Put input .rsrc - sections in the output .rsrc section. - -Wed Jun 25 12:48:41 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * configure.host (m68*-*-linux*libc1*): Renamed from - `m68*-*-linux*'. - (m68*-*-linux*): New configuration for use with GNU libc 2. - -Mon Jun 16 19:18:21 1997 Geoff Keating <geoffk@ozemail.com.au> - - * scripttempl/elfppc.sc: Correct .rela.sdata entries. - - * scripttempl/elfppc.sc: Put the PLT between the small and large - BSS segments. - * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A - program base of 0x02000000 is recommended...' because otherwise - shared libraries are less efficient. We use 0x01800000 because - otherwise it's impossible to branch to location 0, for instance if - you have an undefined weak symbol. - -Mon Jun 16 12:49:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu> - - * ldlang.c (lang_place_undefineds): Add \n in einfo call. - (lang_size_sections): Likewise. - * ldlex.l: Likewise. - * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Likewise. - * emultempl/mipsecoff.em (gld${EMULATION_NAME}_after_open): - Likewise. - (check_sections): Likewise. - (gld${EMULATION_NAME}_after_allocation): Likewise. - * emultempl/pe.em (gld_$${EMULATION_NAME}_before_allocation): - Likewise. - * mpw-eppcmac.c (gldppcmacos_read_file): Likewise. - * mpw-idtmips.c (gldmipsidt_after_open): Likewise. - (check_sections): Likewise. - (gldmipsidt_after_allocation): Likewise. - - * ldemul.c (ldemul_choose_mode): Remove unused einfo argument. - -Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of - the import list. - -Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't - crash if an output section has no BFD section. - -Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com> - - * lexsup.c (ld_options): Add entry for the new "task-link" option. - (parse_args): Handle the "task-link" option. - (OPTION_TASK_LINK): Add define. - -Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Correct check of fclose return value when - handling --force-exe-suffix. - -Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com> - - * ldlang.c (lang_check): Add test of the return value from the - call to bfd_merge_private_bfd_data(). - -Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elfmips.sc: Remove. - * scripttempl/elf.sc: Set ENTRY based on target. Permit - TEXT_DYNAMIC to control .dynamic segment. Permit - SHLIB_TEXT_START_ADDR to set start of shared object. Support - INITIAL_READONLY_SECTIONS. Put .stub in .text. Only put - .gnu.linkonce.t* in .text when relocating. Support - OTHER_TEXT_SECTIONS. Support SHLIB_DATA_ADDR as well as - DATA_ADDR. Support OTHER_GOT_SYMBOLS and OTHER_GOT_SECTIONS. - * emulparams/elf32b4300.sh (SCRIPT_NAME): Set to elf. - (DATA_ADDR): Don't set. - (INITIAL_READONLY_SECTIONS): Rename from OTHER_READONLY_SECTIONS. - (OTHER_TEXT_SECTIONS): Set. - (OTHER_GOT_SECTIONS): Rename from OTHER_READWRITE_SECTIONS. - (MACHINE): Set to empty string. - * emulparams/elf32l4300.sh: Likewise. - * emulparams/elf32ebmip.sh: Likewise. - * emulparams/elf32elmip.sh: Likewise. - * emulparams/elf32bmip.sh: Likewise. Also: - (TEXT_DYNAMIC): Set. - * emulparams/elf32lmips.sh: Likewise. - * Makefile.in (eelf32bmips.c): Depend upon elf.sc rather than - elfmips.sc. - (eelf32ebmips.c, eelf32elmips.c, eelf32lmip.c): Likewise. - -Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * scripttempl/elf.sc: Don't align the data segment on the next 8 - byte boundary, instead let the linker use whatever the individual - sections require. - -Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support. +2000-03-06 Ian Lance Taylor <ian@zembu.com> -Tue May 6 13:21:19 1997 Ian Lance Taylor <ian@cygnus.com> - - From Sean McNeil <sean@mcneil.com>: - * emultempl/pe.em (sort_by_file_name): Sort by archive name - first. - (sort_sections): Sort all sections, not just sections in the same + * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty archive. -Mon May 5 18:19:55 1997 Philip Blundell <pjb27@cam.ac.uk> - - * configure.tgt, configure.host: cope with '*-*-linux-gnuaout' - targets. - -Fri May 2 15:54:28 1997 Mike Meissner <meissner@cygnus.com> - - * scripttempl/tic80coff.sc (.text): Add a leading underscore to - __{D,C}TOR_{LIST,END}__ definations. Rearrange the order of items - in the .text section. Move .const, .ctors, .dtors into separate - sections. - -Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de> - - * scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace - around assignment of current location pointer. - -Thu Apr 17 13:07:18 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldctor.c (ldctor_build_sets): Make sure the set is aligned - appropriately. - -Tue Apr 15 13:19:26 1997 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (INSTALL): Set to @INSTALL@. - (INSTALL_XFORM, INSTALL_XFORM1): Remove. - (install): Depend upon ld.new and installdirs. Use - $(program_transform_name) directly, rather than using - $(INSTALL_XFORM) and $(INSTALL_XFORM1). - (installdirs): New target. - (install-info): Run mkinstalldirs. - -Mon Apr 14 12:06:15 1997 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (INSTALL): Change install.sh to install-sh. - - From Thomas Graichen <graichen@rzpd.de>: - * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub. - * configure: Rebuild. - -Fri Apr 4 11:42:41 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em: Include "libiberty.h". - (sort_sections_1): Use xmalloc rather than alloca. - - * ldlex.l: Recognize SQUAD. - * ldgram.y (length): Add SQUAD. - * ldctor.c (ldctor_build_sets): Use SQUAD for a signed 8 byte - reloc. - * ldlang.c (print_data_statement): Handle SQUAD. - (lang_size_sections, lang_do_assignments): Likewise. - * ldexp.c (exp_print_token): Add SQUAD to table. - * ldwrite.c (build_link_order): Handle SQUAD. - * ld.texinfo (Section Data Expressions): Document SQUAD. - -Thu Apr 3 13:19:40 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldver.c (ld_program_version): Set to 2.8.1. - - * Branched binutils 2.8. - -Wed Apr 2 11:55:27 1997 Ian Lance Taylor <ian@cygnus.com> - - * mpw-idtmips.c: Rename from mpw-emipsidt.c. - * mpw-elfmips.c: Rename from mpw-emipself.c. - * mpw-config.in: Update accordingly. - - * ldlang.c (lang_process): Call lang_check immediately after - opening the input files, rather than at the end of the link. - -Mon Mar 31 23:44:00 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em (init): Fully bracket initializer. - (set_pe_stack_heap): Remove locals begin_commit and end. - (gld_${EMULATION_NAME}_after_open): Remove unused local i. - (gld${EMULATION_NAME}_place_orphan): Remove unused local ptr. - -Mon Mar 31 16:35:51 1997 Joel Sherrill <joel@oarcorp.com> - - * configure.tgt (hppa*-*-rtems*): New target, like hppa-*-*elf*. - -Fri Mar 28 15:29:23 1997 H.J. Lu <hjl@gnu.ai.mit.edu> - - Contributed by David S. Miller <davem@caip.rutgers.edu>: - * configure.tgt (sparc*-*-linuxaout*): New target. - (sparc*-*-linux*): New target. - * emulparams/sparclinux.sh: New file. - * Makefile.in (ALL_EMULATIONS): Add esparclinux.o. - (esparclinux.c): New target. - -Fri Mar 28 14:30:12 1997 Ian Lance Taylor <ian@cygnus.com> - - From Ralf Baechle <ralf@gnu.ai.mit.edu>: - * configure.tgt: Set targ_extra_emuls for mips*el-*-linux* and - mips*-*-linux*. Use elf32bmip and elf32lmip, not elf32ebmip and - elf32elmip. - -Thu Mar 27 17:14:32 1997 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Update copyright date in version - message. - -Fri Mar 21 12:28:41 1997 Philippe De Muyter <phdm@info.ucl.ac.be> - - * emulparams/delta68.sh (OUTPUT_FORMAT): Set to "coff-m68k-sysv". - -Tue Mar 18 11:16:23 1997 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in: Rebuild dependencies. - - * emultempl/aix.em: Include "obstack.h". - -Mon Mar 17 19:26:06 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c: Include "obstack.h". - -Sat Mar 15 23:23:46 1997 Fred Fish <fnf@cygnus.com> - - * configure.tgt (powerpc-*-beos*): Use aixppc for targ_emul. - -Sat Mar 15 18:10:38 1997 H.J. Lu <hjl@lucon.org> - - * ldemul.h (ldemul_list_emulations): Use full prototype. - * ldlang.c (print_one_symbol): Add declaration. - * ldlang.h (dprint_statements): Declare. - * ldmain.c (remove_output): Declare. - * ldmisc.c (vfinfo): Declare. - * ldwrite.c (clone_section): Declare. - (split_sections): Make static. Declare. - * mri.c: Include libiberty.h. - (strdup): Don't declare. - (mri_alias): Use xstrdup rather than strdup. - -Fri Mar 14 21:30:06 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elfmips.sc: Change handling of data area when - generating a shared library to not skip a large block of memory. - From Per Fogelstrom <pefo@cvs.openbsd.org>. - -Wed Mar 12 21:33:09 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (multiple_definition): Only skip the warning if the - output section is absolute when the input section is not - absolute. - - * ldlex.l: Accept whitespace in VERS_START state. Warn about - invalid characters in VERS_* states. - -Tue Mar 11 13:51:31 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Don't let a - trailing space lead us to think that there is a zero address. - -Sun Mar 9 23:06:35 1997 Eric Youngdale <eric@andante.jic.com> - - * ldgram.y (vers_node): Correct typo of '(' for '{'. - -Fri Mar 7 18:40:12 1997 Fred Fish <fnf@cygnus.com> - - * scripttempl/tic80coff.sc (ENTRY): Entry symbol is __start - rather than _start. - (__edata): Define this rather than "edata". - (__end): Define this rather than "end". - -Tue Mar 4 17:18:35 1997 Michael Meissner <meissner@cygnus.com> - - * configure.tgt (tic80-*-*): Allow dropping of -coff. - -Sun Mar 2 22:59:49 1997 Fred Fish <fnf@cygnus.com> - - * Makefile.in (ld.dvi): Set MAKEINFO environment variable as well - as TEXINPUTS. Needed for building in separate build dir. - * ldint.texinfo (SCRIPT_NAME): Fix typo. - * emulparams/tic80coff.sh: Rewrite to include internal documentation - about each shell variable that is set (or not set). - * scripttempl/tic80coff.sc: Complete rewrite. - -Fri Feb 28 17:42:27 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Call bfd_set_default_target. - * Makefile.in (ldmain.o): Define TARGET when compiling. - -Thu Feb 27 11:41:03 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Don't initialize link_info.lprefix or - link_info.lprefix_len. - * emultempl/hppaelf.em (hppaelf_before_parse): Likewise. - - * emultempl/m88kbcs.em: Remove. - * emulparams/m88kbcs.sh (TEMPLATE_NAME): Don't set. - * Makefile.in (em88kbcs.c): Depend upon generic.em rather than - m88kbcs.em. - - * mri.c (mri_draw_tree): Pass noload_section, not SEC_NEVER_LOAD, - to lang_enter_output_section_statement. From Mark Rasin - <mark.rasin@telrad.co.il>. - -Wed Feb 26 11:51:44 1997 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_one_common): Clear SEC_IS_COMMON from common - section. - -Tue Feb 25 20:38:11 1997 Stan Shebs <shebs@andros.cygnus.com> - - * configure.tgt (mips*-*-lnews*): New target. - * Makefile.in (emipslnews.c): New target. - * emulparams/mipslnews.sh: New file. - -Tue Feb 25 16:04:09 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (hold_interp): New static variable. - (gld${EMULATION_NAME}_place_orphan): Put loadable .note sections - after hold_interp. Choose a unique output section name. - (gld${EMULATION_NAME}_place_section): Don't set hold_use if the - SEC_LOAD or SEC_ALLOC flags differ. Set hold_interp. - -Mon Feb 24 18:16:09 1997 Ian Lance Taylor <ian@cygnus.com> - - From Eric Youngdale <eric@andante.jic.com>: - * ldlex.l (V_TAG, V_IDENTIFIER): New macros. - (VERS_START, VERS_SCRIPT, VERS_NODE): New states to parse version - information. - (ldlex_version_script, ldlex_version_file): New functions. - * ldlex.h (enum input_enum): Add input_version_script. - (ldlex_version_script): Declare. - (ldlex_version_file): Declare. - * ldgram.y (%union): Add deflist, versyms, and versnode. - (VERS_TAG, VERS_IDENTIFIER): New terminals. - (GLOBAL, LOCAL, VERSION, INPUT_VERSION_SCRIPT): New terminals. - (file): Accept INPUT_VERSION_SCRIPT. - (ifile_p1): Accept version. - (version_script_file): New nonterminal. - (version, vers_nodes, vers_node): Likewise. - (verdep, vers_tag, ver_defns): Likewise. - * ldlang.c (lang_elf_version_info): New global variable. - (lang_new_vers_regex): New function. - (lang_new_vers_node): New function. - (version_index): New static variable. - (lang_register_vers_node): New function. - (lang_add_vers_depend): New function. - * ldlang.h (lang_elf_version_info): Declare. - (lang_new_vers_regex, lang_new_vers_node): Declare. - (lang_add_vers_depend, lang_register_vers_node): Declare. - * lexsup.c (OPTION_VERSION_SCRIPT): Define. - (ld_options): Add "version-script". - (parse_args): Handle OPTION_VERSION_SCRIPT. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): - Pass lang_elf_version_info to size_dynamic_sections. - * scripttempl/elf.sc: Add .gnu.version sections. - * ld.texinfo: Document symbol versioning. - -Fri Feb 21 17:37:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com> - - * Makefile.in (ed30velf.c): New target. - * configure.tgt (d30v-*-*): New target. - * emulparams/d30velf.sh: New file. - * scripttempl/elfd30v.sc: New file. - -Fri Feb 14 18:28:31 1997 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Option Commands): Document the INCLUDE command. - -Thu Feb 13 20:31:37 1997 Philippe De Muyter <phdm@info.ucl.ac.be> - - * configure.in: Call BFD_NEED_DECLARATION on getenv. - * acconfig.h (NEED_DECLARATION_GETENV): New macro. - * sysdep.h (getenv): Declare if NEED_DECLARATION_GETENV. - * ldemul.c (ld_emul_default_target): Do not cast getenv return - value. - * ldmain.c (get_emulation): Likewise. - * configure, config.in: Rebuild. - -Tue Feb 11 15:34:26 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elfmips.sc: When relocating, put .mips16.fn.* and - .mips16.call.* in .text. - -Sun Feb 9 18:09:13 1997 Fred Fish <fnf@cygnus.com> - - * emulparams/tic80coff.sh: New (dummy) file for TIc80. - * scripttempl/tic80coff.sc: New (dummy) file for TIc80. - * Makefile.in (etic80coff.c): Add target and rule to build it. - * configure.tgt (tic80-*-coff): Set targ_emul to tic80coff. - -Fri Jan 31 13:16:53 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Search for - ".so" in the name, not ".so.". - (gld${EMULATION_NAME}_search_dir): Accept a plain .so file. - - * Makefile.in (ld.info): Add -I$(srcdir). From Alan Modra - <alan@spri.levels.unisa.edu.au>. - -Thu Jan 30 11:31:52 1997 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em: Include <ctype.h>. - (gld${EMULATION_NAME}_find_so): Skip the directory name when - searching for ".so.". - (gld${EMULATION_NAME}_search_dir): Make sure that the library name - has a version number, and that only version numbers follow .so. - -Wed Jan 29 18:15:00 1997 Geoffrey Noer <noer@cygnus.com> - - * scripttempl/pe.sc: - * scripttempl/ppcpe.sc: add *(.gcc_except_table) to the text - section so Win32 executables are valid. - -Mon Jan 27 12:28:43 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elf.sc: Put linkonce reloc section in other - appropriate reloc sections. - * scripttempl/elfmips.sc: Add linkonce support. - * scripttempl/elfppc.sc: Likewise. - -Fri Jan 24 10:44:09 1997 Jeffrey A Law (law@cygnus.com) - - * emulparms/mn10200.sh (OTHER_RELOCATING_SECTIONS): Move the - stack up to 0x80000. - * emulparms/mn10300.sh (OTHER_RELOCATING_SECTIONS): Likewise. - -Tue Jan 21 12:11:10 1997 Doug Evans <dje@seba.cygnus.com> - - * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Use PROVIDE - to define `_stack'. - -Thu Jan 16 17:07:52 1997 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (args_type): Rename auxiliary_filter_shlib to - auxiliary_filters, and make it char **. - * lexsup.c (parse_args): Handle -f by setting up an array. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use - new name of auxiliary_filters. - - * ld.texinfo (Options): Improve documentation of --filter and - --auxiliary. - -Tue Jan 14 15:44:28 1997 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Options): Clarify that the normal usage is -T. - (Commands): Likewise. - -Thu Jan 9 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/armcoff.sc: Correct mask used for .data address. - -Wed Jan 8 15:14:59 1997 Geoffrey Noer <noer@cygnus.com> - - * emultempl/pe.em: make default executable a.exe instead of - a.out - -Fri Jan 3 17:33:34 1997 Richard Henderson <rth@tamu.edu> - - * scripttempl/elf.sc: Move .got closer to .sdata and .sbss by - shifting .plt back. Rumour has it that the NetBSD ld.so depends - on .dynamic being after .got, so we leave that. - -Fri Jan 3 14:04:40 1997 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (clean): Don't remove configdoc.texi. - (maintainer-clean): Do remove configdoc.texi. - - * ld.texinfo (Operators): Remove '@' from @smallexmple in comment - to avoid confusing texi2roff. - -Fri Jan 3 11:27:02 1997 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/v850.sc (.zdata): Add .zcommon section. - (.tdata): Add .tcommon and .tcommon_byte sections. - -Thu Jan 2 18:14:32 1997 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (mips*el-*-linux*, mips*-*-linux*): New targets. - * scripttempl/elfmips.sc: Use __start as the entry address for - mips*-*-linux*. - -Tue Dec 31 14:48:30 1996 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE. - - * ld.h (args_type): Add filter_shlib and auxiliary_filter_shlib - fields. - * lexsup.c (parse_args): Recognize --auxiliary/-f and - --filter/-F. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): - Pass filter_shlib and auxiliary_filter_shlib to - size_dynamic_sections. - * ld.texinfo, ld.1: Document --filter/-F and --auxiliary/-f. - -Mon Dec 30 13:55:57 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections. - -Wed Dec 18 22:57:35 1996 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-make.sed: Use NewFolderRecursive for installation. - -Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/v850.sc: Make sure __{e,g}p start relative to the - {s,t}data sections. Do not emit any linker generated symbols if - -r. Use {TEXT,{Z,S,T}DATA}_START_ADDR variables to initialize - where the different sections go. Change some whitespace. - - * emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define - appropriately. Remove crud not used anymore. - -Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (emn10200.c): Add dependencies. - * configure.tgt: Handle mn10200. - * emulparms/mn10200.sh: New file. - -Thu Dec 12 17:04:55 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/gld960c.em: Include <ctype.h>. - (gld960_set_output_arch): Get the machine type from the -A option - if there is one, rather than always using core. - -Sat Dec 7 10:07:51 1996 Jeffrey A Law (law@cygnus.com) - - * emulparms/mn10300.sh: Handle leading underscores. - -Thu Dec 5 13:45:58 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Only - set hold_rel if SEC_ALLOC is set. - -Tue Dec 3 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (section_already_linked): Set the output_offset as well - as the output_section when only reading symbols from a file. - -Mon Dec 2 11:43:50 1996 Ian Lance Taylor <ian@cygnus.com> - - * emulparams/*.sh: Make sure that each set of parameters which - uses the elf.sc script sets MACHINE. - -Wed Nov 27 03:22:05 1996 Jason Merrill <jason@yorick.cygnus.com> - - * scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections. - * scripttempl/elfd10v.sc: Likewise. - * scripttempl/v850.sc: Likewise. - -Tue Nov 26 16:58:33 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure: Rebuild with autoconf 2.12. - -Mon Nov 25 12:17:55 1996 Jim Wilson <wilson@cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Add case - for bfd_vma to init loop. - -Mon Nov 25 09:55:07 1996 Jeffrey A Law (law@cygnus.com) - - * emulparms/mn10300.sh: Remove bogus '_' prefix for - entry symbol and ctor/dtor stuff. - -Fri Nov 15 13:00:18 1996 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (emn10300.c): Add dependencies. - * configure.tgt: Handle mn10300. - * emulparms/mn10300.sh: New file. - -Tue Nov 5 10:57:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004. - (EMBEDDED): Define. - -Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo: Add section on reporting bugs. - - * scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__ - symbols are correctly aligned. - -Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com) - - * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and - romzbss too. - -Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * emulparams/d10velf.sh: Changes needed for D10V-EVA board. - Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to - 0x2000000. - - * scripttempl/elfd10v.sc: Fix calculation of .text. Change - .stack to start at 0x2007ffe. - -Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com> - - * configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*. - -Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com) - - * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata". - - * scriptempl/v850.sc (zdata): Make sure this stays - in lo-memory. - -Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/v850.sc (__ep): Put it at the start - of the tda section. - - * scriptempl/v850.sc: Move all "normal" sections into - the external memory region (0x100000 - 0x200000). - -Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net> - - * scripttempl/elfd10v.sc: Clone from elf.sc, move .text to - 0x10000, so that is more room for data. - - * emulparams/d10velf.sh (TEXT_START_ADDR): Now 0x100000. - (READONLY_START_ADDR): Now 0x0. - (SCRIPT_NAME): Now elfd10v. - - * Makefile.in (ed10velf.c): Depend on elfd10v.sc, not elf.sc. - -Fri Oct 18 22:12:49 1996 Doug Evans <dje@canuck.cygnus.com> - - * emulparams/m32relf.sh (TEXT_START_ADDR): Change from 0 to 0x100. - -Fri Oct 18 15:43:38 1996 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (ALL_EMULATIONS): Remove eelf64alpha.o. - (ALL_64_EMULATIONS): New variable. - * configure.in: Accept --enable-64-bit-bfd option. If it is set - with --enable-targets=all, include ALL_64_EMULATIONS in - EMULATION_OFILES. - * configure: Rebuild. - -Fri Oct 18 12:58:35 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/v850.sc (__gp, __ep): Define. - -Thu Oct 17 18:14:07 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo: Try to consistently use a single or a double dash - for each option. - -Thu Oct 17 10:17:20 1996 Doug Evans <dje@canuck.cygnus.com> - - * emulparams/m32relf.sh (EMBEDDED): Define. - -Thu Oct 17 10:56:49 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/v850.sc (.zdata): Add this before .text. - (.sdata): Also include .rosdata as part of the .sdata. - (.tdata): Include this just before .sdata. - - * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf". - * scripttempl/v850.sc: Wrap script with a "cat << EOF". - -Wed Oct 16 23:10:01 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/v850.sc: New linker script for the V850. - * Makefile.in: Use it. - -Thu Oct 10 17:57:00 1996 Ian Lance Taylor <ian@cygnus.com> - - * emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not - OTHER_READWRITE_SECTIONS. - * emulparams/elf32l4300.sh: Likewise. - -Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (ld_config_type): Add warn_section_align field. - * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define. - (ld_options): Add --warn-section-align. - (parse_args): Handle --warn-section-align. - * ldlang.c (lang_size_sections): If warn_section_align, warn if - the start of a section changes due to alignment. - * ld.texinfo, ld.1: Document --warn-section-align. - * ld.texinfo: Change some single dashes to double dashes. - - * emultempl/pe.em (set_pe_subsystem): Record entry symbol for each - subsystem type. Ifdef out os2 type. Recognize a version number. - -Tue Oct 8 12:07:13 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em (set_pe_subsystem): When setting the subsystem - to windows, set the entry point. - - * Makefile.in (ldlex.c): Don't pass any options to $(LEX). - -Mon Oct 7 17:29:05 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Options): Mention .so extensions for shared - libraries. - -Sun Oct 6 22:35:36 1996 Jason Merrill <jason@yorick.cygnus.com> - - * scripttempl/elf{,mips,ppc}.sc: Add DWARF 2 sections. - -Fri Oct 4 18:49:31 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/m68kcoff.sc: Only set the address of .text if - RELOCATING. - -Fri Oct 4 10:59:52 1996 Doug Evans <dje@canuck.cygnus.com> - - * emulparams/sparcaout.sh ({BIG,LITTLE}_OUTPUT_FORMAT): Define. - * scripttempl/aout.sc ({BIG,LITTLE}_OUTPUT_FORMAT): Provide default. - (OUTPUT_FORMAT): Support bi-endian targets. - -Thu Oct 3 13:52:03 1996 Ian Lance Taylor <ian@cygnus.com> - - * fnmatch.h, fnmatch.c: Remove (now in libiberty). - * Makefile.in: Rebuild dependencies. - (CFILES): Remove fnmatch.c. - (HFILES): Remove fnmatch.h. - (OFILES): Remove fnmatch.o. - -Thu Oct 3 15:41:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - - * Makefile.in (mostlyclean): Move config.log to distclean. - -Wed Oct 2 23:45:25 1996 Geoffrey Noer <noer@cygnus.com> - - * emultmpl/pe.em: increase size of stack reserve to 0x2000000 - (necessary in order to compile parse.c in gcc sources under NT) - -Wed Oct 2 14:49:10 1996 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (ld_options): Fix typo in --rpath-link description. - * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest - --rpath if a needed library is not found. - -Tue Oct 1 16:17:33 1996 Joel Sherrill <joel@oarcorp.com> - - * configure.tgt (mips*-*-rtems*): New target, like mips*-*-elf*. - -Tue Oct 1 15:50:34 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo (Options): Give more detail on -l option. - - * scripttempl/elfmips.sc: Handle CREATE_SHLIB the same way that - elf.sc does, so that glibc works better. - - * ldver.c (ld_program_version): New variable. - (ldversion): Use it. - * ldver.h (ld_program_version): Declare. - * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not - --version. Change --version handling to match current GNU - standards. - (help): Print bug report address. - -Mon Sep 30 12:14:43 1996 Doug Evans <dje@canuck.cygnus.com> - - * Makefile.in (em32relf.c): Add rule for. - * configure.tgt (m32r-*-*): Recognize. - * emulparams/m32relf.sh: New file. - -Thu Sep 26 13:58:47 1996 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-make.sed: Add symbolic doublequoting to ldmain compile edit. - * mpw-config.in: Add mips-*-* case as mips-elf, and use more - wildcards in matching. - * mpw-emipself.c: New file, pregenerated mips elf emulation. - -Tue Sep 17 12:18:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldint.texinfo: Rewrote. - - * configure.tgt: Add cases for MIPS 5000 like MIPS 4300. - -Mon Sep 16 17:55:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/armcoff.sc: Only define symbols if RELOCATING. Fix - syntax error on __end__ line. - - * scripttempl/armcoff.sc: For -N or -n, don't align .data. From - Chris Hadley <Christopher.Hadley@cl.cam.ac.uk> - -Sun Sep 15 22:09:56 1996 Jeffrey A Law (law@cygnus.com) - - * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS. - -Sun Sep 15 10:38:16 1996 Mark Alexander <marka@cygnus.com> - - * emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put - stack at top of simulator memory. - -Fri Sep 13 15:49:45 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlex.l (SYMBOLCHARN): Add $, _, and ~. - -Wed Sep 11 23:30:42 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (get_emulation): Check for -mips4 like -mips1, et. al. - -Thu Sep 5 15:24:12 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (section_already_linked): Accept a lang_input_statement - as the PTR argument. If the file is symbols only, discard all - input sections. - (ldlang_add_file): Pass entry to bfd_map_over_sections. - -Wed Sep 4 15:53:43 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny - <fila@ibi.com>. - -Tue Sep 3 00:52:54 1996 Jeffrey A Law (law@cygnus.com) - - * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS - -Sun Sep 1 21:48:58 1996 Jeffrey A Law (law@cygnus.com) - - * emulparms/v850.sh: Set EMBEDDED. - -Fri Aug 30 22:30:30 1996 Jeffrey A Law (law@cygnus.com) +2000-03-02 H.J. Lu <hjl@gnu.org> - * emulparms/v850.sh: Entry symbol is "_start", tweak - ctor/dtor support. + * emulparams/elf32mcore.sh: Include "getopt.h". -Fri Aug 30 18:32:31 1996 Ian Lance Taylor <ian@cygnus.com> +2000-03-01 Ian Lance Taylor <ian@zembu.com> - * configure.tgt (sh-*-elf*): New target. - * emulparams/shelf.sh: New file. - * emulparams/shlelf.sh: New file. - * Makefile.in (ALL_EMULATIONS): Add eshelf.o and eshlelf.o. - (eshelf.c, eshlelf.c): New targets. - * scripttempl/elf.sc: If EMBEDDED is defined, then don't add - SIZEOF_HEADERS to TEXT_START_ADDR. Expand CTOR_START and CTOR_END - around .ctors, and DTOR_START and DTOR_END around .dtors. Expand - OTHER_RELOCATING_SECTIONS if RELOCATING. + * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware. -Thu Aug 29 16:57:46 1996 Michael Meissner <meissner@tiktok.cygnus.com> +2000-03-01 H.J. Lu <hjl@gnu.org> - * configure.{host,tgt} (i[345]86-*-*): Recognize i686 for pentium - pro. + * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR. + * emulparams/shpe.sh: Likewise. -Mon Aug 26 12:58:11 1996 Ian Lance Taylor <ian@cygnus.com> +2000-03-01 Nick Clifton <nickc@cygnus.com> - * ldgram.y (section): Add opt_nocrossrefs; pass value to - lang_enter_overlay. - (opt_nocrossrefs): New nonterminal. - * ldlex.l: Recognize NOCROSSREFS keyword in EXPRESSION mode. - * ldlang.c (overlay_nocrossrefs): New static variable. - (lang_enter_overlay): Add nocrossrefs parameter. - (lang_leave_overlay): Only add nocrossrefs if overlay_nocrossrefs - is set. Initialize overlay_nocrossrefs. - * ldlang.h (lang_enter_overlay): Update declaration. - * ld.texinfo (Overlays): Update documentation. + * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED + to unused parameters. - * ldver.c (ldversion): Print GNU ld in the version message. + * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static + functions only used by DLL code. + (_place_orphan): Initialise 'dollar'. -Thu Aug 22 17:10:40 1996 Ian Lance Taylor <ian@cygnus.com> +2000-03-01 H.J. Lu <hjl@gnu.org> - * configure.host: Set HLDENV. - * configure.in: Substitute HLDENV. - * configure: Rebuild. - * Makefile.in (HLDENV): New variable. - ($(LD_PROG)): Use $(HLDENV). + * ldmain.c (undefined_symbol): Take one more arg, fatal, to + indicate if the undefined symbol is a fatal error or not. + Don't delete the output file if "fatal" is false. -Thu Aug 22 16:29:28 1996 Jeffrey A Law (law@cygnus.com) +2000-02-29 H.J. Lu <hjl@gnu.org> - * Makefile.in (ev850.c): New target. - * configure.tgt (v850-*-*): New target. - * emulparams/v850.sh: New file. + * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)". + Set LC_COLLATE and LC_ALL to null and export them. It is for + sort which expects the C locale. + Add $(LIBS) to all $(HOSTING_LIBS). + * Makefile.in: Rebuild. -Thu Aug 22 11:16:02 1996 Stan Shebs <shebs@andros.cygnus.com> +2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au> - * mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit. + * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em, + beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em, + linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em} + (ld_emulation_xfer_struct): Add missing NULL initialiser for + find_potential_libraries. -Wed Aug 21 11:26:37 1996 Ian Lance Taylor <ian@cygnus.com> +2000-02-28 Jim Blandy <jimb@redhat.com> - * scripttempl/elf.sc: Put .gnu.linkonce* sections in appropriate - containing sections. + * ldgram.y (exclude_name_list): Don't require a comma to separate + list entries; the lexer considers commas to be valid part of a + filename, so in something like `foo, bar' the comma is considered + part of the first filename, `foo,'. + * ld.texinfo: Update section on EXCLUDE_FILE lists. -Mon Aug 19 13:01:42 1996 Ian Lance Taylor <ian@cygnus.com> +2000-02-27 Loren J. Rittle <ljrittle@acm.org> - * fnmatch.c: Include sysdep.h. + * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for + host "i[3456]86-*-freebsdelf*". -Mon Aug 19 11:28:29 1996 Michael Meissner <meissner@tiktok.cygnus.com> +2000-02-27 Mark Elbrecht <snowball3@bigfoot.com> - * genscripts.sh: Undo 8/16 change. + * scripttempl/i386go32.sc: Move misplaced semicolons. - * emulparams/d10velf.sh (MACHINE): Explicitly set to nothing. +2000-02-25 Ian Lance Taylor <ian@zembu.com> -Fri Aug 16 19:18:08 1996 Michael Meissner <meissner@tiktok.cygnus.com> + * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o. + (ALL_64_EMULATIONS): Remove eelf64hppa.o. + (eelf64hppa.c, ehppaelf.c): Remove targets. + * Makefile.in: Rebuild. - * genscripts.sh: Explicitly reset any shell variables set or used - by the various .sc scripts to allow inadvertant use of these - names as normal environment variables by the person running - configure. +2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br> - * Makefile.in (ed10velf.c): Use tdir_d10v, not tdir_arcelf. + * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on + GNU/Linux/sparc, but keep the default as 32. -Fri Aug 16 14:15:41 1996 James G. Smith <jsmith@cygnus.co.uk> + * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make + it default if sparcv9 or sparc64. - * scripttempl/armcoff.sc (__bss_start__, __bss_end__, - __data_start__, __data_end__): Added to keep in sync. with the - default ARM crt0.s. Added __CTOR_LIST__ and __DTOR_LIST__ support. +2000-02-24 Nick Clifton <nickc@cygnus.com> -Thu Aug 8 14:24:56 1996 Ian Lance Taylor <ian@cygnus.com> + * Makefile.am: Add rules to build emipspe.o and earmpe.o. + * Makefile.in: Regenerate. + * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe. - * ldcref.c (check_reloc_refs): If info->same, look for any symbol - defined in info->defsec, not just the section symbol. + * ldemul.h (ld_emulation_xfer_struct): Add new field: + find_potential_libraries. + * ldemul.c (ldemul_find_potential_libraries): New function. -Wed Aug 7 14:40:48 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + * ldfile.c (ldfile_open_file_search): Allow function to be + exported. + (ldfile_open_file): Call ldemul_find_potential_libraries. + * ldfile.h: Add prototype for ldfile_open_file_search. - * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk. - * acconfig.h (NEED_DECLARATION_STRSTR): New macro. - (NEED_DECLARATION_SBRK): New macro. - * configure, config.in: Rebuild. - * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR. - * ldmain.c (sbrk): Declare if HAVE_SBRK and - NEED_DECLARATION_SBRK. + * pe-dll.c: Add support for ARM, MIPS and SH targets. - * ldlang.c (lang_record_phdrs): Cast xmalloc and xrealloc return. + * emulparams/mipspe.sh: New file. Parameters for mips-pe target. + * emulparams/shpe.sh: New file. Parameters for sh-pe target. -Mon Aug 5 16:26:14 1996 Ian Lance Taylor <ian@cygnus.com> + * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs. + (gld_X_find_potential_libraries): New function. Search for + libraries called "*.lib". - * ldlex.l: Recognize OVERLAY. - * ldgram.y: Add section_phdr field to %union. - (section): Handle phdr_opt result. Add OVERLAY case. - (opt_exp_without_type): New nonterminal. - (phdr_opt): Return list of phdrs. - (overlay_section): New nonterminal. - * ldlang.c: Include <ctype.h>. - (lang_leave_output_section_statement): Add phdrs parameter. - Change all callers. - (lang_section_in_phdr): Remove. - (overlay_vma, overlay_lmn, overlay_max): New static variables. - (struct overlay_list): Define. - (overlay_list): New static variable. - (lang_enter_overlay, lang_enter_overlay_section): New functions. - (lang_leave_overlay_section, lang_leave_overlay): New functions. - * ldlang.h (lang_leave_output_section_statement): Update - declaration for new parameter. - (lang_section_in_phdr): Don't declare. - (lang_enter_overlay, lang_enter_overlay_section): Declare. - (lang_leave_overlay_section, lang_leave_overlay): Declare. - * ld.texinfo (Overlays): New node under SECTIONS, documenting - overlays. + * scriptempl/pe.sc: Add .pdata section. - * ldlex.l: Recognize MAX and MIN. - * ldgram.y (MAX, MIN): New terminals. - (exp): Recognize MAX and MIN. - * ldexp.c (fold_binary): Handle MAX and MIN. - * ld.texinfo (Arithmetic Functions): Document MAX and MIN. +2000-02-23 Richard Henderson <rth@cygnus.com> - * ld.texinfo (PHDRS): Use @cindex, not @kindex, for program header - index entries. + * scripttempl/elfd10v.sc: Remove dynamic linking hooks. + Add and use memory regions. - * ldgram.y (SIZEOF, ADDR): Do not specify type. +2000-02-23 Linas Vepstas (linas@linas.org) - * ldcref.c (check_nocrossref): Skip symbols with no output - sections. + * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New. -Fri Aug 2 14:57:49 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldgram.y (LOADADDR): New terminal. - (exp): Handle LOADADDR. - * ldlex.l: Recognize LOADADDR. - * ldexp.c (exp_print_token): Add LOADADDR. - (fold_name): Implement LOADADDR. - * ldlang.c (exp_init_os): Treat LOADADDR like ADDR. - * ld.texinfo (Arithmetic Functions): Document LOADADDR. - -Thu Aug 1 12:52:19 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (check_nocrossrefs): Declare. - * ldlang.h (struct lang_nocrossref): Define. - (struct lang_nocrossrefs): Define. - (nocrossref_list): Declare. - (lang_add_nocrossref): Declare. - * ldlex.l: Recognize NOCROSSREFS keyword. - * ldgram.y (%union): Add nocrossref field. - (NOCROSSREFS): New terminal. - (ifile_p1): Recognize NOCROSSREFS. - (nocrossref_list): New nonterminal. - * ldlang.c (nocrossref_list): Define. - (lang_add_nocrossref): New function. - * ldmain.c (main): If nocrossref_list is not NULL, call - check_nocrossrefs. - (warning_callback): Free symbols if there is no place to store - them. - (notice): Call add_cref if nocrossref_list is not NULL. - * ldcref.c: Include "ldexp.h" and "ldlang.h". - (check_nocrossrefs): New function. - (check_nocrossref): New static function. - (struct check_refs_info): Define. - (check_refs, check_reloc_refs): New static functions. - * Makefile.in: Rebuild dependencies. - * ld.texinfo (Option Commands): Document NOCROSSREFS. - - * ld.texinfo (Section Placement): Improve the wording of the - wildcard documentation. Mention that wildcards are only searched - for on the command line, not in the file system. - - * emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Move - definition of lib_path inside condition where it is used. - -Wed Jul 31 13:17:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * emulparams/d10velf.sh: Now works with elf.sc. - -Wed Jul 31 11:52:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * emulparams/d10velf.sh (SCRIPT_NAME): Change to vanilla. - -Tue Jul 30 14:46:42 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_size_sections): Add the section VMA to the result - value when computing the address of a section. - - * ld.h (args_type): Add cref field. - * lexsup.c (parse_args): Set command_line.cref. - * ldmain.c (main): Check command_line.cref rather than - link_info.notice_all. - (notice): Likewise. - - * ldcref.c (output_one_cref): Don't crash if a symbol is defined - in a section without an owner. - -Mon Jul 29 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com> - - * fnmatch.h, fnmatch.c: New files. - * ldlex.l: Remove unused definition of FILENAME. Add definition - of WILDCHAR. In SCRIPT mode, accept any sequence of WILDCHAR as a - NAME. - * ldgram.y (file_NAME_list): Accept '*' and '?' specially. - (input_section_spec): Accept '?' specially. - (statement): Change exp to mustbe_exp in length and FILL cases. - (section): Call ldlex_script before section statements, and call - ldlex_popstate after them. - * ldlang.c: Include "fnmatch.h". - (wildcardp): New static function. - (wild_section): Permit the section name to be a wildcard. - (wild_file): New static function, broken out of wild. - (wild): Call wild_file. Permit the file name to be a wildcard. - (open_input_bfds): Don't call lookup_name for a wildcard pattern. - * Makefile.in: Rebuild dependencies. - (CFILES): Add fnmatch.c. - (HFILES): Add fnmatch.h. - (OFILES): Add fnmatch.o. - * ld.texinfo: Document that file and section names can now be - wildcard patterns. - - * ldlang.c (lang_place_orphans): Correct condition: place a common - section if not relocateable or if common definitions are forced. - -Wed Jul 24 12:16:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * emulparams/d10velf.sh (SCRIPT_NAME): Change to elf. - -Wed Jul 24 13:38:22 1996 Michael Meissner <meissner@wogglebug.tiac.net> - - * configure.tgt (d10v-*-*): Don't require the -elf, allow plain d10v. - -Tue Jul 23 10:36:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com> - - * Makefile.in (ed10velf.c): New target. - * configure.tgt (d10v-*-elf*): New target. - * emulparams/d10velf.sh: New file. - -Thu Jul 18 16:25:39 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (sparc*-*-sysv4*): New target. From Andrew Gierth - <ANDREWG@microlise.co.uk>. - - * configure.host: Change irix5 to irix[56]*. + * Makefile.am: Add support for Linux/IBM 370. * configure.tgt: Likewise. -Wed Jul 17 10:52:46 1996 Kim Knuttila <krk@cygnus.com> - - * emultempl/pe.em (sort_sections): Pay attention to return code. - - * ldmisc.c (demangle): Remove all prefix '.'s from a name. - -Mon Jul 15 11:49:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Round - the value of __start_SECNAME to the alignment required by the - section to be placed. - -Tue Jul 9 12:09:02 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (mips*el-*-elf*): Use elf32elmip. - (mips*-*-elf*): Use elf32ebmip. - * emulparams/elf32bmip.sh (EMBEDDED): Don't define. - * emulparams/elf32lmip.sh (EMBEDDED): Don't define. - * emulparams/elf32elmip.sh: New file; copy of elf32lmip.sh with - EMBEDDED defined. - * emulparams/elf32ebmip.sh: New file; copy of elf32bmip.sh with - EMBEDDED defined. - * emulparams/elf32b4300.sh (EMBEDDED): Define. - * emulparams/elf32l4300.sh (EMBEDDED): Define. - * Makefile.in (ALL_EMULATIONS): Add eelf32ebmip.o eelf32elmip.o. - (eelf32ebmip.c, eelf32elmip.c): New targets. - -Thu Jul 4 12:01:03 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldver.c (ldversion): Set version to cygnus-2.7.1. - - * Released binutils 2.7. - - * emulparams/pc532macha.sh: Rename from pc532machaout.sh to avoid - System V file name limitations. - * configure.tgt (nc32k-pc532-mach*, ns32k-pc532-ux*): Use - pc532macha rather than pc532machaout. - * Makefile.in (ALL_EMULATIONS): Change epc532machaout.o to - epc532macha.o. - (epc532macha.c): Rename target from epc532machaout.c. - -Wed Jul 3 11:40:10 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (print_padding_statement): Use %u, not %x, to print - fill value. - -Sun Jun 30 11:16:43 1996 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-eppcmac.c: Update to reflect May 23 change to aix.em. - -Thu Jun 27 14:03:42 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Put the .sa - file just before the .so file, rather than just after. - - * configure.host: Use -print-file-name=FILE rather than piping - -print-libgcc-file-name through sed. - (i[345]86*-*-sco*, i[345]86-*-isc*): Create crtbegin.o and - crtend.o files, in case gcc doesn't use them. - * Makefile.in (mostlyclean): Remove crtbegin.o and crtend.o. - -Wed Jun 26 15:57:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (mips*-dec-osf*): New target. - -Tue Jun 25 22:15:29 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - - * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir, - INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values. - (docdir): Removed. - * configure.in (AC_PREREQ): autoconf 2.5 or higher. - (AC_PROG_INSTALL): Added. - * configure: Rebuilt. - -Mon Jun 24 18:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc (_GLOBAL_OFFSET_TABLE_): Don't do a - PROVIDE of _GLOBAL_OFFSET_TABLE_, since it needs to be at a - non-fixed location. - -Mon Jun 24 17:55:31 1996 Jouke Numan <jnuman@bazis.nl> - - * ldlang.h (enum section_type): Define. - (lang_output_section_statement_type): Remove loadable field. Add - sectype field. - (lang_enter_output_section_statement): Change flags parameter in - prototype to sectype. - * ldgram.y (typebits): Remove. - (sectype): New static variable. - (opt_at): Use sectype rather than typebits. - (type): Set sectype rather than typebits. - (atype): Likewise. - * ldlex.l: Recognize DSECT, COPY, INFO, and OVERLAY in - EXPRESSION mode. - * ldlang.c (lang_output_section_statement_lookup): Set sectype - field rather than loadable field. - (wild_doit): Check sectype rather than loadable. - (lang_record_phdrs): Likewise. - (lang_enter_output_section_statement): Rename flags parameter to - sectype. Set sectype field rather than loadable field. Set flags - field based on sectype. - -Mon Jun 24 12:00:32 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elf.sc: Force .stab* and .comment sections to start - at 0. - - * configure.in: On alpha*-*-osf*, link against libbfd.a if not - using shared libraries. - * configure: Rebuild with autoconf 2.10. - -Fri Jun 21 17:40:56 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil> - - * configure.tgt: Add support for *-*-rtems* configurations. - -Fri Jun 21 13:05:51 1996 Richard Henderson <rth@tamu.edu> - - * configure.tgt (alpha-*-linuxecoff*): New target. - (alpha-*-linux*): Use elf64alpha. - * emulparams/elf64alpha.sh: New file. - * emultempl/elf32.em: If ELFSIZE is not set, set it to 32. Use - ${ELFSIZE} rather than 32 when calling BFD routines. - (hold_rodata): New static variable. - (gld${EMULATION_NAME}_place_orphan): Use hold_rodata for a - readonly section that is not code. - (gld${EMULATION_NAME}_place_section): Set hold_rodata. Don't use - a .rel section unless its bfd_section field is not NULL. - * Makefile.in (ALL_EMULATIONS): Add eelf64alpha.o. - (eelf64alpha.c): New target. - -Fri Jun 21 12:45:46 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldmisc.c (vfinfo): Correct handling of 0 in %W case. - -Thu Jun 20 13:55:28 1996 Ian Lance Taylor <ian@cygnus.com> - - Add enough support to understand the gcc svr3.ifile script: - * ldlex.l: Recognize BLOCK and GROUP in EXPRESSION context. Add - BIND keyword. - * ldgram.y: Add BIND token. - (section): Recognize GROUP. - (opt_ext_with_type): Recognize a couple of cases of BIND. - * ldlang.c (init_os): Don't do anything if section is already - initialized. Call exp_init_os on addr_tree field. - (exp_init_os): New static function. - (map_input_to_output_sections): Call exp_init_os on assignment - expression. - (lang_place_orphans): Check for common sections by name COMMON - rather than by common_section field. Don't warn about absence of - [COMMON] command. - - * ldlang.h (lang_input_statement_type): Remove useless fields - common_section, common_output_section, and complained, as well as - all references to them. - - * ldexp.c: Reindent a lot of code. - (exp_fold_tree): Call FAIL rather than einfo in default case. - -Wed Jun 19 11:40:14 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.host (m88*-*-dgux*): Quote HOSTING_CRT0. From - <randall.hron@medaphis.com>. - -Tue Jun 18 15:53:09 1996 Jeffrey A. Law <law@rtl.cygnus.com> - - * scripttempl/h8300s.sc: New file for H8/S. - * emulpararms/h8300s.sh: New file for H8/S. - * Makefile.in (ALL_EMULATIONS): Add H8/S. - (e_h8300s.c): Add dependencies. - * configure.tgt: Add H8/S to targ_extra_emuls. - -Tue Jun 18 17:55:39 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (i[345]86*-*-isc*): New target. From - <uddeborg@carmen.se>. - -Wed Jun 12 12:46:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c: Include "libiberty.h". - (parse_args): Copy the -Y argument into memory. - (set_default_dirlist): Don't put the ':' back into the directory - list. - -Fri Jun 7 11:27:42 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em: Include libiberty.h. - (gld${EMULATION_NAME}_set_symbols): New static function to add - LD_LIBRARY_PATH to the list of search directories. - (ld_${EMULATION_NAME}_emulation): Add new set_symbols routine. - -Thu Jun 6 11:50:31 1996 Ian Lance Taylor <ian@cygnus.com> - - * emulparams/elf32bmip.sh (OTHER_GOT_SYMBOLS): Use ALIGN(16) - rather than . when computing _gp value. From Per Fogelstrom. - * emulparams/elf32lmip.sh (OTHER_GOT_SYMBOLS): Likewise. - - * ldmain.c (main): Don't close and unlink the file on error, since - remove_output will do it anyhow. - * ldlang.c (open_output): Set boolean variable to true, not 1. - -Wed Jun 5 18:34:14 1996 James G. Smith <jsmith@cygnus.co.uk> - - * emulparams/{elf32b4300.sh,elf32l4300.sh} (SCRIPT_NAME): Use - elfmips instead of elf. - -Tue Jun 4 18:43:07 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldcref.c: New file. - * ld.h (add_cref, output_cref): Declare. - * ldmain.c (main): Initialize notice_all field. If it is set at - end of link, call output_cref. - (notice): Rename from notice_ysym. Check notice_all. - * ldmisc.c (finfo): Make globally visible. - * ldmisc.h (finfo): Declare. - * lexsup.c (OPTION_CREF): Define. - (ld_options): Add "cref". - (parse_args): Handle OPTION_CREF. - * Makefile.in: Rebuild dependencies. - (CFILES): Add ldcref.c. - (OFILES): Add ldcref.o. - * ld.texinfo, ld.1: Document --cref. - -Tue Jun 4 12:12:25 1996 Tom Tromey <tromey@csk3.cygnus.com> - - * Makefile.in (install): Make $(tooldir) and $(tooldir)/bin. - -Fri May 31 12:40:55 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em (sort_sections): Don't assume that a - wild_statement has a section name. - -Wed May 29 13:13:35 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/elfmips.sc: Quote test -z argument. - - * ld.texinfo: Clarify the CONSTRUCTORS command. - -Thu May 23 16:07:44 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize - file, not impfile. - -Wed May 22 11:31:30 1996 Doug Evans <dje@seba.cygnus.com> - - * ldlang.c (wild_doit): Don't copy over SEC_LINK_{ONCE,DUPLICATES} - if final link. - * emultempl/pe.em (sfunc): Renamed to sort_by_file_name. - (sort_by_section_name, sort_sections_1): New functions. - (sort_sections): Only sort by file name sections in .idata. - Add "Grouped Sections" support. - (gld${EMULATION_NAME}_place_orphan): Rewrite to support Grouped - Sections. - (gld${EMULATION_NAME}_place_section): Delete. - * scripttempl/pe.sc (.text,.data,.rdata): Add *(.foo\$). - (.CRT,.rsrc): Rewrite to use Grouped Section support. - -Tue May 21 14:31:48 1996 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-eppcmac.c: Update to reflect changes to aix.em. - -Sun May 19 16:59:44 1996 Doug Evans <dje@seba.cygnus.com> - - * ldlang.c (dprint_statement): Stop printing at end of list. - -Sat May 18 13:12:05 1996 Steve Chamberlain <sac@slash.cygnus.com> - - Support for --force-exe-suffix - * ld.h (args_type): Add force_exe_suffix. - * ld.texinfo: Add documentation. - * ldmain.c (main): Add support for option. - * lexsup.c (OPTION_FORCE_EXE_SUFFIX): New. - (ld_options, parse_args): Add support for option. - -Wed May 15 12:50:25 1996 Jim Wilson <wilson@chestnut.cygnus.com> - - * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call. - -Fri May 10 16:28:44 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc (__stack): Make __stack 0 if it was - referenced but not defined. - -Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com> - - * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}: - Set a new variable to signify if the final target is an embedded - system. - * scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to - .text for an embedded system. - -Tue May 7 10:56:11 1996 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function. - (gld${EMULATION_NAME}_place_section): New function. - (hold_{section,use,text,rdata,data}): New static locals. - (ld_${EMULATION_NAME}_emulation): Update orphan field. - * scripttempl/pe.sc: Whitespace cleanup. Semicolon usage cleanup. - (INIT,FINI): Delete, unused. - (.text): Document orphan .text.foo sections. - (.rdata): Document orphan .rdata.foo sections. - (.data): Document orphan .data.foo sections. - -Tue May 7 11:35:46 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300.sc: Place ".tiny" sections right - after ".data" sections. - * scripttempl/h8300h.sc: Place ".tiny" sections into - the "tiny" memory region, 0xff8000 through 0xffff00. - - * scripttempl/h8300.sc: Set the entry point to the value of - "_start" rather than the start of the text segment. - * scripttempl/h8300h.sc: Likewise. - - * scripttempl/h8300.sc: Place .rodata sections before .text - sections in main ram. - * scripttempl/h8300h.sc: Likewise. - -Mon May 6 23:32:30 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the - 8-bit region and 8-bit sections. - -Wed May 1 17:50:06 1996 Doug Evans <dje@canuck.cygnus.com> - - * ldlang.c (section_already_linked): Fix typos. - -Mon Apr 29 20:31:06 1996 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/pe.sc (.endjunk): Define __end__. - -Mon Apr 29 17:05:13 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (longest_section_name): Remove. - (SECTION_NAME_MAP_LENGTH): Define. - (print_size, print_alignment, print_fill, print_section): Remove. - (print_flags): Remove. - (lang_map): Rewrite. - (print_output_section_statement): Rewrite. - (print_assignment): Rewrite. - (print_one_symbol): Rewrite. - (print_input_section): Rewrite. - (print_fill_statement): Rewrite. - (print_data_statement): Rewrite. - (print_address_statement): New static function. - (print_reloc_statement): Rewrite. - (print_padding_statement): Rewrite. - (print_wild_statement): Rewrite. - (print_statement_list): Clean up. - (print_statement): Clean up. Some minor output changes. - (print_statements): Clean up. - (load_symbols): Put another - before -whole-archive. - * ldexp.c (exp_print_tree): Change etree_value and etree_rel to - print 0x and to omit leading zeroes. For etree_rel, use %B to - print the BFD. For etree_assign, remove the space after the - destination name. - * ldwrite.c: Include "libiberty.h". - (clone_section): Call xstrdup, not strdup. - (ldwrite): Don't print any map information. - (print_symbol_table, print_file_stuff, print_symbol): Remove. - * ldmain.c (main): Call lang_map when appropriate. - * ldmisc.c (vfinfo): Add support for %W. - (print_address): Remove. - * ldmisc.h (print_address): Don't declare. - * Makefile.in: Rebuild dependencies. - -Mon Apr 29 10:29:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * configure.host (m68*-*-linux*): Add -dynamic-linker to - HOSTING_CRT0. Search -lgcc both before and after -lc in - HOSTING_LIBS. Look for crt{begin,end}.o in the compiler directory - at first. - (i[345]86-*-linux*): Look for crt{begin,end}.o in the compiler - directory at first. - -Fri Apr 26 14:42:27 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldmisc.h (demangle): Declare. - * ldmisc.c: Include "libiberty.h". Include demangle.h with "", - not <>. - (demangle): Make non-static. Remove remove_underscore paramter. - Always return an allocated string. - (vfinfo): Free result of demangle. Add case 'G'. Use %T to print - functionname, rather than calling demangle. Print a colon between - the BFD(section+offset) and the line number. - * ldmain.c (add_archive_element): Improve format of archive - information in map file. - (constructor_callback): Don't print anything to the map file. - * ldlang.c (lang_one_common): Improve format of common symbol - information in map file. - * ldctor.c (ldctor_build_sets): If producing a map file, print set - information. - * ldwrite.c (print_symbol_table): Print a newline before the - header in the map file. - * Makefile.in: Rebuild dependencies. - - * ldmisc.c (vfinfo): Reindent. - -Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_size_sections): If _cooked_size is not 0, then - don't clobber it when not relaxing. - - * ld.h (ld_config_type): Remove traditional_format field. - * ldmain.c (main): Use link_info.traditional_format rather than - config.traditional_format. - * ldlang.c (ldlang_open_output): Likewise. - * lexsup.c (parse_args): Likewise. - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise. - * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise. - - * ldlang.c (wild_doit): Discard debugging sections if we are - stripping debugging information. - - * emulparams/z8002.sh (ARCH): Set to z8002, not z8k. - -Tue Apr 16 16:38:32 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldexp.c (fold_binary): Correct handling of subtraction with - absolute values. - (fold_name): Permit symbols in lang_allocating_phase_enum. - - * scripttempl/aout.sc: Only PROVIDE __stack when RELOCATING. Undo - accidental changes in last patch. - -Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * configure.tgt (powerpc*-*-{sysv,linux}): Add aliases. - (powerpcle*-*-{sysv,solaris}): Ditto. - -Mon Apr 15 14:50:56 1996 Rob Savoye <rob@chinadoll.cygnus.com> - - * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it - in m68k/crt0.S without things blowing up. - -Fri Apr 12 16:40:56 1996 Rob Savoye <rob@chinadoll.cygnus.com> - - * scripttempl/m68kcoff.sc: Remove default address for .data so - .text, .data, and .bss are all sequential. - -Thu Apr 11 12:05:35 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/m68kcoff.sc: Remove regions and simplify. - -Wed Apr 10 14:41:53 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300.sc: Add the "8-bit area" in the upper 256 - bytes of the address space. Put data from the ".eight" sections - into the 8-bit area. - * scripttempl/h8300h.sc: Likewise. - -Tue Apr 9 14:10:42 1996 Doug Evans <dje@canuck.cygnus.com> - - * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): - Pass $ARCH to ldfile_set_output_arch instead of setting - ldfile_output_architecture directly. - -Tue Apr 9 14:22:15 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc (.init,.fini): Put .init, .fini section - next to .text. Put _etext after .text, .init, .fini, and - .rodata{,2} sections. - -Tue Apr 9 12:18:57 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo: Rearrange option documentation. - - * lexsup.c (ld_options): New static array. - (parse_args): Build shortopts and longopts from ld_options array. - (help): New static function. - * ldver.h (help): Don't declare. - * ldver.c (ldversion): Reindent. - (help): Remove. - - * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic. - -Mon Apr 8 11:56:23 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em: When checking for a native emulation, check - that the current emulation is the default emulation. - * emultempl/sunos.em: Likewise. - - * configure.in: Permit --enable-shared to specify a list of - directories. - * configure: Rebuild. - - * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic, - for HP/UX compatibility. - -Fri Apr 5 14:30:14 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New - static function, if ${host} = ${target}. - (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a - needed shared library if ${host} = $[target}. - - * configure.host (i[345]86-*-linux*): Add -dynamic-linker to - HOSTING_CRT0. Search -lgcc both before and after -lc in - HOSTING_LIBS. - - * configure.tgt: Add i[345]86-*-freebsdelf* target; from John - Polstra <jdp@polstra.com>. - -Fri Apr 5 18:11:25 1996 James G. Smith <jsmith@cygnus.co.uk> - - * emulparams/elf32{b,l}4300.sh (MACHINE): Add explicit - architecture number. - * scripttempl/elf.sc: Use $MACHINE definition if present. - * configure.tgt (targ_extra_emuls): Force 4100 build to use same - template as 4300. - -Mon Apr 1 17:35:40 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_size_sections): Change region check to handle - regions which end at the highest possible address correctly. - From Roland Weber <roweber@ira.uka.de>. - - * ldlang.c (section_already_linked): New static function. - (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a - relocateable link. Don't worry about section being NULL, since it - never should be. Don't call init_os unless the section is going - to be added. - (ldlang_add_file): Call section_already_linked for each section. - * ldmain.c (multiple_definition): Don't warn about multiple - definitions in sections which are being discarded. - -Sun Mar 31 00:30:47 1996 steve chamberlain <sac@slash.cygnus.com> - - * scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/. - * emultempl/pe.em (init): Remove special case PPC code. - -Fri Mar 29 00:01:29 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300.sc: Make vectors section 0xc4 bytes long - so as not to overwrite the magic syscall entry at 0xc4. - * scripttempl/h8300h.sc: Likewise. - -Thu Mar 28 11:05:47 1996 Doug Evans <dje@canuck.cygnus.com> - - * configure.tgt (sparc64-*-solaris2*): Delete. - Stick with sparc-*-solaris2*. - -Wed Mar 27 12:33:24 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/". - * ldlang.c (init_os): Fail on an attempt to initialize any section - named DISCARD_SECTION_NAME. - (wild_doit): Discard input sections assigned to an output section - named DISCARD_SECTION_NAME. - * ld.texinfo: Document use of /DISCARD/. - - * ldlang.c: Fix some indentation and comments. - -Tue Mar 26 18:14:49 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Call bfd_set_error_program_name. - -Thu Mar 21 13:17:34 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo: Fix a couple of indexing entries. Mention that - --verbose displays builtin linker scripts. - - * ldmisc.c (vfinfo): case 'I': If the file is not in an archive, - and the local symbol name does not match the filename, print the - filename as well. - - Patches from John Polstra <jdp@polstra.com> for FreeBSD ELF: - * lexsup.c (parse_args): -Bshareable is a synonym for -shared. - * emulparams/elf_i386.sh (NONPAGED_TEXT_START_ADDR): Make the same - as TEXT_START_ADDR. - -Wed Mar 20 18:18:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * ld.texinfo: Fix typos. Use @pxref only inside parentheses. - -Wed Mar 20 16:56:15 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (add_wrap): New function. - * ldmain.h (add_wrap): Declare. - * lexsup.c (parse_args): Call add_wrap. - -Tue Mar 19 16:44:20 1996 Doug Evans <dje@canuck.cygnus.com> - - * configure.host (sparc*-*-solaris2* host): Accept any sparc variant. - -Wed Mar 13 17:47:31 1996 Jeffrey A Law (law@cygnus.com) - - * scripttempl/h8300.sc: Change name of page zero memory - from "null" to "vectors". Create an output section for - vectors. Add comments on how to explicitly place items - in the vector table. - * scripttempl/h8300h.sc: Likewise. - -Wed Mar 13 12:40:18 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/lnk960.em (machine_table): Add jx and hx. - - * genscripts.sh: Don't use ${9:-xx}, since Ultrix /bin/sh doesn't - support it. - -Tue Mar 12 12:43:59 1996 David Mosberger-Tang <davidm@koala.azstarnet.com> - - * ld.h (ld_config_type): Add warn_multiple_gp field. - * lexsup.c (parse_args): Handle --warn-multiple-gp. - * ldmain.c (warning_callback): Suppress multiple gp values warning - if --warn_multiple_gp was not used. - * ld.texinfo, ld.1: Document --warn-multiple-gp. - -Tue Mar 12 12:02:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Handle --wrap. - * ldmain.c (main): Initialize link_info.wrap_hash. - * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED - and NAME cases. - * ld.texinfo, ld.1: Document --wrap. - - * configure: Rebuild with autoconf 2.8. - - Don't do SunOS style dynamic linking for sparc-aout: - * configure.tgt (sparc64-*-aout*): Use sparcaout, not sun4. - (sparclite*-fujitsu-*, sparc*-*-aout): Likewise. - (sparc*-wrs-vxworks*): Likewise. - * emulparams/sparcaout.sh: New file. - * Makefile.in (ALL_EMULATIONS): Add esparcaout.o. - (esparcaout.c): New target. - -Wed Mar 6 16:06:52 1996 J.T. Conklin <jtc@rtl.cygnus.com> - - * scripttempl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change - in a different manner to work around differences in shell variable - expansion. - -Wed Mar 6 18:08:18 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.h (ldemul_unrecognized_file): Declare. - (ldemulation_xfer_type): Add unrecognized_file field. - * ldemul.c (ldemul_unrecognized_file): New function. - * ldlang.c (load_symbols): If a file can not be recognized, call - ldemul_unrecognized_file before trying it as a linker script. - * aix.em (gld${EMULATION_NAME}_unrecognized_file): New static - function. - (gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r". - (ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file. - -Mon Mar 4 14:11:17 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (wild): Handle foo.a(.text) by mapping each included - member of foo.a separately. From Jouke Numan <jnuman@bazis.nl>. - -Fri Mar 1 10:24:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): - Search trinary.cond rather than searching trinary.lhs twice. - -Tue Feb 27 15:08:43 1996 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-make.sed: Edit out shared library support. - (@TDIRS@): Edit out, can't use genscripts. - -Tue Feb 27 15:09:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * configure.tgt (m68k-*-linuxaout*, m68k-*-linux*): New targets. - * emulparams/m68klinux.sh: New file. - * emultempl/linux.em (gld${EMULATION_NAME}_before_allocation): - Call bfd_${EMULATION_NAME}_size_dynamic_sections instead of - bfd_linux_size_dynamic_sections. - * Makefile.in (ALL_EMULATIONS): Add em68klinux.o. - (em68klinux.c): New target. - * configure.host (m68*-*-linuxaout*, m68*-*-linux*): New hosts. - -Tue Feb 27 12:55:46 1996 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (ALL_EMULATIONS): Sort into alphabetical order. - Fill in missing entries. - - * lexsup.c (parse_args): Recognize --no-whole-archive. - * ldlang.h (lang_input_statement_type): Add whole_archive field. - * ldlang.c (new_afile): Set whole_archive field. - (load_symbols): Check input file specific whole_archive field - rather than global variable. - * ld.texinfo, ld.1: Document --no-whole-archive. - -Tue Feb 20 16:07:00 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt: Correct gldi960 to gld960. - -Mon Feb 19 11:16:44 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Check - the SONAME if it is available. - (gld${EMULATION_NAME}_stat_needed): Use the SONAME, not the - filename, when checking for conflicting library versions. Don't - assume that the suffix is only numbers and dots. - - * ld.texinfo: Mention that -R can be used for -rpath. - -Sun Feb 18 15:05:17 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.host: Check for 'do not mix' from native linker before - trying to use -rpath. - -Thu Feb 15 13:58:06 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Remove explicit substitution of CFLAGS; autoconf - does it anyhow. - * configure: Rebuild. - * Makefile.in (LDFLAGS): Set to @LDFLAGS@. - - * configure.in: Call AC_PROG_CC before configure.host. - * configure: Rebuild. - * configure.host: Remove go32 host, since it should no longer be - necessary. Don't set CC for romp host. - - * scripttempl/elf.sc: Don't skip a page in virtual memory space if - the text segment ends exactly on a page boundary. - - * configure.in: Substitute RPATH_ENVVAR. - * configure: Rebuild. - * configure.host: Set RPATH_ENVVAR. - * Makefile.in (RPATH_ENVVAR): New variable. - (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH. - -Wed Feb 14 18:49:01 1996 Alan Modra <alan@spri.levels.unisa.edu.au> - - * configure.in: Redo emulation handling so that each emulation - searches the correct tool directory, based on the target alias. - For example, "configure --enable-targets=m68k-coff i386-linux" - will search /usr/local/i386-linux/lib for linux and - /usr/local/m68k-coff/lib for m68k-coff. - * configure: Rebuild. - * configure.tgt: Add special tdir settings for Linux. - * Makefile.in: Add @TDIRS@. Pass "$(tdir_EMUL)" to ${GENSCRIPTS} - for each eEMUL.c target. - * genscripts.sh: Accept specific alias as 9th argument, and use it - in LIB_PATH. - -Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de> - - * ldlang.c (lang_set_startof): Don't do anything for a - relocateable link. - - * ldgram.y (mri_script_file): Call mri_draw_tree. - * mri.c (mri_draw_tree): Make globally visible. Don't bother to - create memory regions. - (mri_load): Don't call mri_draw_tree. - * mri.h (mri_draw_tree): Declare. - - * configure.tgt (m68*-*-psos): New target. - * emulparams/m68kpsos.sh: New file. - * scripttempl/psos.sc: New file. - * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o. - (em68kpsos.c): New target. - -Wed Feb 14 11:09:25 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.tgt (*-*-ieee*): New target; use vanilla. - - * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip - `:foo' from ${ARCH}. - -Tue Feb 13 15:58:58 1996 Bryan Ford <baford@snake.cs.utah.edu> - - * scripttempl/i386msdos.sc: Don't pad the .text section. Put - .rodata in .data. - -Tue Feb 13 14:04:19 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared. - - * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if - it looks like we might be linking in two different versions of the - same shared library. Based on a patch from H J Lu <hjl@zoom.com>. - -Thu Feb 8 19:25:54 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_size_sections): Increment the section size when a - padding statement is encountered. - -Wed Feb 7 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Look for --enable-shared. Change the value of - BFDLIB when linking against a shared library on SunOS. - * configure: Rebuild. - * configure.host: If using a shared BFD library, try to pass a - reasonable -rpath option when linking. - * Makefile.in (BFDLIB): Set to @BFDLIB@. - -Tue Feb 6 12:29:14 1996 Doug Evans <dje@charmed.cygnus.com> - - * emulparams/elf64_sparc.sh (ARCH): Change to `sparc:v9'. - * emultempl/generic.em: Strip `:foo' from ${ARCH}. - -Mon Feb 5 16:25:30 1996 Ian Lance Taylor <ian@cygnus.com> - - Support for building bfd and opcodes as shared libraries, based on - patches from Alan Modra <alan@spri.levels.unisa.edu.au>: - * configure.in (HLDFLAGS): New substitution. - * configure: Rebuild. - * configure.host: Set HLDFLAGS on SunOS. - * Makefile.in (HLDFLAGS): New variable. - (BFDDEP): New variable. - (BFDLIB): Change to -L../bfd -lbfd. - ($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB). Use - $(HLDFLAGS) in link. - (check): Set LD_LIBRARY_PATH in the environment. - -Fri Feb 2 19:26:25 1996 Michael Meissner <meissner@wogglebug.tiac.net> - - * scripttempl/elfppc.sc (.sdata2, .sbss2): Put .sdata2 and .sbss - in the read-only section, not read/write unless we are making a - shared library. - (.debug*): Add dwarf debug sections. - (.rela.{sdata*,sbss*}): Add sections. - -Fri Feb 2 16:50:21 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure: Regenerate. - -Thu Feb 1 10:50:46 1996 Ian Lance Taylor <ian@cygnus.com> - - * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000, - for SVR4 compatibility. - - * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE. - -Wed Jan 31 17:30:19 1996 Steve Chamberlain <sac@slash.cygnus.com> - - * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New. - * emultempl/pe.em (definfo init): Make the default stack reserve - of a PPC larger. - -Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu> - - * configure.tgt (m68*-apple-aux*): New target. - * emulparams/m68kaux.sh: New file. - * scripttempl/m68kaux.sc: New file. - * Makefile.in (ALL_EMULATIONS): Add em68kaux.o. - (em68kaux.c): New target. - -Tue Jan 30 13:18:56 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore - -bnoentry, since the right thing tends to happen anyhow. - -Mon Jan 29 12:29:26 1996 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo, ld.1: Document -export-dynamic. - -Fri Jan 26 11:11:55 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * emultempl/sunos.em: Check for native compile by comparing - ${target} and ${host}. - -Thu Jan 25 16:46:58 1996 James G. Smith <jsmith@cygnus.co.uk> - - * emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed - TEXT_START_ADDR to allow use on IDT and PMON systems. - -Wed Jan 24 20:59:40 1996 Steve Chamberlain <sac@slash.cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): - correct spelling. - -Wed Jan 24 16:59:19 1996 Doug Evans <dje@charmed.cygnus.com> - - * configure.tgt (sparc64-*-solaris2*): New configuration. - (sparc64-*-aout*): Renamed from sparc64*. - -Mon Jan 22 13:01:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@. - * genscripts.sh: Set host, target and target_alias variables. - Check for native compile by comparing ${target} and ${host}. - * emultempl/elf32.em: Likewise. - * scripttempl/elfmips.sc: Test ${target}, not ${target_alias}. - -Mon Jan 22 11:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc: Refine eabi support to better support - .sdata, .sdata2, .sbss, etc. sections. - -Tue Jan 16 15:16:58 1996 Ian Lance Taylor <ian@cygnus.com> - - * ldgram.y (%union): Add phdr field. - (phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at. - (phdr_qualifiers): New nonterminal. Add support for FLAGS. - (opt_hdrs, hdr): Remove. - (phdr_val): New nonterminal. - * ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr - and phdrs parameters. Add flags parameter. - (lang_record_phdrs): Update for changes to lang_phdr. Pass flags - to bfd_record_phdr. - * ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and - phdrs fields. Add flags field. - (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove. - (lang_new_phdr): Update declaration. - * ld.texinfo: Document FLAGS. - -Mon Jan 15 15:07:19 1996 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): - Don't make a shared library because of an undefined reference to - __GLOBAL_OFFSET_TABLE_. - - Add some Irix 5 support, mostly from Kazumoto Kojima - <kkojima@info.kanagawa-u.ac.jp>: - * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips. - (SHLIB_TEXT_START_ADDR): Define. - (OTHER_GOT_SYMBOLS): Define. - (OTHER_READWRITE_SECTIONS): Remove initialization of _gp. - (EXECUTABLE_SYMBOLS): Don't define. - (DYNAMIC_LINK): Don't define. - * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh. - * scripttempl/elfmips.sc: New file. - * configure.host (mips*-dec-bsd*): Change mips to mips*. - (mips*-sgi-irix4*): Likewise. - (mips*-sgi-irix5*): New entry. - * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than - elf.sc. - (eelf32lmip.c): Likewise. - -Sat Jan 13 09:41:43 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add - .rela.got.neg section. - -Fri Jan 12 14:56:19 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/sh.sc: Only build constructors when CONSTRUCTING. - - * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if - ANSI_PROTOTYPES is defined. Remove special handling of - WINDOWS_NT. Various indendation fixes. - (vfinfo): Change fmt parameter to const char *. - (info_msg): Write <stdarg.h> version. - (einfo, minfo, finfo): Likewise. - (info_assert): Change file parameter to const char *. - * ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is - defined, use a real prototype. - (info_assert): Change first parameter to be const char *. - -Fri Jan 12 13:29:55 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc: Add support for .sdata2/.sbss2, etc. Add - in old support that 2.7.2 needs, but the current compiler does - not. - - * Makefile.in (eelf32{,l}ppc.c): Fix up dependencies to use the - correct Linker script template. - - * emulparams/elf32{,l}ppc.sh (TEXT_START_ADDR): Set to 0x40000, - not 0x400000. - (DATA_ADDR,NONPAGED_TEXT_START_ADDR): Delete. - -Tue Jan 9 15:53:02 1996 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/alpha.sc: Put .rconst right after .rdata. - -Fri Jan 5 14:07:45 1996 Steve Chamberlain <sac@slash.cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): - sort using right pointer. - -Fri Jan 5 12:25:47 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc: Remove support for creating special - labels for eabi section begin/end here. The compiler now uses - crt{i,n}.o to create these symbols. - -Thu Jan 4 17:08:58 1996 Ian Lance Taylor <ian@cygnus.com> - - * configure.host: Change existing Linux HOSTING_CRT0 to be used - for a.out only, and put in appropriate HOSTING_CRT0 and - HOSTING_LIBS values for Linux ELF. - -Thu Jan 4 12:02:05 1996 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/h8300.sc: Use all 64K for ram. - * scripttempl/h8300h.sc: Define 256K ram size. - -Thu Dec 21 15:57:18 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Pass - export_defines as true to bfd_xcoff_size_dynamic_sections if -unix - was used, regardless of whether -bE was used. - -Tue Dec 19 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set - relocateable before calling ldctor_build_sets if the output file - is in an XCOFF format. - -Fri Dec 15 16:34:36 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldwrite.c (build_link_order): When handling a data statement, if - the endianness of the output file is unknown, use the endianness - of the input file. - -Tue Dec 12 13:55:41 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-config.in: Recognize mips-*-* as equivalent to - mips-idt-ecoff. - * mpw-eppcmacos.c: Rename to shorter mpw-eppcmac.c. - * mpw-ld.r: Add version resources. - (cfrg): Use symbolic instead of literal name for executable. - -Mon Dec 11 15:13:41 1995 Kim Knuttila <krk@cygnus.com> - - * scripttempl/ppcpe.sc (FINI): Moved the .reloc section. - -Wed Dec 6 14:33:50 1995 Doug Evans <dje@canuck.cygnus.com> - - * ldlang.c (print_statement{,s}): Delete duplicate prototype. - (print_statement_list): Renamed from print_statement. All callers - updated. - (print_statement): New function to print just one statement. - (print_{data,reloc,padding}_statement): Don't crash if - output_section == NULL. - (dprint_statement): New function. - - * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix - call to sort_sections. - -Wed Dec 6 14:59:06 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (unix_ld): New static variable. - (gld${EMULATION_NAME}_parse_args): Handle -unix. - (gld${EMULATION_NAME}_before_allocation): If unix_ld, pass - gc as false and export_defineds as true to size_dynamic_sections. - - * ldexp.c (exp_fold_tree): Permit assignments to dot in the final - phase if the current section is abs_output_section. - - -Tue Dec 5 09:49:39 1995 Doug Evans <dje@canuck.cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call - to sort_sections. - -Fri Dec 1 16:48:36 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldgram.y (PHDRS): New token. - (ifile_p1): Accept phdrs. - (section): Accept phdr_opt at the end of the section definition. - (phdr_op): New nonterminal. - (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise. - * ldlex.l: Accept PHDRS. - * ldlang.h (struct lang_output_section_phdr_list): Define. - (lang_output_section_statement_type): Add phdrs field. - (struct lang_phdr): Define. - (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define. - (lang_new_phdr): Declare. - * ldlang.c (lang_phdr_list): New static variable. - (lang_output_section_statement_lookup): Initialize phdrs field. - (lang_process): Call lang_record_phdrs. - (lang_new_phdr): New function. - (lang_section_in_phdr): New function. - (lang_record_phdrs): New static function. - * ld.texinfo: Document PHDRS. - -Thu Nov 30 13:14:30 1995 Kim Knuttila <krk@cygnus.com> - - * scripttempl/ppcpe.sc: Moved .edata into its own section to - expose it. - -Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> - - * configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and - HOSTING_LIBS for testing. - (m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for - testing. - -Tue Nov 28 12:14:53 1995 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Set config.dynamic_link to false for -N - and -n. - -Mon Nov 27 13:12:09 1995 Ian Lance Taylor <ian@cygnus.com> - - * configure: Rebuild with autoconf 2.7. - -Fri Nov 24 18:35:35 1995 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/pe.sc: Two .junk's is too much junk. - -Tue Nov 21 16:14:32 1995 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Use BFD_NEED_DECLARATION. - * acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section. - * configure, config.in: Rebuild with autoconf 2.6. - - * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR - being unsupported if this is not a relocateable link and the input - BFD supports it, since ldctor_build_sets can cope with that case. - -Fri Nov 17 16:23:15 1995 Stan Shebs <shebs@andros.cygnus.com> - - * configure.tgt (powerpc-*-macos*): New target. - * emulparams/ppcmacos.sh: New file, PowerMac emulation. - * Makefile.in (ALL_EMULATIONS): Add eppcmacos.o. - (eppcmacos.c): New target. - * mpw-eppcmacos.c: Update. - * mpw-make.sed: Edit out attempts to use {GENSCRIPTS}. - -Fri Nov 17 10:37:27 1995 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not - $(host_canonical) and $(target_canonical). - (CXX_FOR_TARGET): Likewise. - -Thu Nov 16 11:23:42 1995 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/pe.sc (.endjunk): Move definition of `end' to here - so the malloc heap begins at a sane place. - -Thu Nov 16 03:09:32 1995 Ken Raeburn <raeburn@cygnus.com> - - Version 2.6 released. - * ldver.c (ldversion): Update to 2.6. - - * Makefile.in (mostlyclean): Delete ldemul-list.h here, but not - $(GENERATED_*FILES), since they need to be retained by distclean. - (maintainer-clean, realclean): Delete them here. - -Tue Nov 14 17:08:06 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Open the - base file with FOPEN_WB, not "w". - - * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the - environment variable LD_RUN_PATH if neither -rpath nor -rpath-link - were used. - (gld${EMULATION_NAME}_before_allocation): Use the environment - variable LD_RUN_PATH if -rpath was not used. - * ld.texinfo, ld.1: Document LD_RUN_PATH. - -Thu Nov 9 13:09:29 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Recognize - -bl and -bloadmap options. - - * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target, - report a better error. - - * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add - 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. - -Wed Nov 8 11:40:59 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.c (ldemul_default_target): Cast getenv return value. - -Tue Nov 7 11:15:36 1995 Kim Knuttila <krk@cygnus.com> - - * emulparams/ppcpe.sh (ARCH): New file for PowerPC Portable - Executable support. - * scripttempl/ppcpe.sc: New file for PowerPC Portable Executable - support. - - * configure.tgt (targ_extra_emuls): Added powerpcle-pe target. - * Makefile.in (ALL_EMULATIONS): Added eppcpe.o target. - - * emultempl/pe.em (TARGET_IS_ppcpe): file tailoring macro - (gld_$_before_allocation): added hooks for toc construction based - on the above macro. - -Tue Nov 7 11:47:23 1995 Ian Lance Taylor <ian@cygnus.com> - - * ld.texinfo: The linker does not use _main as an entry point. - -Tue Nov 7 11:46:11 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> - - * scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo - 0x2000 not 0x200. - -Mon Nov 6 10:59:21 1995 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Add test for whether free must be declared. - * sysdep.h: Declare free if necessary. Include "ansidecl.h". - * acconfig.h: Explain NEED_DECLARATION_FREE. - * configure, config.in: Rebuild. - - * lexsup.c (parse_args): Take B:: out of shortopts. - -Sun Nov 5 03:08:28 1995 Ken Raeburn <raeburn@cygnus.com> - - * emulparams/i386nbsd.sh (EXECUTABLE_SYMBOLS): Set __DYNAMIC to 0 - for now, as with m68k4kbsd, until shared library support gets - done. - - * configure.host: For i386 BSD variants, crt0.o lives in - /usr/lib. (True for NetBSD at least, unconfirmed for others.) - -Wed Nov 1 15:42:45 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> - - * Makefile.in (ALL_EMULATIONS): Add edelta68.o. - (edelta68.c): New target. - * configure.tgt (m68*-motorola-sysv*): New target. - * emulparams/delta68.sh: New file. - * scripttempl/delta68.sc: New file. - - * scripttempl/m88kbcs.sc: Handle .init and .fini. Change section - addresses. - -Wed Nov 1 11:41:56 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldgram.y (mri_script_command): Accept ',' as well as '=' in - ALIGN and ALIGNMOD statements. - - * emultempl/aix.em: Include ldgram.h. - (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on - AIX 4.1. - * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h. - -Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com> - - * configure.host (alpha-*-linux*): New host. - * configure.tgt (alpha-*-linux*): New target. - -Tue Oct 31 12:36:52 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (export_files): Remove. - (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. - -Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com> - - * 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. - -Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se> - - * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD - m68k4k arch. - (em68k4knbsd.c): New rule. - - * configure.tgt: Added support for the NetBSD m68k4k arch. - - * genscripts.sh, ldint.texinfo, - emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960, - gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s, - hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32, - i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx, - m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd, - pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd, - st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed - PAGE_SIZE to TARGET_PAGE_SIZE. - - * emulparams/m68knbsd.h: Ditto. - (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize. - (EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time - being. - - * emulparams/m68k4knbsd.sh: New file. - - * scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating. - -Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em: Include ldctor.h. - (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. - - * ldmisc.c (demangle): Fix indentation. Remove a leading period. - -Thu Oct 26 22:22:49 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-config.in: Add PowerMac target support, generate config.h. - * mac-ld.r: New file, Mac resources. - * mpw-make.sed: New file, edits Makefile.in into MPW syntax. - * mpw-make.in: Remove. - * mpw-eppcmacos.c: Prebuilt version of PowerMac linking script. - -Thu Oct 26 14:11:26 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat - -static as a synonym for -bnso. - - * scripttempl/aix.sc: Move special symbols inside sections. - Always start .data at 0. - -Wed Oct 25 11:52:12 1995 Per Bothner <bothner@kalessin.cygnus.com> - - * Makefile.in (diststuff): Also make info. - (maintainer-clean realclean): Also delete *.info*. - -Wed Oct 25 11:27:25 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/aix.em: Add support for various AIX linker options, - for AIX import and export files, and for AIX shared objects. - * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC. - - * ldmain.c (main): Initialize new field link_info.static_link. - - * ldmain.c (add_keepsyms_file): Add \n at end of einfo calls. - (constructor_callback): Likewise. - * ldmisc.c (vfinfo): Likewise. - * ldwrite.c (build_link_order): Likewise. - - * ld.texinfo: The MRI ALIGN directive is supported. - -Mon Oct 23 11:46:43 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk> - - * emulparams/elf32vr4300.sh: Deleted. - * emulparams/elf32vr4300el.sh: Deleted. - * emulparams/elf32b4300.sh: Added. - * emulparams/elf32l4300.sh: Added. - * configure.tgt, Makefile.in: Updated the build to use the - new 8.3 unique names. - -Thu Oct 19 17:41:46 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (entry_symbol): Make non-static. - * ldlang.h (entry_symbol): Declare. - - * ldlex.l: Treat PROVIDE as a keyword in expression state. - -Wed Oct 18 17:34:06 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttempl/pe.sc (.bss): Move to be after .text - -Tue Oct 17 12:22:05 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment): - Search trinary.cond rather than searching trinary.lhs twice. From - linli@ihp.PHys.ethz.CH. - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move - 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. - - * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em. - (eelf32lppc.c): Likewise. - * emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32. - (GENERATE_SHLIB_SCRIPT): Define as yes. - -Mon Oct 16 19:11:13 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em: Struct bfd_elf_link_needed_list is now named - bfd_link_needed-list; make appropriate changes. - - * configure.tgt (powerpc-*-aix*): New target; use aixppc. - (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. - -Fri Oct 13 14:00:37 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttemp/pe.sc (.reloc): Move to the end. - -Tue Oct 10 17:53:22 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_finish): Don't try to use an entry_symbol from a - section which was not linked into the final output. - -Tue Oct 10 10:17:22 1995 steve chamberlain <sac@slash.cygnus.com> - - * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix - fatal typos. - -Tue Oct 10 01:01:51 1995 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (args_type): Add rpath_link field. - * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for - required dependencies in rpath_link path. Only search - LD_LIBRARY_PATH when configured native. - * lexsup.c (parse_args): Recognize -rpath-link. - * ld.1, ld.texinfo: Document -rpath-link. - -Sat Oct 7 17:07:17 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't - bother searching for needed libraries unless doing a final link. - -Fri Oct 6 16:26:16 1995 Ken Raeburn <raeburn@cygnus.com> - - Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * ld/ld.1: Fix formatting bugs. - -Wed Oct 4 17:37:46 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldexp.c (exp_get_abs_int): Return bfd_vma, not int. - * 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. - -Mon Oct 2 13:56:09 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (global_stat): New file static variable. - (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. - -Fri Sep 29 12:00:18 1995 Doug Evans <dje@deneb.cygnus.com> - - * scripttempl/armcoff.sc: Start .text at 0x8000. - Start .data at 0x40000. - -Fri Sep 29 11:09:46 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If - command_line.rpath is set, use it, rather than the -L options, to - build the rules section. - * ld.texinfo: Document this use of -rpath. - - * lexsup.c (parse_args): Don't set link_info.shared for -assert - 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. - -Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (parsing_defsym): Declare. - * 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. - - * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other - COFF targets, allowing for the leading underscore used on SPARC - COFF. - - * lexsup.c (parse_args): Handle -assert. - * 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. - -Thu Sep 28 01:40:37 1995 Doug Evans <dje@deneb.cygnus.com> - - * Makefile.in (earmcoff.c): Build. - * configure.tgt (arm-*-coff): New target - * emulparms/armcoff.sh: New file. - * scripttempl/armcoff.sc: New file. - -Tue Sep 26 10:59:32 1995 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/i386coff.sc: Remove .data2; no longer needed. - -Fri Sep 22 18:09:02 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldfile.c (ldfile_set_output_arch): Make arch const. - -Thu Sep 21 17:55:24 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc: Correctly locate __bss_start at the - beginning of the .bss area, not at the end of data. Add - __sbss_{start,end} symbols. - -Wed Sep 20 12:29:36 1995 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (CC_FOR_TARGET): Quote $(program_transform_name). - (CXX_FOR_TARGET, install): Likewise. - -Mon Sep 18 14:53:22 1995 Ian Lance Taylor <ian@cygnus.com> - - Based on patches by Alan Modra <alan@spri.levels.unisa.edu.au>: - * Makefile.in (CC_FOR_TARGET): Remove brokensed stuff. - (CXX_FOR_TARGET): Likewise. - (install): Likewise. - (GENERATED_HFILES): Remove config.h. - (.dep): Depend upon config.h. - -Mon Sep 18 14:39:38 1995 Arne H. Juul <arnej@pvv.unit.no> - - * configure.tgt (mips*-dec-netbsd*): New target. - -Fri Sep 15 20:01:52 1995 Ken Raeburn <raeburn@cygnus.com> - - * configure.host (m88*-*-dgux*): Fix another shell syntax error. - -Fri Sep 15 23:28:05 1995 Andrew Cagney <cagney@highland.com.au> - - * configure.host (i[345]86-*-bsd*): Fix shell syntax error. - -Thu Sep 12 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttemp/pe.sc: Allow both spellings of .ctors/.dtors. - Start .text section on the right boundary. Always align - stabs. - -Tue Sep 12 12:24:17 1995 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (maintainer-clean): New target. - - * ldmain.c (struct warning_callback_info): Define. - (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. - - * ld.texinfo: Clarify -L option. - - * ldlang.c (lang_one_common): Add cast to avoid warning. - (topower): Likewise. Also, reindent. - * ldwrite.c (clone_section): Change i to unsigned int. - * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add - cast to avoid warning. - -Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (config.status): Depend upon configure.tgt. - - * ldemul.h (ldemul_set_symbols): Declare. - (ldemul_parse_args): Declare. - * ldemul.c (ldemul_parse_args): Fix indentation. - - * configure.in: Call AC_HEADER_DIRENT. - * configure, config.in: Rebuild. - * emultempl/sunos.em: Use autoconf recommend mechanism to define - DIR and struct dirent. - - * configure.tgt (mips*-*-bsd*): New case. - - * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*) - New case. - * configure.tgt (i[345]86-*-ptx*): New case. - -Thu Sep 7 10:48:26 1995 Ian Lance Taylor <ian@cygnus.com> - - * config.in: Rename from config.h.in. - * 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. - - * Makefile.in (distclean): Remove config.h and stamp-h. - - * configure.host (sparc-*-sunos64*): Remove. - * ldlang.c (lang_map): Check BFD64, not HOST_64_BIT. - - * ldexp.c (exp_fold_tree): Don't warn about moving the location - counter backward in the absolute section. - -Wed Sep 6 14:42:11 1995 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Rewrite to use autoconf. - * 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. - -Tue Sep 5 14:55:24 1995 Ken Raeburn <raeburn@cygnus.com> - - * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and - ns32k-pc532-lites* like ns32k-pc532-netbsd*. From Ian Dall. - -Fri Sep 1 22:29:52 1995 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/pe.sc: Fix typo in spelling of .ctors/.dtors. - -Fri Sep 1 13:13:29 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (warning_callback): Add abfd, section, and address - 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. - -Fri Sep 1 08:35:16 1995 James G. Smith <jsmith@beauty.cygnus.com> - - * configure.in: Added mips*vr4300-idt-elf* and - mips*vr4300el-idt-elf* targets. - * Makefile.in: Added eelf32vr4300* targets. - * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added. - * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added. - -Fri Sep 1 10:51:45 1995 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe - <brendan@cygnus.com>. - -Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com> - - * 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. - -Thu Aug 31 17:01:37 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_memory_region_lookup): Don't use the first region - as the default region. Create a new region instead. - -Tue Aug 29 14:21:41 1995 steve chamberlain <sac@slash.cygnus.com> - - * ldemul.c (ldemul_set_symbols): New function. - * ldemul.h (ld_emulation_xfer_struct): Add set_symbols. - * ldmain.c (main): Add call to ldemul_set_symbols. - * lexsup.c (set_pe_value): New args. - (set_pe_name): New. - (parse_args): Cope with new set_pe_value args. - * emultempl/pe.em (set_symbols): New function. - (ld_emulation_xfer_struct): Add set_symbols. - * scripttempl/pe.sc: Use new symbols. - -Thu Aug 24 18:12:18 1995 Ian Lance Taylor (ian@cygnus.com) - - * lexsup.c (parse_args): Don't call set_default_dirlist for -O. - For -Y, ignore a leading `P,', and only call set_default_dirlist - after processing all the other arguments. - -Tue Aug 22 07:36:58 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttempl/pe.sc: Keep .edata, don't base stabs at 0. - * emulparams/armpe.sh: Run PE script. - -Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com> - - * ldmain.c (main): Remove PE stuff. - * lexsup.c (options): Load more PE options. - (set_pe_value): New function. - -Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com> - - - * 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. - -Thu Aug 17 14:46:34 1995 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/h8500s.sc (.rdata): All data must go in data segment. - (.strings,.ctors,.dtors): Likewise. - -Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttempl/armpe.sc: Always start code at 0x401000, even - if -r. - * ldwrite.c (strdup): New extern declaration. - * ldgram.y (atype): New rule to clarify type parsing. - * ldlang.c (init_os): Remove commented out code. - (lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits - unless told not to by the link script. - -Wed Aug 16 11:45:11 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_set_startof): New static function. - (lang_process): Call it. - - * ldgram.y: Tweak casesymlist to avoid bison errors. - - * lexsup.c (parse_args): Accept -h as a synonym for --soname, for - Solaris compatibility. - -Tue Aug 15 17:31:16 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldgram.y (YYDEBUG): If not defined, define as 1. - (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. - -Tue Aug 8 19:14:58 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc - instead of alloca. - -Tue Aug 8 15:24:05 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use - $r/../gcc/xgcc unless it is present. - -Thu Aug 3 11:56:22 1995 Ian Lance Taylor <ian@cygnus.com> - - * scripttempl/m68kcoff.sc: Only put .ctors and .dtors in .text - when CONSTRUCTING. - * scripttempl/m68klynx.sc: Likewise. - * scripttempl/nw.sc: Likewise. - * scripttempl/sa29200.sc: Likewise. - * scripttempl/sparclynx.sc: Likewise. - -Fri Jul 28 12:02:23 1995 steve chamberlain <sac@slash.cygnus.com> - - * emulparams/{z8001.sh, z8002.sh}: Fix typo. - -Thu Jul 27 21:06:21 1995 Ken Raeburn <raeburn@cygnus.com> - - * configure.in (i[345]86-*-linuxoldld): Treat like linuxaout*. - -Thu Jul 27 15:26:28 1995 steve chamberlain <sac@slash.cygnus.com> - - * scripttempl/i386pe.sc: Cope with constructors. - * scripttempl/z8ksim.sc: Deleted. - * scripttempl/z8000.sc: Resurrected as this, but - can handle z8001 and z8002 formats. - * emulparams/z8ksim.sh: Deleted. - * emulparams/{z8001.sh, z8002.sh}: New files. - * config/z8ksim.mt: Deleted - * config/z8k-coff.mt: New, generates both emulations. - -Tue Jul 25 14:53:02 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmisc.c (vfinfo): In %C and %D case, always print the BFD using - %B, in case it is in an archive. - -Mon Jul 24 15:23:39 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_process): Call reset_memory_regions for each - relaxation pass. - -Fri Jul 21 22:49:44 1995 Michael Meissner <meissner@cygnus.com> - - * scripttempl/elfppc.sc: Add support for .sdata, .sbss, and - _SDA_BASE. - -Thu Jul 20 16:26:55 1995 Ken Raeburn <raeburn@cygnus.com> - - * ldmain.c (constructor_callback): Allocate set_name in stack - frame, rather than always calling alloca with a fixed size. - -Wed Jul 19 16:21:43 1995 Doug Evans <dje@canuck.cygnus.com> - - * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little. - (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define. - -Mon Jul 17 13:57:00 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldwrite.c (clone_section): Set the alignment of the clone - section to that of the section being cloned. - - * ldwrite.c (split_sections): Don't split the first input section - into a new output section. - -Sat Jul 15 00:26:35 1995 Michael Meissner <meissner@cygnus.com> - - * emulparams/elf32ppc.sh (TEMPLATE_NAME): Define as elf32. - (GENERATE_SHLIB_SCRIPT): Define as yes. - -Fri Jul 14 12:11:46 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/mipsecoff.em (check_sections): Use %P, not %F. - - * ldver.c (help): Update list of options to match currently - supported list. - -Thu Jul 13 13:52:10 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/lnk960.em (ld_lnk960_emulation): Initialize - after_open field. - - * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type; - it takes a size_t anyhow. - (exp_binop): Likewise. - (exp_trinop): Likewise. - (exp_unop): Likewise. - (exp_nameop): Likewise. - (exp_assop): Likewise. - * ldlang.c (lang_memory_region_lookup): Likewise. - (init_os): Likewise. - (ldlang_add_undef): Likewise. - (insert_pad): Likewise. - * ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to - bfd_size_type. - - * Makefile.in (ALL_EMULATIONS): It's earmaoutb.o, not earmoutb.o. - -Wed Jul 12 11:32:22 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to - declaration. - (ld_emulation_xfer_type): Add search parameter to - open_dynamic_archive entry point. - * ldemul.c (ldemul_open_dynamic_archive): Add search parameter. - * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and - make non-static. Change all callers to use new name. - (ldfile_open_file_search): Make static. If entry is dynamic, call - ldemul_open_dynamic_archive. - (ldfile_open_file): Don't call ldemul_open_dynamic_archive. - * ldfile.h (ldfile_open_file_search): Don't declare. - (ldfile_try_open_bfd): Declare. - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - Accept search parameter. Don't search for a library, just look in - a single place. - * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive): - Likewise. - -Tue Jul 11 16:44:21 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (set_scripts_dir): Don't base script directory on - current directory. - -Tue Jul 11 12:29:02 1995 Rick Sladkey <jrs@world.std.com> - - * ldmisc.c (vfinfo): Don't print the line number if it isn't - meaningful. - -Mon Jul 10 13:38:28 1995 Ian Lance Taylor <ian@cygnus.com> - - * ld.h (ld_config_type): Add field warn_constructors. - * ldmain.c (add_to_set): Warn if config.warn_constructors. - (constructor_callback): Likewise. - * lexsup.c (parse_args): Handle -warn-constructors. - * ld.texinfo, ld.1: Document -warn-constructors. - - * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't - get confused by directory names if we searched for the file. - - Based on patches from H.J. Lu <hjl@nynexst.com>: - * ldlang.h (lang_input_statement_type): Add new field dynamic. - * ldlang.c (new_afile): Set dynamic from config.dynamic_link. - * ldfile.c: Include bfdlink.h. - (ldfile_open_file): Check dynamic field of entry, not global - dynamic_link field. Don't do a dynamic search when doing a - relocateable link. - * ldmain.c (main): Don't warn about dynamic_link for a - relocateable link. - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if - dynamic is false. - (gld${EMULATION_NAME}_create_output_section_statements): Always - loop over input files. - * Makefile.in: Rebuild dependencies. - - * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and - -shared. - -Mon Jul 10 13:29:43 1995 Eric Youngdale <eric@aib.com> - - * ldmain.c (main): Set link_info.symbolic to false. - * lexsup.c (parse_args): Handle -Bsymbolic. - -Wed Jul 5 00:12:11 1995 Fred Fish (fnf@cygnus.com) - - * ldmain.c (HAVE_SBRK): Define for everything except - specific systems that are known to not support sbrk. - (main): Use HAVE_SBRK to decide whether or not to use sbrk. - -Tue Jul 4 12:55:48 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): - Handle etree_provide. - - * emultempl/elf32.em (global_needed): New static variable. - (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. - -Mon Jul 3 14:26:37 1995 Steve Chamberlain <sac@slash.cygnus.com> - - * configure.in (i386-*-win32): New target. - -Mon Jul 3 14:39:22 1995 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Let -G either set the small data size or - be equivalent to --shared, depending on the next argument. Accept - and ignore -z for Solaris compatibility. - -Sun Jul 2 17:52:34 1995 Ian Lance Taylor <ian@cygnus.com> - - * lexsup.c (parse_args): Cast fopen result to PTR before storing - it in link_info.base_file. Fix indentation. - -Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com> - - * 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. - -Thu Jun 22 19:55:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu> - - * configure.in (i386-*-msdos*, i386-*-moss*): New targets. - * Makefile.in (ALL_EMULATIONS): Added i386msdos.o. - (i386msdos.o): New target. - * config/i386-msdos.mt: Created. - * emulparams/i386msdos.sh: Created. - * scripttempl/i386msdos.sc: Created. - -Thu Jun 22 15:06:35 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * scripttempl/elfppc.sc (.fixup): Add support for a .fixup section - that contains pointers to be relocated. - -Tue Jun 20 17:47:20 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw-esh.c: New file, modified for MPW from esh.c. - * scripttempl/sh.sc: Reformatted to simplify MPWification, - use *() to concat stab sections instead of []. - -Thu Jun 15 08:48:16 1995 Steve Chamberlain <sac@slash.cygnus.com> - - * scripttempl/armpe.sc: Add constructor support. - -Tue Jun 13 09:11:20 1995 Steve Chamberlain <sac@slash.cygnus.com> - - * ldlang.c (lang_size_sections): Any section with a DATA - statement has contents. - -Sun Jun 11 15:20:46 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * emulparams/m68kelf.sh (NOP): Define. - (DYNAMIC_LINK): Don't define. - (TEXT_START_ADDR): Set to 0x80000000; the extra 0x100 for headers - will come from the linker script. - -Thu Jun 8 14:17:33 1995 Steve Chamberlain <sac@slash.cygnus.com> - - * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack. - -Mon Jun 5 02:16:24 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> - - * configure.in (i[345]86-*-gnu*): Use GNU elf config. - -Thu May 25 11:49:28 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - From Andrew Cagney <cagney@highland.com.au> - * Makefile.in: Fixup more gotchas from renaming elf32ppcle to - elf32lppc. - -Wed May 24 11:23:21 1995 Steve Chamberlain <sac@slash.cygnus.com> - - Add support for ARM-PE. - * Makefile.in (ALL_EMULATIONS): Add armpe.o - * configure.in: Recognize armpe. - * config/arm-pe.mt: New file. - * emulparams/armpe.sh: New file. - * scripttempl/armpe.sc: New file. - - -Mon May 22 15:19:26 1995 Doug Evans <dje@chestnut.cygnus.com> - - * configure.in (h8300h-*-hms): Deleted - * config/cf-h8300h.mt: Deleted. - -Thu May 18 04:26:10 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> - - Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk) - - From David Taylor (dtaylor@armltd.co.uk) - * Makefile.in (ALL_EMULATIONS): Add earmout[lb].o - * configure.in: Recognize arm{,e[lb]-*-aout. - * config/arm[lb]-aout.mt: New files. - * emulparams/armaout[lb].sh: New files. - * scripttempl/armaout.sc: New file. - -Tue May 16 18:27:11 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * config/ppcle-elf32.mt (EMUL): Use elf32lppc, not elf32ppcle, to - be unique in 8 characters for DOS. - - * emulparams/elf32lppc.sh: New file, renamed from elf32ppcle.sh. - * emulparams/elf32ppcle.sh: Deleted. - -Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com> - 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 - -Wed May 10 18:37:59 1995 Stu Grossman (grossman@andros.cygnus.com) - - * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text - segment. This allows ld -r to preserve unwind sections. - -Tue May 9 17:19:57 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * configure.in: Add little endian PowerPC support. - - * Makefile.in (ALL_EMULATIONS): Add eelf32ppcle.o. - (eelf32ppcle.c): Support for little endian PowerPC. - - * config/ppcle-elf32.mt: New file for little endian PowerPC. - * emulparams/elf32ppcle.sh: Ditto. - -Wed May 3 12:56:32 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * ldlang.c (print_output_section_statement): Check - subsection_alignment, instead of checking section_alignment twice. - Noticed by Alan Modra <alan@spri.levels.unisa.edu.au>. - -Tue May 2 16:36:07 1995 Jeff Law (law@snake.cs.utah.edu) - - * configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*. - -Mon Apr 24 19:21:02 1995 Michael Meissner <meissner@cygnus.com> - - * ldwrite.c (ldwrite): Before doing anything, reset the error - code. If bfd_final_link returns an error, but the error code is - unset, don't issue an extra message. Assume a correct error - message was already set. - -Fri Apr 14 16:31:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * Makefile.in (ALL_EMULATIONS): Added em68kelf.o. - (em68kelf.o): New target. - * config/m68k-elf.mt, emulparams/m68kelf.sh: New files. - * configure.in: Use them for m68*-*-elf. - -Tue Apr 11 12:02:03 1995 Stan Shebs <shebs@andros.cygnus.com> - - Merge in support for Mac MPW as a host. - (Old change descriptions retained for informational value.) - - * mpw-config.in (i386-unknown-aout): Change to i386-unknown-go32. - (i386-unknown-coff): Remove. - (sh-hitachi-hms): New target. - (emulation_ofiles): Set correctly for each target. - (version, TDEFINES): Add to makefile fragment. - * mpw-make.in (BISON): Use byacc instead of bison. - (em_*.c): Replace with e*.c everywhere. - (ldgram.h): Separate action from ldgram.c generation. - (LD_PROG): Depend on Version.r. - (Version.r): generate from version info. - * mpw-emipsidt.c: New file, modified for MPW from emipsidt.c. - - * mpw-config.in (m68k-apple-macos, ppc-apple-macos, - i386-unknown-aout, i386-unknown-coff): New targets. - (m68k-aout, m68k-coff): Remove targets. - (mk.tmp): Add definition of EMUL. - - * mpw-config.in (emulname): Set based on target. - (ldemul-list.h): Construct. - * mpw-make.in (install-only): New target. - (install): Depend on install-only. - - * mpw-make.in (bindir): Fix pathname. - (install): Move here from mpw-build.in. - - * mpw-config.in: New file, MPW configuration 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. - -Tue Apr 4 17:55:18 1995 Steve Chamberlain <sac@bang.hack.com> - - * ldwrite.c (clone_section): Align clone sections on even - boundaries. - -Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com) - - * configure.in: Change linux to default to elf. Using - i[345]86-*-linuxaout will build a linker which defaults to a.out. - * config/i386-laout.mt: Rename from old config/i386-linux.mt. - * config/i386-linux.mt: Rename from old config/i386-lelf.mt. - * config/i386-lelf.mt: Remove. - -Thu Mar 30 13:09:46 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): If opening the map file fails, call - bfd_set_error before calling einfo. - - * ld.texinfo, ld.1: Document the -no-keep-memory option. - -Mon Mar 27 11:10:08 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Revert patch of March 10, since the SVR4 linker - does mark shared libraries as executable. - -Tue Mar 21 15:15:38 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_common): Change power to int. Pass larger values - before smaller values. - (lang_one_common): Treat info as int *. Don't bother to check for - last value, since it is now zero. - -Sat Mar 18 01:49:14 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (load_symbols): An empty archive is OK. - -Fri Mar 17 16:15:31 1995 Stan Shebs <shebs@andros.cygnus.com> - - * ldmain.c (progress.h): Include. - (main): Call START_PROGRESS and END_PROGRESS. - -Thu Mar 16 17:17:33 1995 Michael Meissner <meissner@cygnus.com> - - * scripttempl/elfppc.sc: Move _GOT2_END_ after the .ctors and - .dtors sections, so that these pointers get relocated also. - Define the symbols __{C,D}TOR_{LIST,END}__ to mark the beginning - and end of the constructors/destructors. - -Thu Mar 16 13:59:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> - - * ldlang.c (load_symbols): If whole_archive is true and ENTRY - describes an archive, call bfd_link_add_symbols on each member. - * ldmain.c (whole_archive): New variable. - (main): Initialize it to false. - * ldmain.h: Declare whole_archive. - * lexsup.c (parse_args): Grok --whole-archive switch. - * ld.texinfo, ld.1: Document --whole-archive. - -Thu Mar 16 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com> - - * genscripts.sh (EMULATION_NAME): Set LIB_PATH to empty when not - using the default emulation. - - * config/dgux.mh (HOSTING_EMU): Use -m rather than trying to set - LDEMULATION. - * config/hppaelf.mh (HOSTING_EMU): Likewise. - -Tue Mar 14 12:28:03 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Set force_maj - for -lc.N. From H.J. Lu <hjl@nynexst.com>. - -Fri Mar 10 14:43:48 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): Don't set EXEC_P if link_info.shared is set. - - * ldlex.l: Return -lFILENAME as the token LNAME. - * ldgram.y: Add token LNAME. - (input_list): Treat LNAME like NAME, but pass it to - lang_add_input_file as lang_input_file_is_l_enum. - * ld.texinfo: Document using -lFILENAME in INPUT. - -Thu Mar 9 12:21:51 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * ldlang.c (lang_check): If the architectures are compatible call - bfd_merge_private_bfd_data to let the backend do additional - checks. - -Tue Mar 7 00:53:08 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.c (ldemul_choose_mode): If emulation not recognized, list - all supported emulations. - -Mon Mar 6 14:03:50 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldemul.c (ldemul_list_emulations): New function. - * ldemul.h (ldemul_list_emulations): Declare. - * ldver.c (help): List supported targets and emulations. - -Fri Mar 3 15:40:36 1995 Doug Evans <dje@canuck.cygnus.com> - - * scripttempl/elf.sc (.debug): Relocate to address 0. - (.debug_srcinfo, .debug_aranges, .debug_pubnames, - .debug_sfnames, .line): Likewise. - -Fri Mar 3 17:07:14 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (hold_rel): New static variable. - (gld${EMULATION_NAME}_place_orphan): Place readonly sections with - contents whose names begin with ".rel" after hold_rel. Remove the - assertion which checked for unplaced .rel sections. Don't try to - sort the section into place if place->bfd_section is NULL. - (gld${EMULATION_NAME}_place_section): Set hold_rel to the first - section beginning with ".rel". - -Thu Mar 2 14:34:43 1995 Ian Lance Taylor <ian@cygnus.com> - - Doc note from pierre@phi.la.tce.com (Pierre Willard): - * ld.texinfo: -X and -x work even if -s or -S are not specified. - * ld.1: Similar change. - -Wed Mar 1 13:51:16 1995 Ian Lance Taylor <ian@cygnus.com> - - * emulparams/gld960coff.sh (COFF_CTORS): Define. - * scripttempl/i960.sc: Use COFF_CTORS if CONSTRUCTING. - -Tue Feb 28 12:42:56 1995 Ian Lance Taylor <ian@cygnus.com> - - * configure.in (i[345]86-*-linuxelf*): New target. Use i386-lelf. - (i[345]86-*-gnuelf*): New target. Use i386-gelf. - * config/i386-lelf.mt: New file. - * config/i386-gelf.mt: New file. - -Tue Feb 28 10:27:54 1995 Rob Savoye <rob@darkstar.cygnus.com> - - * configure.in: Match on mips-ecoff, and default to the IDT - configuration. - -Fri Feb 17 13:06:47 1995 Michael Meissner <meissner@cygnus.com> - - * scripttempl/elfppc.sc: Add support for .got1 and .got2 sections. - Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area - to double the size of the table. - -Thu Feb 9 18:29:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * Makefile.in (distclean): Do recursive deletion, since ldscripts - is a directory. - -Thu Feb 9 11:38:22 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (main): If trace_file_tries is true, and we are using - an internal linker script, print out the script. - * ldfile.c (try_open): Reindent function. Make the messages about - opening script files more informative. - - * lexsup.c (parse_args): For -V, call ldversion with 1, not 0. - * ld.texinfo, ld.1: Update accordingly. - -Wed Feb 8 17:34:45 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldlang.c (lang_one_common): Adjust references to common symbol - information for new structure. - -Mon Feb 6 12:17:24 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldmain.c (undefined_symbol): Handle section being NULL. - - * ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak. - * ldexp.c (fold_name): Likewise. - * ldlang.c (print_one_symbol): Likewise. - (lang_finish): Likewise. - * ldmain.c (multiple_common): Likewise. - * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak - renamed to bfd_link_hash_undefweak. - - * scripttempl/alpha.sc: Set address of .data section correctly - when -n or -N is used. Patch from Chris G Demetriou - <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>. - * scripttempl/mips.sc: Similar change. - -Tue Jan 31 16:20:52 1995 Doug Evans <dje@canuck.cygnus.com> - - * ldlang.c (lang_size_sections): Clarify error message when user - specified start addr conflicts with region. Fix resetting of - region pointer. - -Tue Jan 31 12:37:09 1995 Ian Lance Taylor <ian@cygnus.com> - - * ldexp.c (fold_name): In case NAME, permit an absolute symbol - in lang_allocating_phase_enum. - -Mon Jan 30 11:33:25 1995 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (distclean): Depend upon clean. Don't bother to - remove files which will be removed by clean. From patch by - alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra). - -Fri Jan 27 16:27:34 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): For - a MIPS target, clobber the size of all but the first input - .reginfo section to be 0, so that lang_size_sections sets the - correct size for the output .reginfo section. - -Thu Jan 26 19:53:37 1995 Ian Lance Taylor <ian@cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): - Remove unused variable is. - -Thu Jan 26 12:33:05 1995 Michael Meissner <meissner@tiktok.cygnus.com> - - * configure.in: Add support for powerpc-*-eabi. - - * scripttempl/elfppc.sc: New file for PowerPC embedded ABI - support. - - * emulparams/elf32ppc.sh (SCRIPT_NAME): Use elfppc.sc instead of - elf.sc, which defines some new symbols PowerPC elf needs. - -Tue Jan 24 10:32:15 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldctor.c (ldctor_add_set_entry): Don't dump core if a - constructor entry is in the absolute section. - -Mon Jan 23 13:58:13 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * configure.in (i[345]86-*-gnu*): Set ld_target to i386-gnu. - * config/i386-gnu.mt: New file. Include ELF support. - -Thu Jan 19 16:22:11 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): If - there are any input sections named .gnu.warning, treat them as - containing a warning message to be printed by the linker, and - clobber the size so that the message is not copied into the output - file. - * scripttempl/elf.sc: Put .gnu.warning sections into the .text - section. - -Sun Jan 15 16:45:00 1995 Steve Chamberlain <sac@splat> - - * configure.in (w65-*-*): New target. - * Makefile.in: Update. - * scripttempl/w65.sc: New. - * config/coff-w65.mt: New. - -Thu Jan 12 01:32:25 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com> - - * ldlang.c (lang_place_orphans): Don't ignore files with - just_syms_flag set. Instead, put all their sections in - bfd_abs_section_ptr, using the section VMA as the output_offset. - -Wed Jan 11 22:59:09 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * ldctor.c (ldctor_build_sets): Don't use `const' with typedef - name `reloc_howto_type', since it's now defined to be const. - * ldlang.c (lang_add_reloc): Ditto. - * ldlang.h (lang_reloc_statement_type, lang_add_reloc): Ditto. - -Wed Jan 11 11:24:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldexp.c (fold_binary): Adding or subtracting an absolute value - to a relative value does not require forcing the relative value to - be absolute. Also, reindent function. - -Wed Dec 28 22:05:52 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ldwrite.c (clone_section): Create a symbol with the - same name as the section. - -Mon Dec 19 14:02:13 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ld.h (split_by_reloc, split_by_file): New flags. - * ldwrite.c (clone_section, split_sections): New functions. - * lexsup.c (parse_args): Understand new split options. - -Fri Dec 9 17:22:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * scripttempl/elf.sc: Move .ctors and .dtors from .text segment to - .data segment. They must be writable when creating a shared - library. From H.J. Lu <hjl@nynexst.com>. - -Fri Dec 2 14:09:00 1994 Ian Lance Taylor <ian@rtl.cygnus.com> - - * emultempl/miposecoff.em: New file. - * 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. - - * ld.h (args_type): Add new field embedded_relocs. - * 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. - -Wed Nov 23 22:04:47 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * Makefile.in: Add eshl.o. - * config/coff-sh.mt: Add shl emulation. - -Tue Nov 22 11:55:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * scripttempl/elf.sc: Fill .text section with NOPS. From Eric - Youngdale <eric@aib.com>. - -Thu Nov 17 14:39:48 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - Patches from pirker@eiunix.tuwien.ac.at (Martin Pirker). - * config/i386linux.mh: New file; set HOSTING_CRT0. - * genscripts.sh: Don't put ${libdir} in LIB_PATH if it is - /usr/lib, since that is already in LIB_PATH. - -Wed Nov 16 10:03:03 1994 Jeff Law (law@snake.cs.utah.edu) - - * scripttempl/hppaelf.sc (.text): Handle a use rdefined text start - address. - (.data, .bss): If "-N", then place the data/bss just after the end - of the .text section rather than at the default 0x40000000. - - * scripttempl/hppaelf.sc (.text): Place unwind descriptors in the - text segment. - -Sat Nov 12 15:55:56 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Patches from Eric Youngdale <eric@aib.com>: - * ldlang.c (lang_finish): Don't warn if entry symbol not found - when generating a shared library. - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Warn if - attempting to place an orphaned relocation section when generating - a dynamically linked object. - - * scripttempl/elf.sc: Add ENTRY(${ENTRY}), and default ${ENTRY} to - _start. - -Fri Nov 11 14:27:23 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ld.h (args_type): Add field export_dynamic. - * 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. - -Wed Nov 9 12:47:11 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldlang.c (lang_one_common): Set SEC_ALLOC in any section where - we allocate common symbols. - -Tue Nov 8 17:50:43 1994 Eric Youngdale (eric@aib.com) - - * scripttempl/elf.sc: Add .rel.init, .rela.init, .rel.fini, and - .rela.fini to the list of .rel* sections. - -Tue Nov 8 17:47:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldlang.c (load_symbols): Add new argument place. Only accept - linker scripts if place is not NULL. Put commands found in an - assumed linker script into place. - (lookup_name): Pass NULL as place argument to load_symbols. - (open_input_bfds): In lang_input_statement_enum case, pass a place - argument to load_symbols, and store any new statements after the - current one. - -Mon Nov 7 15:53:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * ldver.c (ldversion): Bump to 2.5.3. - -Fri Nov 4 15:11:26 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * Makefile.in (e*nbsd.c): Fix typo in dependencies. - -Thu Nov 3 19:35:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * Makefile.in (check): Add missing "else true" clause. - - * emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out". - - * scripttempl/go32coff.sc: Changes from DJ Delorie: Change default - entry point to "start". Align at end of each section to 0x200. - Start .text section 0x1000 later. Add _etext, _edata, _end - symbols. - -Wed Nov 2 12:17:49 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldctor.c (ldctor_add_set_entry): Don't permit a set to be - composed of different object file formats. - (ldctor_build_sets): If the output format does not support the - reloc, and we are not generating a relocateable link, try getting - the reloc from the input format. - -Tue Nov 1 10:30:19 1994 J.T. Conklin (jtc@rtl.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o. - (em68knbsd.c): New target. - - * config/m68k-nbsd.mt: New file. - * emulparams/m68knbsd.sh: New file. - * configure.in (m68*-*-netbsd*): Use above configs. - -Mon Oct 31 19:35:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an - appropriately named static library, stop the search at that - directory. - -Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o - and esparcnbsd.o; sorted entries. - (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets. - - * config/netbsd532.mt: Removed. - * emulparams/netbsd532.sh: Removed. - - * config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files. - * emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files. - * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*, - sparc*-*-netbsd*): Use above configs. - -Tue Oct 25 11:47:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldmain.c (multiple_common): One of the types may now be - bfd_link_hash_indirect. The old BFD argument may be NULL. - -Thu Oct 20 22:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in: Add * at the end of m68k-hp-hpux. - -Tue Oct 18 15:58:39 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to - YY_CHAR *. - -Mon Oct 17 14:53:16 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * scripttempl/nw.sc: Gather constructors and destructors and - define __CTOR__LIST__ and __DTOR_LIST__ appropriately. - -Fri Oct 14 14:35:38 1994 J.T. Conklin (jtc@rtl.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Add ei386nw.o and eppcnw.o. - (ei386nw.c, eppcnw.c): New targets. - - * config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh, - scripttempl/nw.sc: New files, for i386 and powerpc netware. - - * configure.in: Changed netware ld_target name to be {i386,ppc}-nw - instead of {i386,ppc}-elf. - - * configure.in (sparc*-*-netware): Removed. There is no such - thing anymore. - - * ldint.texinfo: Move misplaced `@end iftex'. - -Fri Oct 14 12:02:18 1994 Eric Youngdale (eric@aib.com) - - * scripttempl/elf.sc: Add .rel.ctors, .rela.ctors, .rel.dtors, and - .rela.dtors to the list of .rel* sections. - -Thu Oct 13 14:16:27 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * ldver.c (ldversion): Update to version 2.5. - * Version 2.5 released. - - * configure.in (all_targets): Handle i386-linux*. - -Thu Oct 13 11:24:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * scripttempl/aout.sc: Set _etext and __etext to ., not - ${DATA_ALIGNMENT}. This is compatible with SunOS, and, with luck, - will not break any other system. From Eric Valette - <ev@chorus.fr>. - -Wed Oct 12 16:22:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * lexsup.c (parse_args): Change -V to be a synonym for -v. Add - --verbose to get the old -V behaviour. - * ld.1, ld.texinfo: Document this change. - -Tue Sep 27 14:56:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove - assertion, since it could fail with a user defined linker script. - - * ldexp.c (fold_name): For DEFINED case, don't try to look up the - name in the hash table during the first phase--the hash table does - not even exist at that point, much less have the right value. - - * Makefile.in (CC): Define. - (CXX): Move definition, change from g++ to gcc. - (EXPECT, RUNTEST): Copy definitions from top level Makefile.in. - (RUNTEST_CC, RUNTEST_CFLAGS): Remove. - (RUNTEST_CXX, RUNTEST_CXXFLAGS): Remove. - (CC_FOR_TARGET, CXX_FOR_TARGET): Copy from top level Makefile.in. - (.cc.o): Comment out. - (testdir): Remove. - (site.exp): Don't create testdir or set tmpdir. - (check): Run checks even if not running native. Use CC_FOR_TARGET - instead of RUNTEST_CC, and likewise for CXX. - (cdtest targets): Comment out. - * config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once. - * cdtest-bar.cc, cdtest-foo.cc, cdtest-foo.h: Remove. - * cdtest-main.cc, cdtest.exp: Remove. - -Mon Sep 26 11:40:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * emulparams/elf32bmip.sh: Rename from elf32mipb.sh to avoid DOS - file naming problems. - * emulparams/elf32lmip.sh: Rename from elf32mipl.sh. - * Makefile.in (ALL_EMULATIONS): Rename eelf32mipb.o to - eelf32bmip.o and eelf32mipl.o to eelf32lmip.o. - (eelf32bmip.c): Rename from eelf32mipb.c. Use elf32bmip.sh. - (eelf32lmip.c): Rename from eelf32mipl.c. Use elf32lmip.sh. - * config/mipsb-elf32.mt (EMUL): Use elf32bmip, not elf32mipb. - * config/mipsl-elf32.mt (EMUL): Use elf32lmip, not elf32mipl. - - * genscripts.sh: Always search /usr/local/TARGET/lib. - - * scripttempl/elf.sc: If -N is set, force DATA_ADDR to be ".". - -Fri Sep 23 15:05:49 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * configure.in: Handle i386-bsdi* targets like i386-bsd. - -Fri Sep 23 00:06:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * lexsup.c (parse_args): Add support for -a for HP/UX - compatibility. - - * lexsup.c (parse_args): -c takes an argument. - -Tue Sep 20 14:35:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ld.h (args_type): Add new field endian. - * lexsup.c (parse_args): Handle -EB and -EL by setting - command_line.endian. - * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments. - * ldlang.c (lang_add_output_format): Add arguments big and little. - If command_line.endian is set, use it to select big or little - rather than the default. Changed all callers. - * ldlang.h (lang_add_output_format): Update declaration. - * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and - LITTLE_OUTPUT_FORMAT. - * emulparams/elf32mipl.sh: Likewise. - * emulparams/mipsbig.sh: Likewise. - * emulparams/mipsbsd.sh: Likewise. - * emulparams/mipsidt.sh: Likewise. - * emulparams/mipsidtl.sh: Likewise. - * emulparams/mipslit.sh: Likewise. - * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and - LITTLE_OUTPUT_FORMAT if not already defined. Pass them to - OUTPUT_FORMAT. - * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and - LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT. - * scripttempl/mipsbsd.sc: Likewise. - - * Makefile.in (ldgram.h): Make separate target from ldgram.c, - depending upon ldgram.c, so that a parallel make does not try to - build both at once. - - * configure.in (mips*el-elf*): New target. - * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o. - (eelf32mipl.c): New target. - - * config/mipsl-elf32.mt: New file. - * emulparams/elf32mipl.sh: New file. - -Fri Sep 16 12:16:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldmain.c (main): Rather than prohibiting ld -r -s, treat it as - ld -r -S -x. - -Thu Sep 15 13:05:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldmisc.c (vfinfo): Print BFD file name as well as file name - returned by find_nearest_line, in case the file name is something - unhelpful such as a .h file. Handle %u. - -Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ldlang.c (lang_do_assignments): Make sure output statement - has an attached bfd_section before trying to dereference it. - -Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ld.h (ld_config_type): Add new field warn_once. - * ldmain.c (undefined_symbol): Handle -warn-once. - * lexsup.c (parse_args): Recognize -warn-once. - * ld.texinfo (Options): Document -warn-once. - * ld.1: Likewise. - - * ldmisc.c (vfinfo): Handle %D as %C, but never print the function - name. For %C, print the function name on a separate line, to keep - the length of error messages under control. - * ldmain.c (multiple_definition): Use %D for ``first defined - here.'' - (undefined_symbol): Use %D for ``more undefined references - follow''. - - * ldmisc.c (multiple_warn): Remove; no longer used. - * ldmisc.h (multiple_warn): Don't declare. - -Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ldlang.c (print_output_section_statement): Print all lines - to the map file. - -Tue Sep 13 16:30:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldlang.c (load_symbols): Check for archive before object. Use - 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. - -Mon Sep 12 17:04:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * config/m68klynx.mh: New file. - -Mon Sep 12 01:50:03 1994 Jeff Law (law@snake.cs.utah.edu) - - * emultempl/hppaelf.em: Add newlines to the error messages. - -Sat Sep 10 16:05:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * config/i386lynx.mh: New file. - * scripttempl/i386lynx.sc: Don't put .ctors and .dtors in .text - unless CONSTRUCTING. - -Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32. - (GENERATE_SHLIB_SCRIPT): Define as yes. - (DYNAMIC_LINK): Define as false. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): - Initialize config.dynamic_link to DYNAMIC_LINK if it is defined. - (gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end. - * Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than - generic.em. - -Thu Sep 8 16:30:37 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * scripttempl/h8500b.sc: Put rdata stuff into own segment. - -Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Don't define; - .got section is now explicitly handled in elf.sc. - -Wed Sep 7 13:08:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * scripttempl/alpha.sc: Redo script to set . outside of sections - and not bother to explicitly specify section addresses. - Explicitly place .sdata section. - -Tue Sep 6 23:51:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/m68kcoff.sc: Put .bss in data segment. - - * scripttempl/h8300.sc: Change .stab and .stabstr to use a VMA of - 0, and to only be marked as NOLOAD if relocating. - * scripttempl/h8500.sc, scripttempl/h8500b.sc: Likewise. - * scripttempl/h8500c.sc, scripttempl/h8500m.sc: Likewise. - * scripttempl/h8500s.sc, scripttempl/i386coff.sc: Likewise. - * scripttempl/i386go32.sc, scripttempl/i386lynx.sc: Likewise. - * scripttempl/m68kcoff.sc, scripttempl/m68klynx.sc: Likewise. - * scripttempl/sh.sc, scripttempl/sparccoff.sc: Likewise. - * scripttempl/sparclynx.sc: Likewise. - -Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) - - * Makefile.in, configure.in: Add support (disabled) the ARM/RISCiX. - * config/riscix.mt, emulparams/riscix.sh, scripttempl/riscix.sc: - New files. - -Tue Aug 30 11:48:08 1994 Eric Youngdale (ericy@cais.cais.com) - - * ld.h (args_type): Add field soname. - * lexsup.c (parse_args): Handle -soname argument. - * emultempl/elf32.em: In call to bfd_elf32_size_dynamic_sections, - pass soname. - * ld.texinfo: Document -soname. - -Mon Aug 29 15:21:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldlang.c (lang_check): Don't try to set the architecture if the - input and output files are incompatible. Just warn. - -Wed Aug 24 12:52:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * configure.in: Change i[34]86 to i[345]86. - -Sun Aug 21 16:17:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * emulparams/hp3hpux.sh: Define __DYNAMIC to be 0. - -Thu Aug 18 15:37:45 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - Make the ELF linker handle orphaned sections reasonably. Also, - define __start_SECNAME and __stop_SECNAME around sections whose - names can be represented in C, for the benefit of symbol sets in - glibc. - * ldemul.h (ldemul_place_orphan): Declare. - (ld_emulation_xfer_type): Add place_orphan field. - * ldemul.c (ldemul_place_orphan): New function. - * ldlang.h (wild_doit): Declare. - * ldlang.c (wild_doit): Make nonstatic. - (lang_place_orphans): Call ldemul_place_orphan. - * emultempl/elf32.em: Include <ctype.h> and "ldgram.h". - (hold_section, hold_use, hold_text, hold_data, hold_bss): New - static variables. - (gld${EMULATION_NAME}_place_orphan): New static function. - (gld${EMULATION_NAME}_place_section): New static function. - (ld_${EMULATION_NAME}_emulation): Initialize place_orphan field. - -Tue Aug 16 00:17:20 1994 Eric Youngdale (ericy@cais.cais.com) - - * scripttempl/aout.sc: Add .linux-dynamic after .data. - -Tue Aug 16 00:08:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * lexsup.c (parse_args) Treat --dll-verbose as --version, for - Linux compatibility. From hjl@nynexst.com (H.J. Lu). - -Mon Aug 15 17:17:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldexp.h (exp_get_abs_int): Declare. - -Sat Aug 6 01:45:39 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ldlang.c (lang_do_assignments): Handle complex AT's better. - * ldexp.c (exp_get_abs_int): New function. - -Fri Aug 5 20:55:55 1994 Jason Molenda (crash@phydeaux.cygnus.com) - - * configure.in: add i960-nindy-coff support. - -Thu Aug 4 14:45:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldlex.l (yy_create_string_buffer): Handle change to internal - interface in flex 2.4.7. - -Tue Aug 2 11:52:06 1994 Eric Youngdale (ericy@cais.cais.com) - - * emultempl/linux.em (gld${EMULATION_NAME}_find_address_statement): - New function; add 0x20 to any use of -Ttext. - (gld${EMULATION_NAME}_create_output_section_statements): New - function. - (ld_${EMULATION_NAME}_emulation): Use the new function - gld${EMULATION_NAME}_create_output_section_statements. - -Mon Aug 1 15:50:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * scripttempl/mips.sc: Redo script to set . outside of sections - and not bother to explicitly specify section addresses. - -Tue Jul 26 11:02:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * scripttempl/elf.sc: Copy several more relocation sections into - the output. Put .got.plt sections into .got. - -Fri Jul 22 12:15:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end. - - 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. - - * ldlang.c (lang_common): Pass desired alignment to - lang_one_common as power of two. - (lang_one_common): Get common symbol alignment from linker hash - table entry. Treat desired alignment as a power of two. - - * ldlang.c (wild_section): Attach all section with the given name, - not just the first one. If there is no name, attach all sections - even if the SEC_IS_COMMON flag is set. - -Wed Jul 20 15:49:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ld.h (args_type): Add field rpath. - * lexsup.c (S_ISDIR): Define if not already defined. - (parse_args): Add support for -rpath. If -R is used to name a - directory, treat it as -rpath for Solaris compatibility. - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): - Pass command_line.rpath to bfd_elf32_size_dynamic_sections. - * ldmain.c (main): Initialize command_line.rpath to NULL. - * ld.texinfo: Document -rpath option. - -Sun Jul 10 00:33:24 1994 Ian Dall (dall@hfrd.dsto.gov.au) - - * emulparams/pc532machaout.sh: New file. Pc532 mach script - parameters. - - * emulparams/netbsd532.sh: New file. Netbsd 532 script parameters. - - * config/pc532mach.mt: New file. Pc532 mach target support. - - * config/pc532mach.mh: New file. Pc532 mach host support. - - * config/netbsd532.mt: New file. Netbsd 532 target support. - - * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd support. - - * Makefile.in: Add epcmachaout.c dependency and enetbsd532.c - dependency. - -Fri Jul 8 10:57:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use - bfd_abs_section_ptr, not &bfd_abs_section. - - * lexsup.c (parse_args): Changed "retain-symbols-file" from - no_argument to required_argument. From djm. - -Thu Jul 7 12:29:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * scripttempl/elf.sc: Explicitly mention .stab and .stabstr - sections to force a VMA of 0; needed for ELF backends which have - not been converted to the new linker style. - -Mon Jul 4 19:35:45 1994 Jeff Law (law@snake.cs.utah.edu) - - * scripttempl/hppaelf.sc (__stack_zero): Don't define this name, - it was for the HPUX dynamic loader's use and it creates problems - with ELF GDB. - -Fri Jul 1 12:53:47 1994 Jeff Law (law@snake.cs.utah.edu) - - * ldlang.c (lang_do_assignments): No longer static. Delete decl. - * ldlang.h (lang_do_assignments): Put external decl here. - * emultempl/hppaelf.em: Minor cleanups throughout file. - (hppa_elf_create_output_section_statements): Rewrite. - (hppaelf_finish): Rewrite. - -Wed Jun 29 16:50:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib. - - * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not - accept plain -B. - * ld.texinfo: -Bstatic is not ignored. - -Tue Jun 28 12:13:34 1994 Stan Shebs (shebs@andros.cygnus.com) - - * ldlex.l: Recognize \r the same as \n. - -Thu Jun 23 17:53:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - Preliminary support for generating shared libraries, from Eric - Youngdale <ericy@cais.cais.com>. - * genscripts.sh: If the emulation parameter file sets - GENERATE_SHLIB_SCRIPT, generate a .xs script file with - CREATE_SHLIB defined. - * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): If - link_info.shared is set, use the .xs script file. - * scripttempl/elf.sc: If CREATE_SHLIB is set, don't create a - .interp section, and don't include TEXT_START_ADDR in the starting - address of the first section. - * emulparams/elf_i386.sh (GENERATE_SHLIB_SCRIPT): Likewise. - * emulparams/elf32_sparc.sh (GENERATE_SHLIB_SCRIPT): Define. - -Thu Jun 23 12:52:22 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * configure.in: Change --with-targets to --enable-targets. - -Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * lexsup.c (parse_args): Add support for new options -( -) with - synonyms --start-group --end-group. - * ldlang.h (enum statement_enum): Add lang_group_statement_enum. - (lang_group_statement_type): Define new struct. - (lang_statement_union_type): Add group_statement field. - (lang_enter_group, lang_leave_group): Declare. - * ldlang.c (lang_for_each_statement_worker): Handle - lang_group_statement_enum. - (map_input_to_output_sections, print_statement): Likewise. - (lang_size_sections, lang_do_assignments): Likewise. - (open_input_bfds): Completely rewrite. Now does its own looping, - rather than using lang_for_each_statement. Handle groups. - (lang_process): Update call to open_input_bfds. - (print_group): New static function. - (lang_enter_group, lang_leave_group): New static functions. - * ldfile.c (ldfile_open_file): If the file has already been - opened, just return rather than taking an assertion failure. - * ldver.c (help): Mention new options. - * ld.texinfo: Document new options. - - * ldlang.c (end_of_data_section_statement_list): Don't define. - (lang_leave_output_section_statement): Don't set obsolete variable - end_of_data_section_statement_list. - - * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an - ALIGN. - - * ldlang.c (lang_size_sections): Adjust current region address - even for sections with an explicit address. From - ralphc@pyramid.com (Ralph Campbell). - - * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0. - From jrs@world.std.com (Rick Sladkey). - - * scripttempl/mipsbsd.sc: Let sections align to their natural - boundaries. - -Tue Jun 21 11:27:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ldlang.c (lang_init): Use new bfd_abs_section_ptr, not - &bfd_abs_section. - (lang_abs_symbol_at_beginning_of): Likewise. - (lang_abs_symbol_at_end_of): Likewise. - (lang_size_sections): Use bfd_is_abs_section to check for the - absolute section. Don't try to set the VMA or output_offset or - size of the absolute section. - * ldmain.c (notice_ysym): Use bfd_is_und_section to check for the - undefined section. - -Thu Jun 16 22:48:41 1994 Jeff Law (law@snake.cs.utah.edu) - - * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000 - when generating relocatable objects. - -Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com) - - * 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. - -Thu Jun 16 12:22:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * lexsup.c (parse_args): Add -shared to longopts, and handle it. - * ldmain.c (main): Initialize link_info.shared to false. Give - error if link_info.relocateable and link_info.shared are both set. - - * configure.in: If EMUL_EXTRA* is defined in a config file, treat - it as naming an emulation to be added to EMULATION_OFILES. - * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386. - - * Makefile.in: Rebuilt dependencies. - (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o, - eelf64_sparc.o. Remove $(OTHER_EMULATIONS). - (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets. - * config/i386-linux.mt (OTHER_EMULATIONS): Don't define. - (ei386linux.c): Remove; now in Makefile.in. - * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define. - * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define. - * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define. - * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define. - (eelf64_sparc.c): Remove; now in Makefile.in. - * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define. - (eelf32_sparc.c): Remove; now in Makefile.in. - - * ldexp.c (exp_print_tree): Don't crash if etree_rel section has - no owner--it might be bfd_abs_section. From Eric Youngdale - <ericy@cais.cais.com>. - - * scripttempl/aout.sc: Let sections align to their natural - boundaries. - -Wed Jun 15 01:54:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldemul.h (ldemul_open_dynamic_archive): Declare. - (ld_emulation_xfer_type): Add new field open_dynamic_archive. - * ldemul.c: Include ldexp.h and ldlang.h. - (ldemul_open_dynamic_archive): New function. - * ldfile.h (ldfile_open_file_search): Declare. - * ldfile.c: Include ldemul.h. - (try_open_bfd): Rename from cache_bfd_openr. Return boolean - argument, not bfd *. Change all callers. - (ldfile_open_file_search): Rename from open_a. Return boolean - argument, not bfd *. Clean up. Change all callers. - (ldfile_open_file): If doing a dynamic link, call - ldemul_open_dynamic_archive rather than assuming the extension of - a dynamic object is ".so". - * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): - New function. - (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive - field. - * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise. - - * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility. - * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility. - Accept -static as a synonym for -non_shared. - - Let the user change the dynamic linker used by ELF code. - * 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. - - * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not - generic.em. - - * lexsup.c (parse_args): Sort out the option macros and change the - definitions to make it easier to add a new option. - - * scripttempl/aout.sc: Define __etext and __edata to go along with - _etext and _edata. - - * ld.h (ld_config_type): Add new field traditional_format. - * lexsup.c (parse_args): Add traditional-format to longopts, and - handle it. - * ldmain.c (main): Initialize config.traditional_format to false. - * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD - flags of output_bfd according to config.traditional_format. - * ldver.c (help): Mention -traditional-format. - * ld.texinfo: Document -traditional-format. - -Tue Jun 14 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldctor.c (ldctor_add_entry): Add entries to a set in the order - they are encountered. - -Tue Jun 14 18:05:09 1994 Eric Youngdale (ericy@cais.cais.com) - - * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000. - (NONPAGED_TEXT_START_ADDR): Define as 0x20. - -Mon Jun 13 15:46:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of - _FTEXT, _ETEXT and _FDATA. Dont define _END. - - * ldfile.c (open_a): If this is not an archive, try to open it in - the current directory before searching for it. - - * lexsup.c (parse_args): Treat -i as a synonym for -r. - - * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that - BLOCK works in a section address as documented. - - * ldgram.y (YYDEBUG): Don't define. - -Fri Jun 10 16:45:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * emultempl/gld960.em: Pass false for new argument to - ldfile_add_library_path. - * emultempl/gld960c.em, emultempl/lnk960.em: Likewise. - - * emultempl/sunos.em: Only look for .so files if doing a dynamic - link. - -Thu Jun 9 08:35:17 1994 Ian Lance Taylor (ian@cygnus.com) - - * scripttempl/i960.sc: Add CONSTRUCTORS to .data. - -Thu Jun 9 06:52:29 1994 Bill Cox (bill@rtl.cygnus.com) - - * Makefile.in (check): Delete ld.new dependency so that a regression - test doesn't trigger a rebuild of the linker. - -Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (map_input_to_output_sections): For lang_address, call - init_os if it hasn't already been called. - -Thu Jun 2 17:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Add support for SunOS shared libraries. - * 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. - * emulparams/sun3.sh (TEMPLATE_NAME): Likewise. - * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em. - (esun3.c): Likewise. - - * ldlang.c: Minor formatting cleanups. - (lang_for_each_input_file): New function. - * ldlang.h (lang_for_each_input_file): Declare. - - * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline - 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. - -Wed Jun 1 14:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.h (lang_input_statement_type): Remove fields subfiles, - total_size, superfile and chain. - * ldfile.c (open_a): Don't clear search_dirs_flag. - (ldfile_open_file): Don't try to open superfile. Assert that file - has not already been opened. - * ldlang.c (new_afile): Don't initialize superfile. - * ldmain.c (add_archive_element): Don't initialize subfiles or - chain or superfile. Initialize search_dirs_flag to false. - -Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * ldver.c (ldversion): Changed version to "cygnus-2.4.1". - - Changes from binutils-2.4 release: - - * genscripts.sh (RELOCATING, CONSTRUCTING): When setting - variables, use whitespace, so scripts don't break. - - * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted. - - * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}. - - * cdtest-bar.cc: Renamed from cdtest-func.cc. - * Makefile.in: Noted change. - - * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I - don't know where that's supposed to come from, or why it's - necessary. - - Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com) - - * configure.bat: update to latest makefile.in - * emulpara/go32.sh: set to coff-go32 not aout - * emultemp/generic.em: strength-reduce the structure of - this shell script, since the only available shell for - DOS can't handle complex syntax. - * emultemp/stringify.sed: for "sed -f" instead of inline. - * makefile.in: depend on stringify.sed as well as genscripts.sh - * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format - * genscripts.sh: empty variables aren't always considered "set", - so set them to "y" instead. - -Fri May 27 01:08:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (entry_symbol): Make static. - (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. - -Tue May 24 16:13:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give - .reginfo an address. - (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address. - (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss. - * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script. - -Thu May 19 13:31:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Add support for ELF shared libraries. - * 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. - -Wed May 18 10:15:39 1994 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): Redirect output of ln to /dev/null. - -Mon May 16 13:35:08 1994 Jeff Law (law@snake.cs.utah.edu) - - * emultempl/hppaelf.em: Change all references of - .hppa_linker_stubs to .PARISC.stubs. - * scripttempl/hppaelf.sc: Likewise. - -Fri May 13 13:00:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (print_output_section_statement): Change ``no attached - output section'' message slightly. - (lang_do_assignments): Don't recurse down if there is no real - section. - - * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to - match corresponding change in emulation templates. - * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise. - * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise. - -Wed May 11 18:16:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * ldver.c (ldversion): Updated version number. - - * cdtest-foo.cc: Use explicit "#pragma implementation". - * cdtest-bar.cc: Renamed from cdtest-func.cc. - * Makefile.in: References to cdtest-func.o changed to - cdtest-bar.o. - -Wed May 11 16:24:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Don't create unnecessary output sections. - * ldlang.c (out_bfd_get_section_by_name): Remove. - (wild_section): Call bfd_get_section_by_name rather than - our_bfd_get_section_by_name. Don't call wild_doit if there is no - section. - (lang_create_output_section_statements): Remove. - (map_input_to_output_sections): For several cases, call init_os if - it has not already been called. - (lang_size_sections): If output section was not created, skip it. - (lang_process): Don't call lan_create_output_section_statements. - (lang_place_orphans): Skip files with just_syms_flags set to true. - * ld.texinfo: Document change. - -Tue May 10 14:31:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (wild_doit): Don't bother initializing the vma and - section size. Don't special case SEC_SHARED_LIBRARY. - (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections - specially. - -Fri May 6 12:24:27 1994 Steve Chamberlain (sac@cygnus.com) - - * config/go32.mh : New file for Xgo32X. - -Fri May 6 15:15:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call - before calling einfo, since we are reporting an fopen failure. - From jrs@world.std.com (Rick Sladkey). - - * configure.in: Use "e" rather than "em_" as prefix for - emulations. - -Fri May 6 01:08:14 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * emultempl/generic.em: Use "e" rather than "em_" as prefix for - filename. - * 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. - - * config/mipsl-idt.mt: Renamed from mips-idtl.mt. - * configure.in: Adjusted. - -Thu May 5 15:07:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * Makefile.in (install-info): Don't use "$<*", it doesn't always - work. Instead, check build dir and $srcdir explicitly, and use - `echo' to get all the filenames. - - * configure.in (h8300h-*-hms): Changed ld_target name to - cf-h8300h. - * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it - unique in 8.3. - - * config/i960coff.mt: New file. - * emulparams/gld960coff.sh: New file. - * emultempl/gld960c.em: New file. - * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use - i960coff configuration. - * Makefile.in (em_gld960coff.c): Added dependencies, build rule. - - * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the - code isn't included in FSF releases, and it can still be - explicitly selected. - (distclean): Remove site.bak and tmpdir. - (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES). - (mostlyclean): Delete them explicitly here. Also remove tmpdir. - - Patches from Ralph Campbell: - * config/mipsbsd.mh: New file. - * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc. - * scripttempl/mipsbsd.sc: Don't define __DYNAMIC. - * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out' - instead of `aout'. - - * configure.in (i386-*-gnu*): Treat like i386-*-mach*. - -Wed May 4 11:59:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * config/m68k.mt (EMUL): Set to m68kaout. - * emulparams/m68kaout.sh: New file. - * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o. - (em_m68kaout.c): New target. - - * ldlang.c (lang_size_sections): If dot moves because of an - assignment, don't try to insert a pad into the absolute output - section, just change the address of the default memory region - instead. - - * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur, - cdtest-ur.out, and cdtest-ur.tmp. - -Wed Apr 27 16:03:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/sa29200.sc: Align all sections to four byte - boundaries. - -Wed Apr 27 10:48:03 1994 Steve Chamberlain (sac@cygnus.com) - - * Makefile.in, configure.in: Support for go32 coff. - * config/i386-go32.mt: New file - * emulparams/i386go32.sh: New file - * scripttempl/i386go32.sc: New file - -Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com) - - * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use - Lynx-specific script templates. - * configure.in (sparclite*-*-coff): Use coff-sparc. - * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx. - * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx. - (ENTRY): Set to __main. - * scripttempl/i386lynx.sc: New file, script for I386 Lynx. - * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections. - * scripttempl/sparclynx.sc: New file, script for uSparc Lynx. - -Tue Apr 26 12:41:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16 - byte boundary, in case the global constructors do not take up an - even 16 bytes. - - * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not - exist, get crtbegin based on gcc -print-libgcc-file-name. - (HOSTING_LIBS): Similar change for ../gcc/crtend.o. - -Mon Apr 25 15:27:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (lang_size_sections): When no address is given for a - section, align it according to its requirements. - -Thu Apr 21 17:24:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in (clean, distclean): Remove configdoc.texi. - -Tue Apr 19 12:12:15 1994 Bill Cox (bill@rtl.cygnus.com) - - * configure.in: Add i[34]86-*-bsd386 to the patterns recognized. - -Fri Apr 15 14:35:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (lang_size_sections): When relaxing, adjust the - position of a padding statement, and adjust dot accordingly. - -Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com) - - * Makefile.in (EXPECT, RUNTEST): Set these for the check goal. - -Mon Apr 11 12:32:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/i386coff.sc: If relocating, don't put .init and - .fini sections into .text; keep them separate. - * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not - exist, get crtbegin based on gcc -print-libgcc-file-name. - (HOSTING_LIBS): Similar change for ../gcc/crtend.o. - -Mon Apr 11 10:31:00 1994 Bill Cox (bill@rtl.cygnus.com) - - * Makefile.in (check): Set TCL_LIBRARY for runtest. - -Wed Apr 6 00:09:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the - manufacturer. - - * emultempl/hppaelf.em (hppaelf_finish): Only resize sections - if building a final executable. - -Tue Apr 5 12:17:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (main): Check the return value of bfd_close. - -Thu Mar 31 18:07:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/alpha.sc: Clean up section alignment to ensure that - sections never overlap when using -r. - -Wed Mar 30 15:51:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD - changes: get_symtab_upper_bound renamed and returns long, - bfd_canonicalize_symtab returns long, check for error indications. - -Fri Mar 25 17:20:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (print_input_section): For section size, use - _cooked_size if it is non-zero, size otherwise. - (size_input_section): Likewise. - (lang_do_assignments): Likewise (case lang_input_section_enum). - -Thu Mar 24 15:20:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (new_afile): Add new argument add_to_list. Don't set - real to true for lang_input_file_is_marker_enum. Clear the_bfd. - (lang_add_input_file): Pass true to new_afile for add_to_list. - (lookup_name): Remove force_load argument. Changed all callers. - Pass false to new_afile for add_to_list. Split loading of symbols - out into separate function. - (load_symbols): New function split out of lookup_name. Don't load - the symbols if they are already loaded. - (open_input_bfds): For lang_input_statement_enum call load_symbols - rather than lookup_name. - (lang_process): Pass abs_output_section rather than NULL to - lang_size_sections. - (lang_startup): Set real field of first_file to true. - -Wed Mar 23 14:15:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (had_relax): Removed. - (relax_again): New static variable. - (lang_size_sections): Change call to bfd_relax_section to - correspond to BFD changes. Set relax_again appropriately. - (lang_process): Remove #if 0 code. When relaxing, keep calling - lang_do_assignments and lang_size_sections until relax_again - becomes false. - - * emultemp/gld960.em: Include libiberty.h - (gld960_before_parse): Pass NULL as final argument to concat. - -Tue Mar 22 13:08:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/aout.sc: Force _end and __end to be aligned to a - four byte boundary. - - * ldwrite.c (build_link_order): Handle lang_data_statement_enum by - building a bfd_data_link_order, rather than by setting the section - contents immediately. - -Mon Mar 21 18:28:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Changes to make -Ur work again. - * ldmain.c (add_to_set): Now takes reloc argument rather than - bitsize. Check config.build_constructors here. If an new hash - table entry is created, mark it as undefined. - (constructor_callback): No longer takes bitsize argument. Pass - BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the - BFD backend supports it. - (reloc_overflow): Handle a NULL abfd argument. - (reloc_dangerous, unattached_reloc): Likewise. - * ldctor.c: Include ldmain.h. - (struct set_info): Change bitsize field to reloc. - (ldctor_add_set_entry): Now takes reloc argument rather than - bitsize. Don't bother to check config.build_constructors here. - (ldctor_build_sets): Get the size from the reloc howto. If - generating relocateable output, call lang_add_reloc rather than - lang_add_data. - * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc - instead of bitsize. - * ldlang.h (statement_enum): Add lang_reloc_statement_enum. - (lang_reloc_statement_type): New structure. - (lang_statement_union_type): Add reloc_statement field. - (lang_add_reloc): Declare new function. - * ldlang.c (lang_for_each_statement_worker): Handle - lang_reloc_statement_enum. - (map_input_to_output_sections, print_statement): Likewise. - (lang_size_sections, lang_do_assignments): Likewise. - (print_reloc_statement): New function. - (lang_add_reloc): New function. - * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum. - - * Makefile.in (cdtest.out, cdtest-ur.o): New targets. - (cdtest-ur, cdtest-ur.out): New targets. - (check-cdtest): Now also check that -Ur works correctly. - - * scripttemp/alpha.sc: Align all sections to 16 byte boundaries. - -Thu Mar 17 12:45:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (lang_process): Move lang_common call before - map_input_to_output_sections, to ensure that any alignment - constraints set by common symbols are copied over to the output - sections. - -Fri Mar 11 22:17:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define. - (OTHER_READWRITE_SECTIONS): Rename .toc to .got. - * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em. - * emultempl/ppc.em: Remove ugly stub code; turns out not to be - needed for ELF. - -Tue Mar 8 04:22:27 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * config/i386bsd.mh: New file. - -Mon Mar 7 15:23:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be - defined. - * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext. - (DATA_START_SYMBOLS): Define _fdata. - -Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com) - - * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined. - -Sun Feb 27 16:29:38 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * emultempl/hppaelf.em (hppaelf_finish): Update comments. This - works again. Attach some output symbols to the stub file bfd. - - * emultempl/hppaelf.em: Include elf32-hppa.h. - (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. - -Sat Feb 26 10:58:25 1994 Ian Lance Taylor (ian@cygnus.com) - - * ldmain.c (write_map): Don't define. Removed all references. - Just use map_file or map_filename instead. - (add_archive_element): Use minfo to write map information, not - info_msg. - (constructor_callback): Use fprintf to write map information, not - info_msg. - * ldmain.h (write_map): Don't declare. - * ldgram.y (mri_script_command): Removed reference to write_map. - * ldlang.c (lang_one_common): Likewise. - * lexsup.c (parse_args): Likewise. - -Fri Feb 25 19:12:03 1994 Ian Lance Taylor (ian@cygnus.com) - - * scripttempl/elf.sc: Force all sections to be aligned. - - * ldgram.y (section): Reverse the order of memspec_opt and - fill_opt to avoid an ambiguity when both are used. - * ld.texinfo: Changed accordingly. - - * ldgram.y: Move include of ldlex.h back with other includes. - * 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. - - * ldgram.y (dirlist_ptr): Removed; not used. - * lexsup.c: Include ldver.h. - * Makefile.in: Rebuilt dependencies. - -Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com) - - * ldlang.c (lookup_name): don't call bfd_set_gp_size. - (ldlang_add_file): call it here instead. - -Fri Feb 25 18:13:46 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * ldgram.y: Include ldlex.h after %token decls, for byacc. - -Fri Feb 25 10:47:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * emultempl/hppaelf.em: First attempt to clean this file up. - 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. - - * ldlang.c (lang_size_sections): No longer static (PA ELF calls - 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. - -Thu Feb 24 16:47:33 1994 Ian Lance Taylor (ian@cygnus.com) - - * configure.in (powerpc-*-elf*): New target; use ppc-elf32. - * 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. - -Thu Feb 24 12:27:07 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * lexsup.c (parse_args): Use symbolic numbers for long options. - Fix misunderstanding in -Y and -call_shared et al. - - Use getopt instead of lex and yacc to parse the command line. - - * 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. - -Thu Feb 24 08:43:26 1994 Ken Raeburn (raeburn@rtl.cygnus.com) - - * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't - require that it be in $(srcdir). - -Tue Feb 22 09:21:18 1994 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (lang_size_sections): Only align section to alignment - required by linker script, not to maximum alignment of input - sections. - - * ldlang.h (largest_section): Don't declare. - * ldlang.c (largest_section): Don't define. - (size_input_section): Don't set largest_section; not used. - -Mon Feb 21 15:15:29 1994 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (new_afile): Pass NULL as last argument to concat. - -Thu Feb 17 15:51:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c, ldmain.c: Include libiberty.h. - - * ldmisc.h (concat): Don't declare. - * ldmisc.c (concat): Don't define; just use the one in libiberty. - - * ld.h (as_output_section_statement): Removed; not used. - -Thu Feb 17 09:32:14 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and - bfd_set_error and new error names. - -Tue Feb 15 20:14:53 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * ldwrite.c (build_link_order): If the cooked size of the section - has been set, use it, for determining link_order size. - (ldwrite): In the error message displayed if bfd_final_link fails, - indicate that it was in fact the final link step that failed. - - * ldlang.c (lang_size_sections): Clear bfd_error before calling - bfd_relax_section, in case it returns false but doesn't flag an - error. If an error is returned, indicate which one it is in the - error message. - - * Makefile.in (install-info): Depend on ld.info, and use "$<*" so - it'll get picked up from $(srcdir) if appropriate. - -Tue Feb 15 16:32:04 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set. - * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT. - -Fri Feb 11 17:02:49 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldlex.l (comment): Increment line number when newline is read. - -Fri Feb 11 17:36:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (lookup_name): Take new argument, force_load. If true, - reload the file even if it is already loaded. - (wild): Call lookup_name with force_load argument of 0. - (open_input_bfds): Call lookup_name with force_load argument of 1. - (print_symbol): Remove declaration of non-existent function. - (print_one_symbol): Return true rather than falling off end. - -Thu Feb 10 11:52:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (main): Use %ld when printing long values. - - * scripttempl/elf.sc: Move _edata after the .sdata section. - Permit OTHER_BSS_SYMBOLS to be defined. - * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss. - -Mon Feb 7 16:31:15 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * Rename all "hppaosf" files to "hppaelf". - * Change all "osf" references to "elf" in hppaelf files. - * Makefile.in: Likewise. - * configure.in: Likewise. - -Sun Feb 6 20:31:56 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmain.c (main): Call xatexit, not atexit. - Call xmalloc_set_program_name. - - * ldlang.c (lang_size_sections): Check if bfd_relax_section set - bfd_errno. - -Sat Feb 5 03:54:34 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * emultempl/lnk960.em (append), emultempl/hppaosf.em - (hppaosf_finish): Call xmalloc, not ldmalloc. - * ldmain.c (preserve_output): Function removed. - (main): Do it here instead. - -Fri Feb 4 23:02:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused) - GNU C specific macros. - - * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining - call to LANG_FOR_EACH_INPUT_SECTION. - -Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions - deleted; will use libiberty versions instead. - * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c - mri.c Makefile.in: Change callers. - - * ldmisc.c (vfinfo): Remove cleanup code. - * ldmain.c (remove_output): Put it here (new function). - (preserve_output): New function. - (main): Register remove_output and preserve_output with atexit. - * ldmain.c ldgram.y: Call xexit instead of exit. - * ldmisc.h: Declare xexit. - -Fri Feb 4 15:19:01 1994 Steve Chamberlain (sac@cygnus.com) - - * Makefile.in: Lots of new H8/500 memory models. - -Sun Jan 30 14:33:40 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * ldlex.l: Removed duplicate rules. - (yywrap): Provide default definition, needed with some versions of - flex. - -Fri Jan 28 09:12:56 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print - the archive filename too. - - * ldlex.l: Add rule to catch invalid input characters instead of - printing them. Include "ldmain.h" for program_name decl. - (lex_warn_invalid): New function. - * Makefile.in: Add dependency. - -Fri Jan 28 12:58:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * Makefile.in (check): Don't bother running any tests of - cross-linker until the test suite no longer assumes native mode. - -Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ldlang.c (print_one_symbol, print_input_section): Print - global symbols in symbol table again. - -Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given, - exit successfully instead of complaining if no input files are - given. - -Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com) - - * Makefile.in: Format variable definitions consistently. - (LD_PROG): Remove unnecessary variables from link command, - change variable LOADLIBES to EXTRALIBS. - - * ldmain.c (main): Compute and display total execution time. - * ld.texinfo (-stats): Document the option. - -Mon Jan 24 12:56:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (reloc_overflow): Added name, reloc_name and addend - arguments. - - * ldlang.c (lookup_name): Set BFD GP size to -G argument value - after opening BFD. - - * ldlang.c (relaxing): Removed global variable. - (lang_size_sections): If the canonical symbols have not already - been read in, read them in before relaxing. - * ldlang.h (relaxing): Removed declaration. - -Fri Jan 21 00:44:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (new_afile): Initialize loaded field to false. - (lookup_name): If file was already loaded, don't call the - add_symbols entry point again. - -Wed Jan 19 13:57:00 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ld.texinfo: Clarify what -T option does. - -Tue Jan 18 16:18:15 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's - for a.out. - -Tue Jan 11 13:22:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (add_archive_element): If trace_files or - trace_file_tries, print file name. - * ldlang.c (lookup_name): Likewise. - (ldlang_add_file): Don't put files on input_bfds list in reverse - order. - - * scripttempl/elf.sc: Correct typo. - -Mon Jan 10 19:49:05 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and - their arguments optional, for compatibility with the old GNU ld. - -Fri Jan 7 20:00:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/elf.c: Define __bss_start before the .sbss section. - -Thu Jan 6 00:13:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (add_to_set): Add bitsize argument. - (constructor_callback): New function. - (link_callbacks): Add constructor_callback. - * ldctor.c (struct set_info): Add bitsize field. - (ldctor_add_set_entry): Add bitsize argument. - (ldctor_build_sets): Base the size of the elements of the set on - the bitsize, rather than always using LONG. - * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration. - - * ld.h (QUAD_SIZE): Define. - * 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. - - * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections, - since the Alpha doesn't use them. - -Wed Jan 5 17:42:16 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldemul.h (ld_emulation_xfer_struct): Comment the members. - -Sat Jan 1 13:39:31 1994 Rob Savoye (rob@darkstar.cygnus.com) - - * Makefile.in, configure.in: Add support for VSTa micro-kernel. - * config/vsta.mt, emulparams/vsta.sh: New files for VSTa. - -Sat Jan 1 10:53:35 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating; - needed for i386mach. (Should be a no-op on other systems.) - - * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again. - (PAGE_SIZE): Don't define; not used. - -Fri Dec 31 16:12:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldgram.y (yyerror): Make argument const char *, and actually - print it out rather than assuming it is a syntax error. - * ldmisc.h: Change declaration of yyerror. - * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate. - -Fri Dec 31 11:37:28 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include - exec header offset, since the exec header isn't loaded. - (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c. - -Thu Dec 30 13:01:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - A major rewrite to move the bulk of the linker into BFD so that - 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. - -Thu Dec 16 21:19:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu) - - * ldmain.c (lprefix): Change default from a char to a string - 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. - -Tue Dec 14 17:19:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlex.h: Don't declare yywrap if it is a macro. - * ldlex.l: Include sysdep.h. - * ldlang.c (lang_for_each_statement_worker, - lang_for_each_statement): Forgot to use PARAMS. - -Mon Dec 13 14:30:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in: Added .PHONY targets where appropriate. Added some - comments. Also: - (gcclibdir, version): Removed unused variables. - (DEP): New variable, set to mkdep. - (ALL_CFLAGS): New variable. Used in .c.o target. - (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New - variables. - (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES, - GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed - mostly obsolete variables. Adjusted remaining uses. - (DEF_EMUL): Removed variable. - (ldmain.o): Handle undefined EMUL error correctly. - (ldemul-list.h): Depend on config.status rather than Makefile. - Create via temporary file. - (ver960.c, roll, make): Removed obsolete targets. - (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild - dependencies. - * dep-in.sed: New file, used when rebuilding dependencies. - -Sat Dec 11 14:43:44 1993 Ian Lance Taylor (ian@deneb.cygnus.com) - - Made many changes to eliminate gcc warnings. Made various - cosmetic changes, declared various things in header files, removed - various extern declarations from .c files. No substantive - changes. - - * ldlang.c (lang_process): Ifdef out final call to - lang_size_sections again (reverting change of Nove 2), since it - breaks the Sun4 linker. - -Thu Dec 2 16:31:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in (alpha-*-netware*): New target; use alpha. - -Wed Dec 1 14:04:20 1993 Ken Raeburn (raeburn@cygnus.com) - - * configure.in: Group targets by CPU. Merge some m68k target - entries with different CPU specs that use the same ld_target - values. - - * configure.in: Add sparc*-*-coff. - * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files. - * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o. - (em_coff_sparc.c): Add dependencies and build rules. - - * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare. - -Wed Dec 1 12:19:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval): - New tokens. - (command_line_option): Accept and ignore them (for now). - * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On - where n is a number. - -Mon Nov 22 14:14:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (subfile_wanted_p): If merging a common symbol which is - not in bfd_com_section, create the section in the BFD so that it - can be placed in the right output section. - -Fri Nov 19 14:12:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32. - * emulparams/elf32mipsb.sh (DATA_ADDR): Define. - (OTHER_READONLY_SECTIONS): Define for .reginfo. - (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK. - * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating. - Move OTHER_READONLY_SECTIONS after all the other readonly - sections. Don't use DATA_ADDR twice. - - * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If - p is in a common section, make sure the BFD has a section of that - name. - - * ldlang.c (lang_common): Add newline to error message. - -Thu Nov 11 15:54:41 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a - Lynx-specific script instead of m68kcoff. - (OUTPUT_FORMAT): Define as "coff-m68k-lynx". - (ENTRY): Define as __main. - (TEXT_START_ADDR): Define as 0. - (PAGE_SIZE): Define as 0x1000. - * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment. - * scripttempl/m68klynx.sc: New file. - -Mon Nov 8 12:00:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3 - arguments rather than treating them as emulation names. - -Fri Nov 5 09:02:52 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com) - - * configure.in: Support x86 unixware and netware plus generic netware. - -Fri Nov 5 21:47:55 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): - Correct values (?). - -Wed Nov 3 15:10:15 1993 Ken Raeburn (raeburn@rover.cygnus.com) - - * Makefile.in (distclean): Don't delete dvi or info files. - (ld.info): Update dependency list. - (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi. - -Wed Nov 3 12:07:39 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT. - Set output_filename instead of creating a new node. - (open_output): Don't set output_filename. - (lang_final): Create the new node here. - * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT. - -Tue Nov 2 15:45:51 1993 Jeffrey A. Law (law@snake.cs.utah.edu) - - From Pete Hoogenboom (hoogen@cs.utah.edu): - - * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext, - edata, _edata, end): Add definitions of these symbols. - (__end): Remove definition of this symbol. - (__data_start): Move definition of this symbol. - - * emultempl/hppaosf.em: Various fixes and support for linker stub - 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. - - * ldlang.c (lang_process): Re-enable last call lang_size_sections. - Pass abs_output_section rather than NULL to avoid invalidating - absolute symbols. - -Thu Oct 28 21:16:42 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o. - (em_i386mach.c): New rule. - * configure.in (i[34]86-*-mach*): New case. - * config/i386-mach.mt: New file. - * emulparams/i386mach.sh: New file. - -Fri Oct 29 14:55:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ld.h (flag_is_*): Removed macros. - * ldmain.c (enter_global_ref), ldsym.c (write_file_locals): - Consistently check the BFD symbol flags directly, rather than - using file_is_* macros. - -Thu Oct 28 19:08:42 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * configure.in (sparc*-*-lynxos*): New target. - * Makefile.in: Add rule for em_sparclynx.c. - (ALL_EMULATIONS): Add Lynx emulations. - * config/sparc-lynx.mt: New file. - * emulparams/sparclynx.sh: New file. - * scripttempl/sparccoff.sc: New file. - -Thu Oct 28 13:50:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in: Add dependency for $(EMULATION_OFILES). - -Mon Oct 25 16:09:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * relax.c (write_relax): Check return value of bfd_seclet_link. - -Mon Oct 25 09:31:21 1993 Ken Raeburn (raeburn@cygnus.com) - - * ldlang.c (delete_output_file_on_failure): New variable. - (open_output): Set it after bfd open succeeds. - * ldmisc.c (vfinfo): Test it. - - Changes from Peter Hoogenboom, hoogen@cs.utah.edu: - - * ldsym.c (write_file_locals): Set the BSF_FILE flag for object - symbols. - - * ldemul.c: Support was added to allow emulation-specific - processing to occur. This support was added primarily for linker - stub generation in the elf32-hppa gld. - (ldemul_finish, ldemul_create_output_section_statements): New - functions. - * ldemul.h: Support was added to allow emulation-specific - processing to occur. (As described above.) Added finish and - create_output_section_statements fields to - ld_emulation_xfer_struct structure. - * ldlang.c: Add calls to emulation-specific routines. - (lang_process): Add call to - ldemul_create_output_section_statements function. - (lang_process): Add call to a emulation-specific routine (and - some processing after the call). - -Fri Oct 22 20:54:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) - - * configure.in: mips*- instead of mips-, mips*el changes - -Tue Oct 19 15:46:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in (alpha-*-osf*): New target; use alpha.mt. - * Makefile.in (ALL_EMULATIONS): Added em_alpha.o. - (em_alpha.c): New target; use alpha.sh and alpha.sc. - * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define. - * config/alpha.mt: New file. - * emulparams/alpha.sh: New file. - * scripttempl/alpha.sc: New file. - -Fri Oct 15 02:20:04 1993 Doug Evans (dje@canuck.cygnus.com) - - * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle - types of different sizes (eg: 64 and 32 bits), so coerce. - * ld.h (ALIGN_N): Add warning about usage. - -Wed Oct 13 16:02:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldmain.c (enter_global_ref): Just ignore any weak symbol for - which we already have a definition, rather than checking in - several different places whether the symbol is weak. - -Tue Oct 12 17:30:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in (mips-*-elf*): New target; use mipsb-elf32. - * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and - OTHER_READWRITE_SECTIONS if relocating. Shell variables are not - expanded within them. - * config/mipsb-elf32.mt: New file. - * emulparams/elf32mipb.sh: New file. - * Makefile.in (em_elf32mipb.c): New target. - -Thu Sep 30 17:00:36 1993 Rob Savoye (rob@darkstar.cygnus.com) - - * ldgram.y: In input_list, change lang_input_file_is_file_enum to - lang_input_file_is_search_file_enum so objects brought in using - INPUT() do a path lookup. - -Tue Sep 28 13:31:23 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx - instead of {i386,m68k}-coff. - * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets. - * config/i386-lynx.mt: New file. - * config/m68k-lynx.mt: New file. - * emulparams/i386lynx.sh: New file. - * emulparams/m68klynx.sh: New file. - - * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY}, - but defaulting to _start. - - * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h, - ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with - LynxOS libc. - -Thu Sep 23 14:51:03 1993 Ian Lance Taylor (ian@cygnus.com) - - * config/solaris2.mh: New file. Define HOSTING_CRT0 and - HOSTING_LIBS for testing. - -Fri Sep 17 17:52:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Finish up support for i386-sysv4 (without shared libraries): - * ld.h (flag_is_weak): Define. - * ldlang.c (print_symbol): Mention whether symbol is weak. - (print_input_section): Print weak symbols as globals. - * ldmain.c (refize): Do not zero out BSF_WEAK flag. - (enter_global_ref): Do not warn if a weak symbol redefines a - global symbol. Do not let a weak symbol redefine a common symbol. - (enter_file_symbols): Treat weak symbols as global symbols. - (subfile_wanted_p): Do not pull in an object file from a archive - just to resolve an undefined weak symbol. - * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal - error; the error might be that malloc has run out of space. - * ldsym.c (write_file_locals): Treat weak symbols as global. - * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets; - use i386-elf. - * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib. - * config/i386-elf.mt: New file; set EMUL to elf_i386. - * emulparams/elf_i386.sh: New file. - * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0). - * Makefile.in (NATIVE_LIB_DIRS): Define to be empty. - (ALL_EMULATIONS): Add em_elf_i386.o. - (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument. - (em_elf_i386.c): New target, like other em_*.c targets. - ($(LD_PROG)): Pass $(CFLAGS) to $(CC). - * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If - nonempty, and configured for native, add it to LIB_PATH. - -Fri Sep 17 13:07:39 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}: - Added statements to pass stab and stabstr sections through and - mark them as NOLOAD, which makes GDB happier. - -Wed Sep 15 16:02:29 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * configure.in: Accept m68k-lynx-lynxos config. - - * Makefile.in: Use $(SHELL) to run genscripts.sh. - -Sun Sep 12 16:04:40 1993 Doug Evans (dje@cygnus.com) - - * config/coff-h8300.mt: Add EMUL=h8300h. - - * ldmain.c (main): Call set_scripts_dir after argv has been processed. - -Fri Sep 10 09:36:29 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * Makefile.in: Changed CXX back to g++. - -Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule. - -Fri Sep 10 07:26:57 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in (TAGS): Use shell wildcards. - -Tue Sep 7 18:04:54 1993 Jeffrey Osier (jeffrey@cygnus.com) - - * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target - -Fri Sep 3 16:46:41 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * ld.texinfo: re-enable included config file; conditionalize doc - for -oformat to interact properly with SingleFormat doc config - var; rename @up/@down to @raisesections/@lowersections. - -Wed Aug 25 16:29:56 1993 K. Richard Pixley (rich@sendai.cygnus.com) - - * configure.in: recognize m88110. - -Tue Aug 24 18:49:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - From Peter Hoogenboom <hoogen@shafer.cs.utah.edu>: - * 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. - -Tue Aug 24 16:17:00 1993 K. Richard Pixley (rich@sendai.cygnus.com) - - * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no - longer in bfd.h. - - * ldlang.c, ld.h: updated copyright. - -Tue Aug 17 15:22:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldlang.c (open_output, lang_check): Check return value of - bfd_set_arch_mach. - -Tue Aug 17 07:02:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) - - * scripttempl/h8500.sc: Start all sections in a different segment. - * scripttempl/z8ksim.sc: Handle constructors - -Thu Aug 12 16:05:37 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * Makefile.in: revert earlier changes back to execute runtest - with make check. cdtest and bootstrap now function as they - did within the Makefile. - -Thu Aug 12 10:20:05 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in: Update dependencies. - - * configure.in: Set EMULATION_OFILES in Makefile based on - --with-targets option. - -Thu Aug 12 08:52:29 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * Makefile.in: check targets reimplemented to old way. - -Wed Aug 11 08:26:11 1993 Ian Lance Taylor (ian@cygnus.com) - - * config/i386v.mh, config/irix4.mh: Use gcc - -print-libgcc-file-name rather than $(libdir)/libgcc.a. - * config/i386sco.mh: New file; copy of i386v.mh to correspond to - bfd/configure.host change. - -Mon Aug 9 14:25:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * scripttempl/elf.sc: Handle .line and .debug* sections. - - * ldlex.l: Use bfd_scan_vma, not strtoul. - -Fri Aug 6 08:57:39 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c: - Remove inital caps in some error messages, change "can't" to - "cannot", add missing colons. - * ldmisc.c (vfinfo): Print "%%" as a single %. - For '%' followed by unrecognized character, print them both - verbatim instead of expecting a char * arg. - For '%C', don't put the function name in parens. - - * ldexp.c (invalid): Pass "%%", not "% ". - -Fri Aug 6 14:31:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss. - (BSS_VAR): Removed; now always define _fbss. - * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR): - Removed. - -Thu Aug 5 15:55:19 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) - - * configure.in: z8k-coff is the same as z8k-sim - -Wed Aug 4 21:00:18 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * testsuite/lib/ld.exp: new file - * testsuite/config/unix-ld.exp: new file - * testsuite/ld.bootstrap/bootstrap.exp: new file - * Makefile.in: add dejagnu support for make check - -Wed Aug 4 17:52:32 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldlex.l (comment): Add missing newline in message. - * ldindr.c (add_indirect): Ditto. - * ldexp.c (exp_fold_tree): Ditto. - -Tue Aug 3 10:57:41 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons - into externs. - - * ldmisc.c (multiple_warn): New function. - * ldmisc.h: Declare it. - * ldmain.c (enter_global_ref): Call it. - * ld.h (ld_config_type): Add warn_common. - * ldlex.l, ldgram.y: Set it with -warn-common option. - * ldver.c (help): Document it. - -Mon Aug 2 12:04:36 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and - target-specific sections, and for changing data section vma. - -Mon Jul 26 14:00:02 1993 Ken Raeburn (raeburn@deneb.cygnus.com) - - * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New - terminals, for Solaris. - (dirlist_ptr): New static variable. - (command_line_option): Accept new options. - - * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and - "-YP,...". - - * config/sun4sol2.mt: Pass emulation name without ".sh". - - * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c. - * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly. - -Fri Jul 23 13:51:09 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * scripttempl/elf.sc: Add support for .init, .fini, .ctors, - .dtors, .data1, .rodata1 sections, instead of combining them into - other sections. For `-r', set all section start addresses to - zero. - - * emulparams/elf32-sparc.sh (TEXT_START_ADDR, - NONPAGED_TEXT_START_ADDR): Value should be 0x10100. - (MAXPAGESIZE): Renamed from PAGE_SIZE. - -Wed Jul 21 14:28:42 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * genscripts.sh: If this is the default emulation, set - COMPILE_IN. - * emultempl/*.em: Use it to determine whether to compile in the - scripts. - - * Makefile.in (GENSCRIPTS): Pass the default emulation name to - genscripts.sh. Pass the current emulation name without ".sh" on - the end. - * genscripts.sh: Take an default emulation arg. - Use the current emulation name as EMULATION_NAME. - Make default lib path for cross-compiling ':', not null. - * emulparams/*.sh: Don't set EMULATION_NAME. - * ldemul.c (ldemul_get_script): Take isfile arg. - Pass it to emulation's get_script function. - * ldemul.h: Adjust get_script prototypes. - * ldfile.c (ldfile_find_command_file): Renamed from find_a_name. - No longer static. - * ldfile.h: Declare it. - * ldgram.y: Accept a script on the command line again, - for parsing compiled-in scripts. - * ldmain.c (main): If ld script is a file, parse it as a -T - option, otherwise parse it directly. - * emultempl/*.em (*get_script): Return the scripts themselves if - this is the default emulation; otherwise return their file names. - * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of - generic.em. - * emulparams/m88kbcs.sh: Use it. - - * ld.h (ld_config_type::unix_relocate): Remove unused element. - -Tue Jul 20 12:01:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which - there's no change log entry yet, tsk tsk) from the list of - emulations compiled in until Mark gets around to checking in - emulparams/i386linux.sh. - (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is - changed, this file gets updated. - -Fri Jul 16 14:14:32 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldgram.y (OPTION_Lfile): New token. - (command_line_option): Accept OPTION_L NAME (whitespace after -L). - * ldlex.l (<COMMAND>): Accept -L without FILENAME. - -Fri Jul 16 13:44:26 1993 Doug Evans (dje@canuck.cygnus.com) - - * configure.in: h8/300h support needs own .mt file. - config/coff-h8300h.mt: New file. - -Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmain.c: Don't include sys/stat.h; it already got included - somewhere along the way. - -Thu Jul 15 14:43:34 1993 Doug Evans (dje@canuck.cygnus.com) - - * Makefile.in: Add h8300h support. - emulparams/h8300h.sh: New file. - scripttempl/h8300h.sc: New file. - -Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldfile.c (ldfile_open_file): In error message, use the name the - user gave (e.g., "-lc"), rather than the base file name. - - * ldexp.c (exp_fold_tree): Don't assign an int to an enum. - - * ldmain.[ch]: Remove initial Q_ from function names. - * ldexp.c, ldindr.c, ldlang.c: Change callers. - - * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries. - - * ldlang.c (lang_process): Move loading of default script from - here to main. Add a "/" to start of script name to prevent - finding it in "." first. - - * ldmain.c (set_scripts_dir): Don't look in "." first. - - * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var - option_longmap. - -Thu Jul 15 10:55:59 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (em_m88kbcs.c): Correct dependency. - * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET - statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}. - * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs. - -Wed Jul 14 21:42:53 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldfile.c (ldlang_open_file, ldfile_open_command_file), - main.c (main): Print the errno string in the error message. - -Tue Jul 13 20:00:30 1993 Doug Evans (dje@canuck.cygnus.com) - - * configure.in: Accept h8300h for target cpu. - - * ldmisc.c (vfinfo): Have demangle remove leading underscore if - present (demangle is smart enough to know whether to do it or not). - -Mon Jul 12 11:45:48 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for - ldscripts, as well as <ld bin dir> and SCRIPTDIR. - - * ldlang.c (lang_process): Use sizeof instead of magic constant. - - * ldmain.c (get_emulation, check_for_scripts_dir, - set_scripts_dir): New functions. - (main): Call them. - -Mon Jul 12 10:57:03 1993 Ken Raeburn (raeburn@deneb.cygnus.com) - - * scripttempl/elf.sc: Include .init, .fini, .rodata sections. - Create symbol "end" instead of "__end". Comment out some parts - that may not be needed (yet) for elf. - - * configure.in: Accept sparc-elf and sparc-solaris2 configs. - -Thu Jul 8 15:33:32 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS). - - * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro - when no prototype is being supplied. - (ldmalloc, ldrealloc): Size argument is now size_t. - - * ldmisc.c (finfo): New function, accepts FILE* argument. - (vfinfo, case 'v'): New format character; displays bfd_vma in hex - without leading zeros. - (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a - bfd_vma value, instead of fprintf(%x) which won't hold a long long - value. - (concat, buystring): String lengths are size_t. - (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t. - - * ldlang.c (new_statement): Size argument is now size_t. Added - forward declaration with prototype. - -Thu Jul 8 10:53:47 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldgram.y (OPTION_v): Don't turn on verbose output. - -Wed Jul 7 17:10:45 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * ldlex.l: Get rid of local typedef for bfd_vma! Get it from - bfd.h instead. - -Wed Jul 7 11:33:12 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): Don't install as $(tooldir)/bin/gld; - collect2 doesn't look for gld any more anyhow. - -Mon Jul 5 14:29:48 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (lang_relocate_globals): Skip indirect symbols, which - now have a non NULL srefs_chain. - - * config/hp300hpux.mt: Use emulation hp3hpux rather than - hp300hpux, since the latter does not exist. - -Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * genscripts.sh: Put the scripts in the ldscripts directory, not - emulations. - * configure.in (ldscripts): Make, instead of emulations. - * Makefile.in (scriptdir): Take off the "ld" part. - (install, clean, distclean): Use ldscripts, not emulations. - In tests, don't pass -Lemulations. - Don't pass tooldir/lib to genscripts.sh. - * genscripts.sh: Don't take tooldir/lib arg. - * ldlang.c (lang_process): Add "ldscripts/" to the name of the - default script file. - -Fri Jul 2 17:13:35 1993 Doug Evans (dje@canuck.cygnus.com) - - * scripttempl/h8300.sc: Add .tors section for constructor/destructors. - -Thu Jul 1 16:38:45 1993 Doug Evans (dje@canuck.cygnus.com) - - * config/coff-h8300.mt: EMUL=h8300hms -> h8300. - -Wed Jun 30 15:45:55 1993 K. Richard Pixley (rich@sendai.cygnus.com) - - * Makefile.in (.y.c): skip default .y.c rules. gnu make can now - run in parallel without colliding on yacc's static file names. - Without the stub rule, make will try to start two yacc's - concurrently which fails because of yacc's static file names. - -Tue Jun 29 12:20:36 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldmain.c (subfile_wanted_p): Don't dump core if there are no - symbols. - -Mon Jun 28 12:22:11 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's - different from libdir. - - * Makefile.in (scriptdir): Base on tooldir, not datadir. - -Sat Jun 26 12:03:57 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldver.c (help): New function. - * ldver.h: Declare it. - * ldlex.l, ldgram.y: Recognize new options --help and --version. - -Mon Jun 21 20:39:48 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) - - * Makefile.in (INCLUDES): Don't need ../include any more. - -Mon Jun 21 16:38:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldlex.l, ldgram.y: Support new -oformat option. - Remove attempt at supporting script fragments on the command line. - * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT. - * mri.c (mri_format), ldgram.y: Change callers. - * ldlang.h: Change prototype. - -Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com) - - * Makefile.in: canonicalize install.sh; for use within - this directory (and subdirs) - -Thu Jun 17 14:33:09 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldgram.y: Tweak grammar to make reporting of invalid options work. - - * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc - and .cc.o rule. - -Wed Jun 16 11:45:32 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * ldfile.c (ldfile_open_command): Don't try .ld extension. - 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. - -Tue Jun 15 23:04:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * Makefile.in (INCLUDES): Look in ../include, not ../bfd. - - * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO - dependent on RELOCATING, not RELOCATION. - * hp3hpux.sh (SHLIB_PATH): Define it. - -Mon Jun 14 19:06:15 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * 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. - -Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) - - * Makefile.in: remove parentdir support, use INSTALL_XFORM - -Thu Jun 10 14:00:06 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldexp.c (exp_fold_tree): Don't lose the old flag bits. - * ldgram.y (statement_list_opt): New nonterminal, either empty or - statement_list. - (section): Use statement_list_opt, not statement_list. - * m68kcoff.sc-sh: Gather constructors and destructors and define - __CTOR_LIST__ and __DTOR_LIST__ appropriately. - * sa29200.sc-sh: Gather constructors and destructors and define - ___CTOR_LIST__ and ___DTOR_LIST__ appropriately. - -Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h. - * configure.in: No longer need to configure to get sysdep.h. - -Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: remove install:all and install-info:info - dependencies (these cause some spurious rebuilds at 'make install' - time) - -Fri Jun 4 08:50:14 1993 Ian Lance Taylor (ian@cygnus.com) - - * configure.in (mips-idt-ecoffl*): New target; use mips-idtl. - (mips-idt-ecoff*): Added trailing '*'. - * config/mips-idtl.mt: New file; use EMUL of mipsidtl. - * mipsidtl.sh: New file; like mipsidt.sh, but little endian. - * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o. - - * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and - incorrect definitions. - -Tue Jun 1 14:56:10 1993 Per Bothner (bothner@rtl.cygnus.com) - - * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR - symbols, unless stripping. - -Tue May 25 15:34:25 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in: configure looks for ####, so remove lines with many - '#' characters. - * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0 - and HOSTING_LIBS correctly so that ``make check'' will work. - -Thu May 20 13:56:16 1993 Per Bothner (bothner@deneb.cygnus.com) - - * mips.sc-sh: Define _etext, _edata, and _end, in addition - to etext, edata, and end. Needed for IRIX 4.0.5F. - Patch from mwp@iconix.oz.au (Michael Paddon). - - * Version 2.2.1 released. - -Thu May 20 11:42:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh. - * mipsbsd.sh (EMULATION_NAME): Use new file name. - -Tue May 18 17:10:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it - properly right now. - - * Version 2.2 released. - -Mon May 17 15:37:28 1993 Ken Raeburn (raeburn@deneb.cygnus.com) - - * ldver.c (ldversion): Bump version number to 2.2. - -Mon May 17 12:44:31 1993 Per Bothner (bothner@cygnus.com) - - * NEWS: New file. - -Fri May 14 11:26:24 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.sc-sh: Don't define BSS_VAR unless relocating. - -Wed May 12 13:33:29 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (mkscript.o, mkscript): Build mkscript via - mkscript.o, rather than directly from mkscript.c. - -Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * configure.in: Look for ${target_makefile_frag} relative to - ${srcdir}, not relative to build directory. - - * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files. - * configure.in: Recognize hppa*-hp-osf. - * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation. - (em_hppaosf.c): Build it. - * config/hppaosf.mh, hppaosf.mt: New files. - - * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with - some system header files. All uses changed. - - * configure.in: Recognize i386-aix configurations as i386-coff - targets. - - * configure.in: Recognize m68*-*-hpux. - * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output - the value of STACKZERO. - * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation. - (em_hp3hpux.c): Build it. - * hp3hpux.sh, config/hp300hpux.mt: New files. - -Tue May 4 12:37:35 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.sc-sh: Put constructors in the .data section. - * Makefile.in (cdtest): Added dependency on ld.new. - -Mon May 3 19:43:39 1993 Per Bothner (bothner@cygnus.com) - - * Makefile.in: Change definition of $(tooldir) to match FSF. - * vax.sh, config/vax.mt, configure.in, Makefile.in: - Support VAX Ultrix and BSD. - -Mon Apr 26 18:35:47 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH. - -Wed Apr 14 21:01:51 1993 John Gilmore (gnu@cygnus.com) - - * ldlang.h (struct memory_region): Change `length' and - `old_length' fields to bfd_size_type. Eliminate use of bfd_offset. - * ldlang.c, mri.c: Corresponding changes, plus lint. - -Thu Apr 8 22:08:18 1993 Ian Lance Taylor (ian@cygnus.com) - - * configure.in: For all i386 targets, accept i486 as well. - -Mon Apr 5 17:33:39 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (wild_doit): Preserve all flags for a - SEC_SHARED_LIBRARY section. - (size_input_section): Consider any SEC_HAS_CONTENTS section when - computing largest_section. - -Fri Apr 2 14:33:52 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (lang_output_section_statement_lookup): Initialize all - fields of newly created structure. - -Wed Mar 31 18:19:15 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldmain.c (g_switch_value): New variable. - * ldgram.y (OPTION_G, OPTION_Gval): New tokens. - (command_line_option): Accept -G and set g_switch_value. - * ldlex.l (COMMAND): Accept -G. - * ldlang.c (open_output): Call bfd_set_gp_size on new BFD. - -Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - Support for linking and loading at different places: - - * 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. - - * ldindr.c (add_indirect): Keep more information in the alias - symbol chain. - * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section - attribute from an input section. - * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by - default. (Q_enter_file_symbos): Indirect symbols now are known by - their section, not a special symbol flag. - * ldsym.c (write_file_locals): Indirect symbols aren't local. - (write_file_globals): Write the mapping for an indirect symbol. - * relax.c (build_it): When forced to write a NEVER_LOAD section, - fill it with zeros. - -Tue Mar 23 13:24:10 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com) - - * ld.texinfo: changes for q1 - -Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck - -Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: rename HOST_CC to CC_FOR_BUILD - -Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.sc-sh: Added variables which may be overridden by a - specific emulation. - * mipsidt.sh: New file; emulation for IDT MIPS board. - * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o. - (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh. - * config/mips-idt.mt: New file; sets EMUL to mipsidt. - * configure.in (mips-idt-ecoff): New target; uses mips-idt. - -Sat Feb 27 00:00:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell, - ralphc@pyramid.com. - * i386bsd.sh, config/i386bsd.mt: New files. - * configure.in, Makefile.in: Added support for mipsbsd and 386bsd. - -Thu Feb 25 15:33:10 1993 Per Bothner (bothner@rtl.cygnus.com) - - * mri.c: Add extern declaration of strdup. - * ldsym.c (KEEP macro): Add spaces around '=' for the - sake of old (e.g. PCC) compilers. - -Wed Feb 24 19:49:31 1993 Per Bothner (bothner@rtl.cygnus.com) - - * ldver.c: Bump to version 2.1. - -Fri Feb 12 08:09:11 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldgram.y: allow section types without address expressions. - * ldlang.c (lang_relocate_globals): avoid possible hang with - undefined but unreferenced symbols. - * relax.c (relax_section): don't complain if the script file isn't - relaxable but -relax is set - -Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: go32 is the 3rd part of the triple, not the 2nd - -Wed Feb 3 09:05:56 1993 Ian Lance Taylor (ian@cygnus.com) - - * mipsbig.sh: New file. Big endian MIPS emulation. - * config/mips-big.mt: New file. Use mipsbig emulation. - * configure.in (mips-sgi-irix*): Use target mips-big. - * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o. - (em_mipsbig.c): New target. Uses mipsbig.sh. - -Tue Feb 2 11:32:27 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.sc-sh: Put .scommon sections into .sbss section. - - * ldmain.c (subfile_wanted_p): Preserve section of common symbols, - rather than always putting them in bfd_com_section. - * ldlang.c (lang_common): If a common symbol is not in - bfd_com_section, put in a section of the same name, rather than - always putting it in section COMMON. - -Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldmain.c (subfile_wanted_p): If we already have a common - definition of a symbol, don't necessarily pull in an object file - that provides a non-common definition. - - * ldlex.l (COMMAND): Accept -EB and -EL command line arguments, - returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS - linker. - * ldgram.y (OPTION_EB, OPTION_EL): New tokens. - (command_line_option): Accept and ignore OPTION_EB and OPTION_EL. - -Thu Jan 28 15:12:04 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): Remove $(tooldir)/bin/gld before creating - the link to it. - -Tue Jan 26 11:49:50 1993 Ian Lance Taylor (ian@cygnus.com) - - * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than - checking for equality to bfd_com_section. - -Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF - targets, linker script. - * mipslit.sh: New file. Little endian MIPS emulation. - * config/mips-lit.mt: New file. Use mipslit emulation. - * configure.in (mips-dec-ultrix*): Use target mips-lit. - * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o. - (em_mipslit.c): New target. Uses mipslit.sh. - -Thu Jan 14 15:30:27 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and - $(tooldir)/bin/gld, so that gcc can find it with or without - collect2. - -Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ldwrite.c: Removed perform_relocation, copy_and_relocate, and - write_norel. All linking is now done via write_relax. Call - ldsym_write before calling write_relax. - * relax.c: Added copyright. - (write_relax): Renamed from write_relaxnorel. Added relocateable - argument. seclet_dump renamed to bfd_seclet_link. - * relax.h: Added copyright. - -Mon Jan 11 15:41:56 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmain.c (decode_library_subfile): Patch from - hoogen@shafer.cs.utah.edu, don't reread library symbol tables. - -Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * config/vxworks960.mt renamed to config/i960.mt - - * configure.in: sparc-aout emulates a sun4, as does - sparc*-vxworks, i960-nindy uses gld960 emulation - -Fri Jan 8 14:39:07 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - Fix support for NOLOAD, add INCLUDE - * 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. - -Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in, config.h: no more default emulation. Make the lack - of emulation a compile time error - -Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: recognise all sparclite variants, not just 'sparclite' - -Mon Dec 28 11:15:35 1992 Ian Lance Taylor (ian@cygnus.com) - - * m68kcoff.sc-sh: define _end as well as end, for consistency with - aout.sc-sh. - - * configure.in: accept *-ericsson-ose for any m68k CPU. - - * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag - for each output section. - -Mon Dec 21 16:06:59 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new - macro bfd_asymbol_bfd as appropriate. - * Makefile.in: Un-duplicate ldlex.c dependency. - * condigure.in: Replace my_host case table by sourcing - ../bfd/configure.host. Allow std-host as the default. - * ldmisc.c: Change logic for C++ name demangling: There is - no initial '_' to remove from stab-derived function names. - -Sun Dec 13 16:31:26 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlang.c (lang_init_script_file): don't attach the output file - sections to the script file. - -Wed Dec 9 08:38:05 1992 Steve Chamberlain (sac@thepub.cygnus.com) - * ldlang.c (wild): run expansion loop over command line bfd too. - (lang_ini_script_file): initialize more parts of the command line - bfd. - * ldlex.l: fix DEFINED start states. - -Mon Dec 7 08:43:41 1992 Steve Chamberlain (sac@thepub.cygnus.com) - -y support - * 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. - -Sat Nov 21 03:15:27 1992 John Gilmore (gnu@cygnus.com) - - * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c, - ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h, - ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue - macros with PARAMS. Recreational cleanup. Update copyrights. - -Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: pass down the bfd source directory for includes - -Thu Nov 5 15:41:55 1992 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (lang_size_sections): don't change size and address for - SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD - sections. - -Thu Nov 5 11:33:57 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * relax.c (build_it): re-enable the processing of data_statements - in scripts, makes counted contructor lists work again. - -Thu Nov 5 05:43:01 1992 John Gilmore (gnu@cygnus.com) - - * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS). - -Tue Oct 20 10:56:06 1992 Ian Lance Taylor (ian@cygnus.com) - - * m68kcoff.sc-sh: don't use initial underscores for etext, edata - and end. - -Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com) - - * Support for i386-sysv. - configure.in: check for i386-*-sysv* and i386-*-sco*. - i386coff.sc-sh: rewrote to support SVR3 by default. - ldctor.c (find_constructors): preserve stat_ptr. - ldlang.c (wild_doit): initialize vma and size of new output - section to corresponding input section. This is required for - shared library support. - (lang_size_sections): don't modify vma and size of sections which - are never loaded (for shared libraries). - ldwrite.c (copy_and_relocate): copy the contents of any section - which has contents, not just sections which are loaded (for shared - libraries). - -Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlang.c (size_input_section): count the sizes of all sections - we allocate. - -Thu Oct 8 09:05:25 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to - to demangle symbols better - -Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com) - - * ldlang.c (lang_finish): don't warn if -e start symbol does not - exist when linking with -r. - -Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com) - - * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the - .bss segment. - -Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmain.c (linear_library): don't even think about processing - an object file if it's already been done - -Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: the hp9000/300 config file is now hp300 - -Wed Sep 30 07:34:09 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * config/z8ksim.mt: new file - -Fri Sep 25 13:49:52 1992 Ken Raeburn (raeburn@kyriath.cygnus.com) - - * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o, - lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h. - - * ld.h (strip_symbols_type): Add value STRIP_SOME. - * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token. - * ldlang.c (lang_add_keepsyms_file): New function. - * ldlex.l: Handle "-retain-symbols-file". - * ldsym.c (keepsyms_file, kept_syms): New vars. - (process_keepsyms): New functihon; reads file, marks symbols for - saving. - (write_file_locals): File symbols should always be kept. - (ldsym_write): Warn about "-retain-symbols-file" overriding "-S" - and "-s". Process retain-symbols file before setting symtab. - * ldsym.h (SYM_KEEP): New flag for ldsym_type flags. - (keepsyms_file, kept_syms): Declare them. - - * ldmain.c (main): Non-fatal errors should still cause non-zero - exit status even with -r. - -Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - Added initial support for the z8k - * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files - * configure.in, Makefile.in: modified to reflect above - - * ldlang.c (lang_check): when linking conflicting architectures, - make the output file reflect at least one of the bad inputs. - -Tue Sep 15 15:35:38 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): if $(tooldir) exists, install ld in - $(tooldir)/bin. - -Fri Sep 11 10:24:22 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * Makefile.in, configure.in: modified to support i386-coff - * i386coff.sh: new file - -Wed Sep 9 11:52:58 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt: - added m68k-coff emulation mode, stolen from a29k emulation. - Almost certainly wrong, but perhaps better than sun3. - -Thu Sep 3 14:19:30 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in, Makefile.dos, generic.em, genscripts.sh, - gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em, - vanilla.em: Rename all (generated) ld__*.c files to em_.c. - This is one character shorter, and lets people build on - SVR3 system. (ld__h8300xray.[co] was the killer there; - h8300xray.sc-sh is also overlong, but seems harmless.) - Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>. - * Makefile.in (clean): Fix typo mostclean -> mostlyclean. - * configure.in: Add host isc. - - * ldver.c: Call it version 2.0. - -Wed Sep 2 00:21:33 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldver.c: Bump to version 0.98. - * TODO: New file. - - * Makefile.in: Added mostlyclean, distclean, realclean rules. - -Tue Sep 1 23:42:16 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c). - * ldlex.l: Moved comment() to end, since some compilers - otherwise have problems with input() used before it is defined. - -Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: added Solaris 2 and Irix 4 host support. - -Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: remove -S flag from the FLEX definition - - * configure.in: rewrote, using new style case statement. use - m68k.mt for m68k-aout systems - -Sun Aug 30 21:38:53 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in: map "ld" through program_transform_name when - installing. - -Sun Aug 30 18:12:13 1992 Per Bothner (bothner@rtl.cygnus.com) - - * cplus-dem.c: Removed. Use the version in libiberty now. - * ldmisc.c: Use new libiberty version of cplus_demangle(). - -Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com) - - * gld960.em (gld960_choose_target): default to little endian, not - big endian. - -Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlang.c (lang_process): don't pass null pointers when - abs_output_section is what is required. - * ldwrite.c (ldwrite): use malloc to allocate the largest space - used, and pass that down. - * relax.c,relax.h (write_relaxnorel): use the passed malloc area rather - than alloca. - -Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com) - - * configure.in, config/ose68.mt: renamed OSE to ose. - -Thu Aug 20 19:55:22 1992 Ken Raeburn (raeburn@cygnus.com) - - * ldsym.c (write_file_locals): Reorder check for common or - undefined symbols so that it works. - -Tue Aug 18 13:41:36 1992 Ian Lance Taylor (ian@cygnus.com) - - * configure.in: accept all m68K family members. - - * Makefile.in: always create installation directories. - -Thu Aug 13 11:49:34 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlex.l: now parses comment correctly, added ~ to acceptable - 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. - -Fri Aug 7 12:31:10 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlang.h: add new field "loadable" to output_section_statement. - * 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. - -Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldint.texinfo: New internals manual (beginnings thereof). - * PORTING: Removed, merged into ldint.texinfo. - -Tue Aug 4 21:12:29 1992 Per Bothner (bothner@rtl.cygnus.com) - - * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc, - cdtest.exp: A test program (copied from libg++/test-install) - that tests that constructor and destructors are handled - corrrectly. - -Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in (install): install from ld.new, renaming during the - copy, or else the next 'make install' needs to re-link ld. - -Mon Jul 20 03:37:06 1992 D. V. Henkel-Wallace (gumby@cygnus.com) - - * configure.in: generalise hp recognition (from sef). - -Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: recognize bsd and hpux hppa configurations. - error messages echo to stderr, not stdout - -Fri Jul 17 22:06:11 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c, - ldmisc.c: removed rcsid's. - -Tue Jul 14 08:34:34 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlang.c (lang_map): print changes in sizes due to relaxing - (size_input_section): maintain the delta information. - * ldlang.h: add new field to struct to contain delta info. - * relax.c (relax_section): complain if input not relaxable. - * ldlex.l : add '_', ',' and '$' to chars which can appear at the - start of a filename - -Mon Jul 13 17:33:00 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmain.c(main): prevent -r and -relax from being on at the same - time. - -Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for - aliasing problems - - -Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * h8300hms.em, h8300hms.sc-sh: do the right thing for -r - * ldexp.c: lint - * ldlang.c(open_output): set the target arch and machine as soon - as we can. (lang_size_sections): use new macros for setting vma - * ldwrite.c: lint - -Mon Jun 15 08:47:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com) - - * configure.in (my_target): Accept m680?0 for wrs as vxworks68. - Also deleted an unreachable path to wrs. - -Wed May 27 23:24:19 1992 Michael Tiemann (tiemann@rtl.cygnus.com) - - * Makefile.in (install): use -d test for $tooldir before - installing ld there so that $tooldir can be inherited from - top-level Makefile. - -Wed May 27 16:56:48 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldlang.c: Two non-substantial changes for the sake of - the old Portable C Compiler. - -Wed May 27 15:15:58 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldgram.y, ldlex.l: parse ABSOLUTE - * ldexp.c: add support for ABSOLUTE - -Wed May 27 13:07:20 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Added default definitions for HOSTING_CRT0, - HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh. - * config/*.mh: Miscellaneous clean-up: Removed definitions - of YACC (since it is not longer used in the Makefile). - Remove HOSTING_* definitions that are subsumed by the - ones added to Makefile.in. Removed most definitions of CC. - * config/{sparc,news,hp300bsd,decstation}.mh: Removed; - These are no longer needed. - -Fri May 22 13:47:19 1992 Per Bothner (bothner@cygnus.com) - - * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex - rules, since these are used when building a distribution. - * Makefile.in (ldlex.c): Don't re-direct output, since that - leaves a bogus output files if it fails. - - * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working. - * ldlex.c: Fix some unnecessary flex-specific-isms. - -Fri May 8 11:49:43 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldgram.y: move spurious semicolon - * ldexp.h: fix prototype - -Thu May 7 17:01:12 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * ld.texinfo: references to linker now say "ld" not "gld". - -Wed May 6 13:26:19 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - changed calling convention for Q_enter_global_ref - * ldexp.c, ldlang.c, ldmain.c: reflect this - * ldver.c: bump version to 1.97.1 - * ldindr.c (add_indirect): when an edict declaring an indirect - symbol is found, make sure that any ideas about the symbol being - common are changed if it now known to be defined. - * ldmain.c (linear_library): complain once if archive isn't - ranlibbed. - * ldlang.h, ldlang.c: make room for and initialize the complain - once field. - -Wed May 6 11:07:35 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: use flex & bison from ../ if they exist. - -Tue May 5 17:47:33 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * relax.c (build_it): don't allocate space in the output file for - stuff if -R flag applys to it. - * ldfile.c: merge in VMS filename support - * ldmain.c (main): take out ./ from library path, and close file - before unlinking. Make multiple defs of a symbol create an - unexecable file. - * ldmisc.c: fatal errosrs delete output file - -Tue May 5 14:05:05 1992 Per Bothner (bothner@rtl.cygnus.com) - - * ldver.c: Increase version number to 1.97, for consistency - with ../binutils. - -Tue May 5 12:12:24 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: FLEX -> LEX. - - * ld.texinfo: {} -> @{@}. - -Mon May 4 17:52:41 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * ld.texinfo: describe alternate, MRI-compatible linker scripts - (and associated change in -c option, now used for these scripts) - -Mon May 4 16:10:10 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldver.c: Bumped version to 1.96 - new release, resync with the - bfd too #. - * ldexp.c, ldlang.c: now build memory shape tree in obstacks - rather than with raw malloc, makes it easier to track where memory - is going. - * ldsym.h, ldsym.c: create obstack for all global symbols too. - * ldwrite.c (ldwrite): moved malloc so only used when needed. - * sa29200-sc.sh: added support for .lit, data1 and data2 sections. - - -Fri May 1 18:17:52 1992 K. Richard Pixley (rich@cygnus.com) - - * config/sparc.mh: use ../gcc/libgcc.a on check if it exists. - - * Makefile.in: use bootstrap for check. - -Fri May 1 13:03:41 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and - PUBLIC. - * Makefile.in: now use flex, not lex - * ldlex.l, ldlang.c, ldctor.c: lint - -Wed Apr 22 12:48:42 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlex.l: added CMDFILENAMECHAR state so that you can lex - different sorts of filenames on the command line than in a script. - -Mon Apr 20 22:37:04 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: rework CFLAGS so that they can be passed on the - make command line. Remove MINUS_G. Default CFLAGS to -g. - -Fri Apr 17 08:57:17 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * relax.c: added handling for new "padding" seclet type, used to - fill out gaps between section. - * ldgram.y, ldlex.l: now -defsym on the command line is done - properly. - -Wed Apr 15 21:20:07 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: the tooldir copy of ld goes directly in tooldir. - -Wed Apr 15 16:09:33 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * mri.c, ldgram.y, ldlex.l: added support for minimal strange link - scripts. - -Thu Apr 9 05:52:02 1992 Ken Raeburn (Raeburn@Cygnus.COM) - - * Makefile.in (install): Install second copy in $(tooldir)/bin - without $(program_prefix), since that's what gcc expects. - -Sat Apr 4 17:44:06 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer. - * h8300*: fix bit rot and add support for h8300xray target - * go32.sh: target emulation for go32. - -Mon Mar 16 14:53:29 1992 Steve Chamberlain (sac@rtl.cygnus.com) - - * gld960.em, i960.sc-sh. Fix i960 bit rot - -Fri Mar 13 19:47:22 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: install man page. - -Fri Mar 13 08:23:59 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * config/mt-<foo> renamed to <foo>.mt - * config/mh-<foo> renamed to <foo>.mt - * configure.in changed to reflect this - * genscripts.sh now make .xbn files rather than .xN files - -Sat Mar 7 03:40:40 1992 K. Richard Pixley (rich@cygnus.com) - - * ldver.h: fix decl of ldversion. - -Fri Mar 6 22:00:35 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: added check target. - -Fri Mar 6 06:59:04 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldmain.c (Q_enter_file_symbols): now aliases work again - -Thu Mar 5 21:39:29 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: added clean-info target. - -Thu Mar 5 16:55:56 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ldexp.c (exp_print_tree): don't try and follow null pointers - around. - * ldgram.y: remove 11 shift reduce errors - -Tue Mar 3 15:46:39 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: added tooldir and program_prefix. - -Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com) - - * ldlang.c (size_input_section): don't move absolute sections - around! - - -Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com) - - * cplus-dem.c: yet another copy of this - maybe it should go into - libiberty ? - * ldgram.y: now -V and -v have different actions - * ldver.c: if -V, prints list of emulations compiled in - * ldmisc.c: support for cplus demangling - - -Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in, configure.in: removed traces of namesubdir, - -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced - copyrights to '92, changed some from Cygnus to FSF. - -Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Change mkscript rule into one for ./mkscript - (for the sake of makes that don't realize they're the same). - * PORTING: Add more details. - * genscripts.sh: Add more tailorability of DATA_ALIGNMENT. - -Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com) - - * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd, - config/mt-hp300bsd: New port to hp300 running BSD. - -Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com) - - Major rewrite of how ld is configured. The major idea - is to use shell scripts to generate everything. - * generic.em replaces ldtemplate. - * Other *.em files replace various *.c files. - A *.em file is a shell script that generates the corresponding - ld__*.c file that implements an emulation. This is usually - a straight 'cat' of a here-document, possibly with substitutions. - * Script files (*.sc) are places by *.sc-sh scripts. - Again, these are simple shell scripts that 'cat' - here-documents, usually with some substitutions. - The output a *.sc-sh is a script file. - * Each emulation is defined by a short shell script with - extension *.sh that specifies the emulation-specific - parameters (such as the name of the *.sh-sc and *.em - files to use). - * genscript.sh is the master shell script used to generate - an emulation. It is passed various argument, including - the name a the emulation-speciic *.sh file that it - "sources" to set variables to emulation-specifc parameters. - * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME - to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.) - * config/mh-foo: Rename LDEMULATION names as appropriate - (usually 'gldfoo' -> plain 'foo'). - * ldwrite.c: Fixed a typo in a comment. - * Makefile.in: Major changes. Removed some the sed - magic to converts scripts, since that is now handled - by genscripts.sh and the *.sc-sh scipt generators. - * config.h: Remove a bunch of macros defining emulations - and targets. This becomes one less file to edit when - adding emulations or targets. - * ldemul.h (struct ld_emulation_xfer_struct): Add - emulation_name and target_name fields. - * ldemul.c, ldemul.h: Define some default functions used - by most emulations (and remove from the *.em scripts). - * ldemul.c (ldemul_choose_target): Search the new - ld_emulations array using a loop (instead of a hardwired - nested if statement). - Define the ld_emulation from the automatically-geenrated - ldemul-list.h. This means you no longer have to edit ldemul.c - to add a new emulation. - * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by - their expansions, since the former no longer exist. - * PORTING: A very rough first draft of a porting guide. - - * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment - to be terminated by a new-line (instead of requiring a semicolon). - -Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * ldexp.c, ldlang.c: added new idea "abs_output_section", removes - tests for NULL pointers all over the place. - * ldlang.c (lang_process): remember to relocate global symbols - *after* relaxing has done it stuff. - -Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * config/mt-coff-h8300: use EMUL like everything else - * ldlang.c: (print_padding_statement): print the right address. - * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms - - -Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * ldlex.l: Put pack -noinhibit-exec and -sort-common - * ldlang.c (print_data_statement): print the right address. - -Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com) - - * Makefile.in: The rule for testing ld by re-linking itself - via an intermediate -r link was moved to the ld1 rule - instead of the ld2 rule. This allows ld2 and ld3 to be identical, - which allows the bootstrap rule to work. - * ldctor.c (find_constructors): Don't create a constructor - list if it is already defined (as would happen if ld is - invoked by collect). - -Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * config/mh-sparc.h: now uses libgcc.a - * ldmain.c: quit using exit - * *sc: use *(COMMON) rather than [COMMON] - * ldlex.l, lexsup.c: much thinking moved from .l and put into .c, - to allow preprocessing of .l file. - * Makefile.in: New ldlex.l mangling - * ldexp.c (fold_binary): perform expressions with % and / in - integer. - * ldfile.c (open_a): open archives on VMS in a special way - - -Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * ldgram.y: map -M behave in the same way as -Map (sets file name - 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 - -Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * Makefile.in: added relax, also made three stage go through a - 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 - -Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com) - - * Makefile.in, config/tm-*.h: Clean up make output, only - pass DEFAULT_EMULATION to ldmain.c. - -Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com) - - * ldver.c: Bump to version 1.94. - -Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: infodir belongs in datadir. - -Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Pass -y to bison. (Again; - accidentally deleted by Rich.) - * news.sc, ldgld68k.sc: Define __end as well as _end. - -Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - * ldindr.h: added to contain prototypes of ldindr.c - * ldfile.c: include ctype.h - * ldmain.c: include the requried prototype headers - * ldwrite.c: get_reloc_upper_bound has been renamed - bfd_get_reloc_upper_bound - -Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: punt "fundamental" mode because it breaks my emacs - macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove - spaces following hyphens, bsd make can't cope. added - standards.text support and made it look like all the other - makefiles. - - * configure.in: configure now runs entirely in objdir so make file - existence checks against ${srcdir}. Mark this directory as - target dependent. - -Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: idestdir and ddestdir go away. Added copyrights - and shift gpl to v2. Added ChangeLog if it didn't exist. docdir - and mandir now keyed off datadir by default. - -Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com) - - * ldver.c: Bumped version to 1.93. - * Makefile.in: Pass -y to bison. - -Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com) - - * config.h: h8 is now coff, not ieee - * h8300hds.sc: reflect the same - -Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com) - - * ldver.c (ldversion()): Update to 1.92. - * ldctor.c: There are two places constructor sets - can be defined. One of them checked for an existing - duplicate, the other didn't. Unfortunately, the latter - was called after the former ... - So, factor out code for inserting a new element into - constructor_name_list (after checking for a duplicate) - into a new function add_constructor_name, and call - it from both aforementioned places (ldlang_add_constructor - and ldlang_check_for_constructors). - -Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Rename .c files generated from ldtemplate - to have names starting with ld__. This helps 'make clean'. - -Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com) - - * Makefile.in: Take out the version number for install - * m88kbcs.sc: put in contructor blocks. - -Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com) + * Makefile.in: Regenerate. - * ldmisc.c, ldmisc.h: Re-write info() to take a filename - parameter, a format, and an arg pointer, and rename it to - vfinfo(). Write info() in terms of new vfinfo(). - New einfo() is the same as info(), except it writes to stderr. - * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c, - ldmisc.c: Replace "error" calls to info() by new einfo(). +2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au> -Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com) + * ldlang.c (print_input_section, print_data_statement, + print_reloc_statement, print_padding_statement, insert_pad, + size_input_section, lang_check_section_addresses, + lang_size_sections, lang_do_assignments, lang_set_startof, + lang_one_common): Change `opb' to unsigned. + (lang_do_assignments): Also change `size' to unsigned. - * ldlex.l ldgram.y: made -V option do same as -v - * Makefile.in: Added $(MINUS_G) flag so debugging can be - turned off +2000-02-16 Richard Henderson <rth@cygnus.com> -Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com) - i386 aout changes from Bob Kukura - * Makefile.in, config.h: added i386aout support - * configure.in: fixed /h-{myhost} typo - * ldgram.y: -MM now gives more boring map. - * ldlang.c: now does D_PAGED flag the right way. - * ldsym.c: -MM flags does the right thing. + * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION. -Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com) +2000-02-16 Timothy Wall <twall@cygnus.com> - * configure.in: Fixed typo. Also, a fix for hp300bsd. - * ldlang.c (init_os): Compensate for BFD change, - where bfd_make_section now returns NULL for a duplicate - section request, instead of the old section. + * mri.c (mri_draw_tree): Add default LMA region argument to call + to lang_leave_output_section_statement. + * ldlang.h: Update prototypes with LMA region arguments. + * ldlang.c (lang_size_sections): Encapsulate region bounds + checking in os_check_region call. + (os_check_region): New function. + (lang_output_section_statement_lookup): Initialize lma_region. + (lang_leave_output_section_statement): Add LMA region argument. + (lang_leave_overlay): Ditto. + * ldgram.y: Handle LMA region syntax. + * ld.texinfo (Output Section Description): Describe LMA region usage. + * emultempl/armelf.em (gld$place_orphan): Add default value for + lma region in call to lang_leave_output_section_statement. + * emultempl/elf32.em (gld$place_orphan): Add default value for + lma region in call to lang_leave_output_section_statement. + * emultempl/pe.em (gld$place_orphan): Add default value for + lma region in call to lang_leave_output_section_statement. -Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com) - * ldver.c: Bump to version 1.91 (consistent with binutils). +2000-02-04 Timothy Wall <twall@redhat.com> -Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com) + * ldlang.c (lang_check_section_addresses): Use bytes instead of + octets when calculating section end addresses. - * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h, - ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h, - ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h, - ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c: - Add or update copyright notices. +2000-02-04 Timothy Wall <twall@redhat.com> -Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com) + * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation. - * README: New file. - * Makefile.in: Changed installation directory name scheme - to be consistent with gcc. Also changed 'install'. +2000-02-03 Timothy Wall <twall@redhat.com> -Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com) + * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not + octet count. + * ld/ldlang.c (print_input_section, print_data_statement, + print_reloc_statement, print_padding_statement): Print target + address values and section sizes as bytes, not octets. + (insert_pad) Calculate padding size in octets, and adjust "dot" + by bytes. + (size_input_section) Always adjust "dot" by bytes, not octets. + (lang_check_section_addresses, lang_do_assignments) Adjust + "dot" by bytes, not octets. Use the larger of the directive size + or octets_per_byte for the number of octets actually allocated in + the output section. + (lang_set_startof) Make sure STARTOF returns a target address. + (lang_one_common) Record size changes in octets. + (lang_abs_symbol_at_end_of) Section end symbol's value is + recorded in target bytes. + * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc. + to be clear about behavior when an octet is smaller than one byte. - * Makefile.in: new targets ld.mm, ld.me +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> -Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com) + * ldcref.c (output_cref): Don't pass message strings to printf + as format arg. + Update copyright. - * Makefile.in, ldtemplate: Need to use separate scripts - for -n and -N options. Yet more complication. + * ldmisc.c (vfinfo): Same here. + Update copyright. -Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com) +2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au> - * Makefile.in: Avoid using $< in explicit Make rules (it doesn't - work). Add some lines to avoid Sun Make VPATH bugs. + * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em, + generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em, + mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct): + Add missing NULL initialisers, and comments. -Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com) + * testsuite/ld-srec/sr3.cc (__rethrow): New. - * news.sc: Add alignment for data segment. - * ldtemplate: Add (yet another) script to get for -n or -N - options. (These need different alignment than ZMAGIC files.) - * Makefile.in: Add stuff for new foo.xn scripts. - These are generated by replacing "ALIGN(0x...00)" by ".". +2000-01-21 Nick Clifton <nickc@cygnus.com> -Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com) + * ldlang.c (lang_size_sections): Fix typo in comment. - * Makefile.in: new targets ld.ms, ld-index.ms - ld.texinfo: remove tabs, other cleanups for texi2roff +2000-01-18 H.J. Lu <hjl@gnu.org> -Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com) + * ldlang.c (lang_size_sections): Also update the current + address of a region if the SEC_NEVER_LOAD bit is not set. - * ldmain.c (main): Make config.magic_demand_paged be true - by default. Don't the WP_TEXT and D_PAGED flags of - output_bfd here; it's too late, so set it when output_bfd - is created (in ldlang.c). Also fix setting of EXEC_P flag - * ldlang.c (ldlang_open_output): Set output_bfd->flags here. - * ldlang.c: Remove some duplicate extern declarations. - * ldgram.y: Fixes to -N and -n options. - * Makefile.in: Recognize upper case letters in sed script - to remove assignments from script files. - * ldtemplate: Don't assukme that -N or -n options - imply use of -r script. - * mkscript.c: Tweaking to correctly handle \n and \\ in input. +2000-01-10 Philip Blundell <pb@futuretv.com> -Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com) + * configure.tgt (arm*-*-conix*): New target. - * ldtemplate: include bfd.h before sysdep.h. +2000-01-07 Nick Clifton <nickc@cygnus.com> -Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com) + * ld.texinfo (Options): Remind users to preceed linker command + line switches with -Wl, (or whatever is appropriate) if it is + being invoked by a comnpiler driver program. + Fix description of the behaviour of the -n command line switch. - Restructure configuration scheme for bfd, binutils, ld. +Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com> - * include/sys/h-*.h: Move to bfd/hosts/h-*.h. - * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h. - Change some config names to match other dirs. - * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO() - get defined first. - * config/: Rename some config files to match up h-*.h names. - Remove all the HOST_SYS definitions from the config files. + * ld.h (wildcard_spec): Change exclude_name to exclude_name_list. + (name_list): New. + * ld.texinfo (EXCLUDE_FILE): Update documentation. + * ldgram.y (wildcard_spec): Support a list of excluded_files. + (exclude_name_list): New. + ldlang.c (walk_wild_section): Support list of excluded files. + (print_wild_statement): Likewise. + (lang_add_wild): Likewise. + * ldlang.h (lang_wild_statement_type): Likewise. + * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support. -Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com) +2000-01-04 Mumit Khan <khan@xraylith.wisc.edu> - * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean. - * ldtemplate: Remove ldfile_add_library_path calls; - just use the SEARCH_DIR commands in the script files. - * Makefile.in: Add LIB_PATH macro, which if set is used to replace - the SEARCH_DIR commands in the scripts (using ugly sed magic). - This is primarily intended for cross-linking, where you would - place libaries in a different place than native libraries. - Also, emulations made from ldtemplate now use $(srcdir). - * ldglda29k.sc: Change SEARCH_DIR commands to a conventional - form; people can use the Makefile's LIB_PATH to override. + * pe-dll.c (pe_dll_warn_dup_exports): New variable. + (process_def_file): Use. + (pe_dll_compat_implib): New variable. + (make_one): Use. -Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com) + * pe-dll.h: Add exports of pe_dll_warn_dup_exports and + pe_dll_compat_implib. - * Makefile.in: fix target ld.dvi, add target ld.info - ld.texinfo: make info filename ld.info + * emultempl/pe.em (longopts): Add warn-duplicate-exports and + compat-implib options. + (gld_${EMULATION_NAME}_list_options): List new options. + (gld_${EMULATION_NAME}_parse_args): Handle. -Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com) + * pe-dll.c (pe_dll_generate_implib): Use the correct name for output + dll. - * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun - Make). - * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a - few BFD types & enums. + * deffilep.y (opt_name): Allow "." in name. +For older changes see ChangeLog-9899 Local Variables: mode: change-log diff --git a/contrib/binutils/ld/ChangeLog-9197 b/contrib/binutils/ld/ChangeLog-9197 new file mode 100644 index 0000000..a89a4ca --- /dev/null +++ b/contrib/binutils/ld/ChangeLog-9197 @@ -0,0 +1,7576 @@ +Sun Dec 21 12:51:49 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldexp.c (fold_name): Don't crash if the symbol is defined in a + section with no output section, such as a shared library section. + +Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Keep track of where we are in the option + parsing before calling ldemul_parse_args, so that we don't call it + multiple times on the same argument and confuse the getopt + internals. + +Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com> + + * configure.tgt (d30v-elf-*): Rename d30velf_e to d30v_e and + d30velf_o to d30v_o to work in DOS environments. + * Makefile.{am,in}: Ditto. + + * emulparams/d30v_{o,e}: Rename from d30velf_{o,e}. + * emulparams/d30velf_{o,e}: Deleted. + +Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com> + + * scripttempl/armcoff.sc: Add glue sections (code taken from Arm + branch). + + * emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff. + + * emultempl/armcoff.em: New file, imported from Arm branch. + +Wed Dec 10 14:10:44 1997 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfd30v.sc: Add .rel and .rela sections for all + defined sections. Set up __{D,C}TOR_{LIST,END}__. Add onchip and + external memory sections for rodata. Delete .string, .rodata1, + and .data1 sections. + +Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com> + + * Makefile.am: Add Oct 23 changes to Makefile.in here. + + * Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o. + + * Makefile.{am,in}: (ALL_EMULATIONS): Add etic80coff.o. + + * Makefile.{am,in}: (ALL_EMULATIONS): Add ed30velf{,_e,_o}.o. + (ed30velf_e.c): Like d30velf, except .text/.data/etc always go in + external memory. + (ed30velf_o.c): Like d30velf, except .text/.data/etc always go in + onchip memory. + + * emulparams/d30velf.sh (STACK_START_ADDR): Top of default + stack. + ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas. + ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and + .bss should go in. + + * emulparams/d30velf_{e,o}.sh: New files to be explicit whether + .text, .data, etc go in external memory or onchip memory. + + * configure.tgt (d30v-*-*ext*): New configuration to default + .text, .data, etc. in external memory. + (d30v-*-*onchip*): New configuration to default .text, .data, + etc. in onchip memory. + (d30v-*-*): Add d30velf_{e,o} emulations. + + * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in + either the onchip text/data areas or the external memory area. + (MEMORY): Get sizes from d30velf.sh. + (.e{data,text,bss}): Put sections in the external memory region. + (.stext): Put section in the onchip text region. + (.s{data,bss}): Put sections in the onchip data region. + (__stack): Assign from ${STACK_START_ADDR}. + (.text): Put in ${TEXT_MEMORY} memory region. + (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory + region. + (.bss): Put in ${BSS_MEMORY} memory region. + +Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com> + + * configure.tgt (targ_extra_emuls): Add support for Thumb target. + +Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlex.l: Don't define hex_mode. Correct number regexp to not + accept hex digits without a leading $ or 0x. Handle leading $ + correctly. Pass 0 rather than hex_mode to bfd_scan_vma. + * ldlex.h (hex_mode): Don't declare. + +Sun Nov 16 20:16:45 1997 Michael Meissner <meissner@cygnus.com> + + * emulparams/d30velf.sh ({DATA,EMEM}_START_ADDR): Define as start + of internal data area and external memory on chip. + + * scripttempl/elfd30v.sc: Define a MEMORY region that describes + the 3 regions of memory on the chip. Put .text/.init/.fini into + the text memory region, put other segments into the data memory + region. Add more of the standard elf sections. Default __stack + to be 0x20008000, which is 1 byte beyond end of the internal data + region. + +Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com> + + * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd + variant. + +Sun Nov 2 14:51:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu> + + * configure.host (alpha*-*-linux*): Correct HOSTING_CRT0. Set + HOSTING_LIBS. + +Thu Oct 30 12:25:55 1997 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (args_type): Add warn_mismatch field. + * ldmain.c (main): Initialize warn_mismatch field. + * lexsup.c (parse_args): Handle --no-warn-mismatch option. + * ldlang.c (ignore_bfd_error): New static function. + (lang_check): If warn_mismatch is false, don't warn about + mismatched input files. + * ld.texinfo, ld.1: Document new option. + +Thu Oct 23 14:38:18 1997 Nick Clifton <nickc@cygnus.com> + + * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack' + to avoid conflicts with C code which is defining a variable called + 'stack'. + +Thu Oct 23 00:57:45 1997 Richard Henderson <rth@dot.cygnus.com> + + * Makefile.in (ALL_EMULATIONS): Move eelf64_sparc.o ... + (ALL_64_EMULATIONS): ... here. + (eelf64_sparc.c): Template should be elf32 not generic. + * emulparams/elf64_sparc.sh (TEMPLATE_NAME): New definition. + +Thu Oct 23 00:44:20 1997 Richard Henderson <rth@dot.cygnus.com> + + * configure.tgt: Add sparc64-*-linux*. + * emulparams/elf64_sparc.sh (GENERATE_SHLIB_SCRIPT, NOP): New. + +Wed Oct 22 11:29:25 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Put .eh_frame in .rdata. + +Fri Oct 17 00:00:13 1997 Richard Henderson <rth@cygnus.com> + + * ldlang.c (lang_register_vers_node): Only check globals<=>locals, + since we need to be able to export different versions of the same + symbol. + +Wed Oct 15 14:52:36 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Put .stab and .stabstr sections at end. + +Wed Oct 8 12:37:05 1997 Richard Henderson <rth@cygnus.com> + + * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*; + config.guess now recognizes alphaev5 etc. + +Fri Oct 3 14:23:02 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat + -s and -u as -static and -unix. + +Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wild_doit): Rewrite flag handling for clarity. If we + are not adding the first input section, and SEC_READONLY is clear + on the output section, then don't copy it from the input section. + If SEC_READONLY is not set on the input section, then clear it on + the output section. + + * configure.tgt (mips*-sgi-irix[56]*): Use elf32bsmip rather than + elf32bmip. + (mips*el-*-linux*): Change elf32lmip to elf32lsmip and elf32bmip + to elf32bsmip. + (mips*-*-linux*): Likewise. + * emulparams/elf32bsmip.sh: New file; just like elf32bmip.sh, but + setting ENTRY to __start. + * emulparams/elf32lsmip.sh: New file; just like elf32lmip.sh, but + setting ENTRY to __start. + * scripttempl/elf.sc: Always set ENTRY to _start if it was not + already set. + +Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com> + + * emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New + Variables. + + * scripttempl/v850.sc: Move read only areas out of zero and small + data sections and into their own sections. + +Wed Sep 24 16:59:15 1997 Joel Sherrill <joel@oarcorp.com> + + * configure.tgt (sh*-*-rtems*): New target, like sh-*-elf*. + +Wed Sep 24 11:33:14 1997 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Section Options): Improve documentation of NOLOAD + directive. + + * aclocal.m4: Rebuild with new libtool. + * configure: Rebuild. + +Mon Sep 22 17:24:06 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wild_doit): Revert patch of September 3. + +Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com> + + * Makefile.am, Makefile.in: Add rule for ev850.c + * configure.tgt (targ_extra_emuls): Add v850 target. + +Wed Sep 17 16:43:39 1997 Nick Clifton <nickc@cygnus.com> + + * emulparams/v850.sh (CALL_TABLE_START_ADDR): New entry. + * scripttempl/v850.sc: Add call table data area + +Mon Sep 15 11:29:13 1997 Ken Raeburn <raeburn@cygnus.com> + + Merge change from Martin Hunt: + + * scripttempl/elfd30v.sc: Put .rodata in the .text section. + +Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com> + + * ldlang.c (lang_memory_region_lookup): Remove extraneous + initialization of p. + +Thu Sep 4 09:03:33 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): In + expression produced for -bpT and -bpD options, align to a 32 byte + boundary rather than an 8 byte boundary. + * scripttempl/aix.sc: Put .tocbss at start of .bss section. + + * ldmisc.h, ldmisc.c, ldcref.c: Rename finfo to lfinfo, to avoid + function name conflict with AIX 4.2 unistd.h header file. + +Wed Sep 3 15:12:32 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wild_doit): Clear SEC_HAS_CONTENTS from a + noload_section. + +Fri Aug 29 00:32:31 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (ld_new_DEPENDENCIES): Remove @LEXLIB@. + * Makefile.in: Rebuild. + +Thu Aug 28 10:12:10 1997 Doug Evans <dje@canuck.cygnus.com> + + * configure.tgt (arc-*-elf*): Recognize. + * Makefile.am (ALL_EMULATIONS): Add earcelf.o. + * Makefile.in: Regenerate. + * emulparams/arcelf.sh: New file. + +Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wildcardp): Don't let a backslash by itself cause a + pattern to be treated as a wildcard pattern. + + * ldgram.y (atype): Accept parentheses with no type. + + * ld.texinfo (Section Definition): Clarify use of whitespace. + (Section Placement): Likewise. + +Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com> + + * configure.tgt (targ_extra_emuls): Add support for v850e target. + +Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com> + + * configure.tgt (targ_extra_emuls): Add support for v850e target. + +Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (ld.info): Change dependency from + $(BFDDIR)/doc/bfdsumm.texi to bfdsumm.texi. + (ld.dvi): Likewise. + (bfdsumm.texi): New target. + (CLEANFILES): Add bfdsumm.texi. + * Makefile.in: Rebuild. + + * Makefile.am: New file, based on old Makefile.in. + * acinclude.m4: New file, from old aclocal.m4. + * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove + shared library handling; now handled by libtool. Replace + AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC, + AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE, + AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT. + * configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR. + * acconfig.h: Mention PACKAGE and VERSION. + * stamp-h.in: New file. + * ldver.c (ld_program_version): Set ld_program_version from + VERSION. + * ldgram.y, ldlex.l: Replace VERSION with VERSIONK. + * Makefile.in: Now built with automake. + * aclocal.m4: Now built with aclocal. + * configure, config.in: Rebuild. + +Mon Jul 28 19:04:50 1997 Rob Savoye <rob@chinadoll.cygnus.com> + + * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for + win32 dependencies. + * configure: Regenerated with autoconf 2.12. + * Makefile.in: Add $(EXEEXT) to executable. + +Tue Jul 22 18:50:38 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE> + + * emulparams/i386go32.sh (OUTPUT_FORMAT): Set to "coff-go32". + (SEGMENT_SIZE): Set to 0x200. + * scripttempl/i386go32.sc: Rewrite. + * configure.tgt (i[3456]86-*-msdosdjgpp*): New target. + +Mon Jul 7 12:39:42 1997 Ian Lance Taylor <ian@cygnus.com> + + From Manfred Hollstein <manfred@s-direktnet.de>: + * configure.host (i[3456]86-*-linux*libc1*): Renamed from + i[3456]86-*-linux*. + (i[3456]86-*-linux*): New host. + +Thu Jun 26 13:54:03 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Put .rsrc after .reloc. Put input .rsrc + sections in the output .rsrc section. + +Wed Jun 25 12:48:41 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure.host (m68*-*-linux*libc1*): Renamed from + `m68*-*-linux*'. + (m68*-*-linux*): New configuration for use with GNU libc 2. + +Mon Jun 16 19:18:21 1997 Geoff Keating <geoffk@ozemail.com.au> + + * scripttempl/elfppc.sc: Correct .rela.sdata entries. + + * scripttempl/elfppc.sc: Put the PLT between the small and large + BSS segments. + * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A + program base of 0x02000000 is recommended...' because otherwise + shared libraries are less efficient. We use 0x01800000 because + otherwise it's impossible to branch to location 0, for instance if + you have an undefined weak symbol. + +Mon Jun 16 12:49:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu> + + * ldlang.c (lang_place_undefineds): Add \n in einfo call. + (lang_size_sections): Likewise. + * ldlex.l: Likewise. + * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Likewise. + * emultempl/mipsecoff.em (gld${EMULATION_NAME}_after_open): + Likewise. + (check_sections): Likewise. + (gld${EMULATION_NAME}_after_allocation): Likewise. + * emultempl/pe.em (gld_$${EMULATION_NAME}_before_allocation): + Likewise. + * mpw-eppcmac.c (gldppcmacos_read_file): Likewise. + * mpw-idtmips.c (gldmipsidt_after_open): Likewise. + (check_sections): Likewise. + (gldmipsidt_after_allocation): Likewise. + + * ldemul.c (ldemul_choose_mode): Remove unused einfo argument. + +Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of + the import list. + +Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't + crash if an output section has no BFD section. + +Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com> + + * lexsup.c (ld_options): Add entry for the new "task-link" option. + (parse_args): Handle the "task-link" option. + (OPTION_TASK_LINK): Add define. + +Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Correct check of fclose return value when + handling --force-exe-suffix. + +Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_check): Add test of the return value from the + call to bfd_merge_private_bfd_data(). + +Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elfmips.sc: Remove. + * scripttempl/elf.sc: Set ENTRY based on target. Permit + TEXT_DYNAMIC to control .dynamic segment. Permit + SHLIB_TEXT_START_ADDR to set start of shared object. Support + INITIAL_READONLY_SECTIONS. Put .stub in .text. Only put + .gnu.linkonce.t* in .text when relocating. Support + OTHER_TEXT_SECTIONS. Support SHLIB_DATA_ADDR as well as + DATA_ADDR. Support OTHER_GOT_SYMBOLS and OTHER_GOT_SECTIONS. + * emulparams/elf32b4300.sh (SCRIPT_NAME): Set to elf. + (DATA_ADDR): Don't set. + (INITIAL_READONLY_SECTIONS): Rename from OTHER_READONLY_SECTIONS. + (OTHER_TEXT_SECTIONS): Set. + (OTHER_GOT_SECTIONS): Rename from OTHER_READWRITE_SECTIONS. + (MACHINE): Set to empty string. + * emulparams/elf32l4300.sh: Likewise. + * emulparams/elf32ebmip.sh: Likewise. + * emulparams/elf32elmip.sh: Likewise. + * emulparams/elf32bmip.sh: Likewise. Also: + (TEXT_DYNAMIC): Set. + * emulparams/elf32lmips.sh: Likewise. + * Makefile.in (eelf32bmips.c): Depend upon elf.sc rather than + elfmips.sc. + (eelf32ebmips.c, eelf32elmips.c, eelf32lmip.c): Likewise. + +Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * scripttempl/elf.sc: Don't align the data segment on the next 8 + byte boundary, instead let the linker use whatever the individual + sections require. + +Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support. + +Tue May 6 13:21:19 1997 Ian Lance Taylor <ian@cygnus.com> + + From Sean McNeil <sean@mcneil.com>: + * emultempl/pe.em (sort_by_file_name): Sort by archive name + first. + (sort_sections): Sort all sections, not just sections in the same + archive. + +Mon May 5 18:19:55 1997 Philip Blundell <pjb27@cam.ac.uk> + + * configure.tgt, configure.host: cope with '*-*-linux-gnuaout' + targets. + +Fri May 2 15:54:28 1997 Mike Meissner <meissner@cygnus.com> + + * scripttempl/tic80coff.sc (.text): Add a leading underscore to + __{D,C}TOR_{LIST,END}__ definations. Rearrange the order of items + in the .text section. Move .const, .ctors, .dtors into separate + sections. + +Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de> + + * scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace + around assignment of current location pointer. + +Thu Apr 17 13:07:18 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldctor.c (ldctor_build_sets): Make sure the set is aligned + appropriately. + +Tue Apr 15 13:19:26 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (INSTALL): Set to @INSTALL@. + (INSTALL_XFORM, INSTALL_XFORM1): Remove. + (install): Depend upon ld.new and installdirs. Use + $(program_transform_name) directly, rather than using + $(INSTALL_XFORM) and $(INSTALL_XFORM1). + (installdirs): New target. + (install-info): Run mkinstalldirs. + +Mon Apr 14 12:06:15 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (INSTALL): Change install.sh to install-sh. + + From Thomas Graichen <graichen@rzpd.de>: + * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub. + * configure: Rebuild. + +Fri Apr 4 11:42:41 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em: Include "libiberty.h". + (sort_sections_1): Use xmalloc rather than alloca. + + * ldlex.l: Recognize SQUAD. + * ldgram.y (length): Add SQUAD. + * ldctor.c (ldctor_build_sets): Use SQUAD for a signed 8 byte + reloc. + * ldlang.c (print_data_statement): Handle SQUAD. + (lang_size_sections, lang_do_assignments): Likewise. + * ldexp.c (exp_print_token): Add SQUAD to table. + * ldwrite.c (build_link_order): Handle SQUAD. + * ld.texinfo (Section Data Expressions): Document SQUAD. + +Thu Apr 3 13:19:40 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldver.c (ld_program_version): Set to 2.8.1. + + * Branched binutils 2.8. + +Wed Apr 2 11:55:27 1997 Ian Lance Taylor <ian@cygnus.com> + + * mpw-idtmips.c: Rename from mpw-emipsidt.c. + * mpw-elfmips.c: Rename from mpw-emipself.c. + * mpw-config.in: Update accordingly. + + * ldlang.c (lang_process): Call lang_check immediately after + opening the input files, rather than at the end of the link. + +Mon Mar 31 23:44:00 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (init): Fully bracket initializer. + (set_pe_stack_heap): Remove locals begin_commit and end. + (gld_${EMULATION_NAME}_after_open): Remove unused local i. + (gld${EMULATION_NAME}_place_orphan): Remove unused local ptr. + +Mon Mar 31 16:35:51 1997 Joel Sherrill <joel@oarcorp.com> + + * configure.tgt (hppa*-*-rtems*): New target, like hppa-*-*elf*. + +Fri Mar 28 15:29:23 1997 H.J. Lu <hjl@gnu.ai.mit.edu> + + Contributed by David S. Miller <davem@caip.rutgers.edu>: + * configure.tgt (sparc*-*-linuxaout*): New target. + (sparc*-*-linux*): New target. + * emulparams/sparclinux.sh: New file. + * Makefile.in (ALL_EMULATIONS): Add esparclinux.o. + (esparclinux.c): New target. + +Fri Mar 28 14:30:12 1997 Ian Lance Taylor <ian@cygnus.com> + + From Ralf Baechle <ralf@gnu.ai.mit.edu>: + * configure.tgt: Set targ_extra_emuls for mips*el-*-linux* and + mips*-*-linux*. Use elf32bmip and elf32lmip, not elf32ebmip and + elf32elmip. + +Thu Mar 27 17:14:32 1997 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Update copyright date in version + message. + +Fri Mar 21 12:28:41 1997 Philippe De Muyter <phdm@info.ucl.ac.be> + + * emulparams/delta68.sh (OUTPUT_FORMAT): Set to "coff-m68k-sysv". + +Tue Mar 18 11:16:23 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in: Rebuild dependencies. + + * emultempl/aix.em: Include "obstack.h". + +Mon Mar 17 19:26:06 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c: Include "obstack.h". + +Sat Mar 15 23:23:46 1997 Fred Fish <fnf@cygnus.com> + + * configure.tgt (powerpc-*-beos*): Use aixppc for targ_emul. + +Sat Mar 15 18:10:38 1997 H.J. Lu <hjl@lucon.org> + + * ldemul.h (ldemul_list_emulations): Use full prototype. + * ldlang.c (print_one_symbol): Add declaration. + * ldlang.h (dprint_statements): Declare. + * ldmain.c (remove_output): Declare. + * ldmisc.c (vfinfo): Declare. + * ldwrite.c (clone_section): Declare. + (split_sections): Make static. Declare. + * mri.c: Include libiberty.h. + (strdup): Don't declare. + (mri_alias): Use xstrdup rather than strdup. + +Fri Mar 14 21:30:06 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elfmips.sc: Change handling of data area when + generating a shared library to not skip a large block of memory. + From Per Fogelstrom <pefo@cvs.openbsd.org>. + +Wed Mar 12 21:33:09 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (multiple_definition): Only skip the warning if the + output section is absolute when the input section is not + absolute. + + * ldlex.l: Accept whitespace in VERS_START state. Warn about + invalid characters in VERS_* states. + +Tue Mar 11 13:51:31 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Don't let a + trailing space lead us to think that there is a zero address. + +Sun Mar 9 23:06:35 1997 Eric Youngdale <eric@andante.jic.com> + + * ldgram.y (vers_node): Correct typo of '(' for '{'. + +Fri Mar 7 18:40:12 1997 Fred Fish <fnf@cygnus.com> + + * scripttempl/tic80coff.sc (ENTRY): Entry symbol is __start + rather than _start. + (__edata): Define this rather than "edata". + (__end): Define this rather than "end". + +Tue Mar 4 17:18:35 1997 Michael Meissner <meissner@cygnus.com> + + * configure.tgt (tic80-*-*): Allow dropping of -coff. + +Sun Mar 2 22:59:49 1997 Fred Fish <fnf@cygnus.com> + + * Makefile.in (ld.dvi): Set MAKEINFO environment variable as well + as TEXINPUTS. Needed for building in separate build dir. + * ldint.texinfo (SCRIPT_NAME): Fix typo. + * emulparams/tic80coff.sh: Rewrite to include internal documentation + about each shell variable that is set (or not set). + * scripttempl/tic80coff.sc: Complete rewrite. + +Fri Feb 28 17:42:27 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Call bfd_set_default_target. + * Makefile.in (ldmain.o): Define TARGET when compiling. + +Thu Feb 27 11:41:03 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Don't initialize link_info.lprefix or + link_info.lprefix_len. + * emultempl/hppaelf.em (hppaelf_before_parse): Likewise. + + * emultempl/m88kbcs.em: Remove. + * emulparams/m88kbcs.sh (TEMPLATE_NAME): Don't set. + * Makefile.in (em88kbcs.c): Depend upon generic.em rather than + m88kbcs.em. + + * mri.c (mri_draw_tree): Pass noload_section, not SEC_NEVER_LOAD, + to lang_enter_output_section_statement. From Mark Rasin + <mark.rasin@telrad.co.il>. + +Wed Feb 26 11:51:44 1997 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_one_common): Clear SEC_IS_COMMON from common + section. + +Tue Feb 25 20:38:11 1997 Stan Shebs <shebs@andros.cygnus.com> + + * configure.tgt (mips*-*-lnews*): New target. + * Makefile.in (emipslnews.c): New target. + * emulparams/mipslnews.sh: New file. + +Tue Feb 25 16:04:09 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (hold_interp): New static variable. + (gld${EMULATION_NAME}_place_orphan): Put loadable .note sections + after hold_interp. Choose a unique output section name. + (gld${EMULATION_NAME}_place_section): Don't set hold_use if the + SEC_LOAD or SEC_ALLOC flags differ. Set hold_interp. + +Mon Feb 24 18:16:09 1997 Ian Lance Taylor <ian@cygnus.com> + + From Eric Youngdale <eric@andante.jic.com>: + * ldlex.l (V_TAG, V_IDENTIFIER): New macros. + (VERS_START, VERS_SCRIPT, VERS_NODE): New states to parse version + information. + (ldlex_version_script, ldlex_version_file): New functions. + * ldlex.h (enum input_enum): Add input_version_script. + (ldlex_version_script): Declare. + (ldlex_version_file): Declare. + * ldgram.y (%union): Add deflist, versyms, and versnode. + (VERS_TAG, VERS_IDENTIFIER): New terminals. + (GLOBAL, LOCAL, VERSION, INPUT_VERSION_SCRIPT): New terminals. + (file): Accept INPUT_VERSION_SCRIPT. + (ifile_p1): Accept version. + (version_script_file): New nonterminal. + (version, vers_nodes, vers_node): Likewise. + (verdep, vers_tag, ver_defns): Likewise. + * ldlang.c (lang_elf_version_info): New global variable. + (lang_new_vers_regex): New function. + (lang_new_vers_node): New function. + (version_index): New static variable. + (lang_register_vers_node): New function. + (lang_add_vers_depend): New function. + * ldlang.h (lang_elf_version_info): Declare. + (lang_new_vers_regex, lang_new_vers_node): Declare. + (lang_add_vers_depend, lang_register_vers_node): Declare. + * lexsup.c (OPTION_VERSION_SCRIPT): Define. + (ld_options): Add "version-script". + (parse_args): Handle OPTION_VERSION_SCRIPT. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): + Pass lang_elf_version_info to size_dynamic_sections. + * scripttempl/elf.sc: Add .gnu.version sections. + * ld.texinfo: Document symbol versioning. + +Fri Feb 21 17:37:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com> + + * Makefile.in (ed30velf.c): New target. + * configure.tgt (d30v-*-*): New target. + * emulparams/d30velf.sh: New file. + * scripttempl/elfd30v.sc: New file. + +Fri Feb 14 18:28:31 1997 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Option Commands): Document the INCLUDE command. + +Thu Feb 13 20:31:37 1997 Philippe De Muyter <phdm@info.ucl.ac.be> + + * configure.in: Call BFD_NEED_DECLARATION on getenv. + * acconfig.h (NEED_DECLARATION_GETENV): New macro. + * sysdep.h (getenv): Declare if NEED_DECLARATION_GETENV. + * ldemul.c (ld_emul_default_target): Do not cast getenv return + value. + * ldmain.c (get_emulation): Likewise. + * configure, config.in: Rebuild. + +Tue Feb 11 15:34:26 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elfmips.sc: When relocating, put .mips16.fn.* and + .mips16.call.* in .text. + +Sun Feb 9 18:09:13 1997 Fred Fish <fnf@cygnus.com> + + * emulparams/tic80coff.sh: New (dummy) file for TIc80. + * scripttempl/tic80coff.sc: New (dummy) file for TIc80. + * Makefile.in (etic80coff.c): Add target and rule to build it. + * configure.tgt (tic80-*-coff): Set targ_emul to tic80coff. + +Fri Jan 31 13:16:53 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Search for + ".so" in the name, not ".so.". + (gld${EMULATION_NAME}_search_dir): Accept a plain .so file. + + * Makefile.in (ld.info): Add -I$(srcdir). From Alan Modra + <alan@spri.levels.unisa.edu.au>. + +Thu Jan 30 11:31:52 1997 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em: Include <ctype.h>. + (gld${EMULATION_NAME}_find_so): Skip the directory name when + searching for ".so.". + (gld${EMULATION_NAME}_search_dir): Make sure that the library name + has a version number, and that only version numbers follow .so. + +Wed Jan 29 18:15:00 1997 Geoffrey Noer <noer@cygnus.com> + + * scripttempl/pe.sc: + * scripttempl/ppcpe.sc: add *(.gcc_except_table) to the text + section so Win32 executables are valid. + +Mon Jan 27 12:28:43 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Put linkonce reloc section in other + appropriate reloc sections. + * scripttempl/elfmips.sc: Add linkonce support. + * scripttempl/elfppc.sc: Likewise. + +Fri Jan 24 10:44:09 1997 Jeffrey A Law (law@cygnus.com) + + * emulparms/mn10200.sh (OTHER_RELOCATING_SECTIONS): Move the + stack up to 0x80000. + * emulparms/mn10300.sh (OTHER_RELOCATING_SECTIONS): Likewise. + +Tue Jan 21 12:11:10 1997 Doug Evans <dje@seba.cygnus.com> + + * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Use PROVIDE + to define `_stack'. + +Thu Jan 16 17:07:52 1997 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (args_type): Rename auxiliary_filter_shlib to + auxiliary_filters, and make it char **. + * lexsup.c (parse_args): Handle -f by setting up an array. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use + new name of auxiliary_filters. + + * ld.texinfo (Options): Improve documentation of --filter and + --auxiliary. + +Tue Jan 14 15:44:28 1997 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Options): Clarify that the normal usage is -T. + (Commands): Likewise. + +Thu Jan 9 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/armcoff.sc: Correct mask used for .data address. + +Wed Jan 8 15:14:59 1997 Geoffrey Noer <noer@cygnus.com> + + * emultempl/pe.em: make default executable a.exe instead of + a.out + +Fri Jan 3 17:33:34 1997 Richard Henderson <rth@tamu.edu> + + * scripttempl/elf.sc: Move .got closer to .sdata and .sbss by + shifting .plt back. Rumour has it that the NetBSD ld.so depends + on .dynamic being after .got, so we leave that. + +Fri Jan 3 14:04:40 1997 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (clean): Don't remove configdoc.texi. + (maintainer-clean): Do remove configdoc.texi. + + * ld.texinfo (Operators): Remove '@' from @smallexmple in comment + to avoid confusing texi2roff. + +Fri Jan 3 11:27:02 1997 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/v850.sc (.zdata): Add .zcommon section. + (.tdata): Add .tcommon and .tcommon_byte sections. + +Thu Jan 2 18:14:32 1997 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (mips*el-*-linux*, mips*-*-linux*): New targets. + * scripttempl/elfmips.sc: Use __start as the entry address for + mips*-*-linux*. + +Tue Dec 31 14:48:30 1996 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE. + + * ld.h (args_type): Add filter_shlib and auxiliary_filter_shlib + fields. + * lexsup.c (parse_args): Recognize --auxiliary/-f and + --filter/-F. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): + Pass filter_shlib and auxiliary_filter_shlib to + size_dynamic_sections. + * ld.texinfo, ld.1: Document --filter/-F and --auxiliary/-f. + +Mon Dec 30 13:55:57 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections. + +Wed Dec 18 22:57:35 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-make.sed: Use NewFolderRecursive for installation. + +Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/v850.sc: Make sure __{e,g}p start relative to the + {s,t}data sections. Do not emit any linker generated symbols if + -r. Use {TEXT,{Z,S,T}DATA}_START_ADDR variables to initialize + where the different sections go. Change some whitespace. + + * emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define + appropriately. Remove crud not used anymore. + +Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (emn10200.c): Add dependencies. + * configure.tgt: Handle mn10200. + * emulparms/mn10200.sh: New file. + +Thu Dec 12 17:04:55 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/gld960c.em: Include <ctype.h>. + (gld960_set_output_arch): Get the machine type from the -A option + if there is one, rather than always using core. + +Sat Dec 7 10:07:51 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/mn10300.sh: Handle leading underscores. + +Thu Dec 5 13:45:58 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Only + set hold_rel if SEC_ALLOC is set. + +Tue Dec 3 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (section_already_linked): Set the output_offset as well + as the output_section when only reading symbols from a file. + +Mon Dec 2 11:43:50 1996 Ian Lance Taylor <ian@cygnus.com> + + * emulparams/*.sh: Make sure that each set of parameters which + uses the elf.sc script sets MACHINE. + +Wed Nov 27 03:22:05 1996 Jason Merrill <jason@yorick.cygnus.com> + + * scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/v850.sc: Likewise. + +Tue Nov 26 16:58:33 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure: Rebuild with autoconf 2.12. + +Mon Nov 25 12:17:55 1996 Jim Wilson <wilson@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Add case + for bfd_vma to init loop. + +Mon Nov 25 09:55:07 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/mn10300.sh: Remove bogus '_' prefix for + entry symbol and ctor/dtor stuff. + +Fri Nov 15 13:00:18 1996 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (emn10300.c): Add dependencies. + * configure.tgt: Handle mn10300. + * emulparms/mn10300.sh: New file. + +Tue Nov 5 10:57:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004. + (EMBEDDED): Define. + +Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo: Add section on reporting bugs. + + * scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__ + symbols are correctly aligned. + +Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com) + + * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and + romzbss too. + +Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * emulparams/d10velf.sh: Changes needed for D10V-EVA board. + Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to + 0x2000000. + + * scripttempl/elfd10v.sc: Fix calculation of .text. Change + .stack to start at 0x2007ffe. + +Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com> + + * configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*. + +Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com) + + * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata". + + * scriptempl/v850.sc (zdata): Make sure this stays + in lo-memory. + +Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/v850.sc (__ep): Put it at the start + of the tda section. + + * scriptempl/v850.sc: Move all "normal" sections into + the external memory region (0x100000 - 0x200000). + +Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net> + + * scripttempl/elfd10v.sc: Clone from elf.sc, move .text to + 0x10000, so that is more room for data. + + * emulparams/d10velf.sh (TEXT_START_ADDR): Now 0x100000. + (READONLY_START_ADDR): Now 0x0. + (SCRIPT_NAME): Now elfd10v. + + * Makefile.in (ed10velf.c): Depend on elfd10v.sc, not elf.sc. + +Fri Oct 18 22:12:49 1996 Doug Evans <dje@canuck.cygnus.com> + + * emulparams/m32relf.sh (TEXT_START_ADDR): Change from 0 to 0x100. + +Fri Oct 18 15:43:38 1996 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (ALL_EMULATIONS): Remove eelf64alpha.o. + (ALL_64_EMULATIONS): New variable. + * configure.in: Accept --enable-64-bit-bfd option. If it is set + with --enable-targets=all, include ALL_64_EMULATIONS in + EMULATION_OFILES. + * configure: Rebuild. + +Fri Oct 18 12:58:35 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/v850.sc (__gp, __ep): Define. + +Thu Oct 17 18:14:07 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo: Try to consistently use a single or a double dash + for each option. + +Thu Oct 17 10:17:20 1996 Doug Evans <dje@canuck.cygnus.com> + + * emulparams/m32relf.sh (EMBEDDED): Define. + +Thu Oct 17 10:56:49 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/v850.sc (.zdata): Add this before .text. + (.sdata): Also include .rosdata as part of the .sdata. + (.tdata): Include this just before .sdata. + + * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf". + * scripttempl/v850.sc: Wrap script with a "cat << EOF". + +Wed Oct 16 23:10:01 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/v850.sc: New linker script for the V850. + * Makefile.in: Use it. + +Thu Oct 10 17:57:00 1996 Ian Lance Taylor <ian@cygnus.com> + + * emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not + OTHER_READWRITE_SECTIONS. + * emulparams/elf32l4300.sh: Likewise. + +Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (ld_config_type): Add warn_section_align field. + * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define. + (ld_options): Add --warn-section-align. + (parse_args): Handle --warn-section-align. + * ldlang.c (lang_size_sections): If warn_section_align, warn if + the start of a section changes due to alignment. + * ld.texinfo, ld.1: Document --warn-section-align. + * ld.texinfo: Change some single dashes to double dashes. + + * emultempl/pe.em (set_pe_subsystem): Record entry symbol for each + subsystem type. Ifdef out os2 type. Recognize a version number. + +Tue Oct 8 12:07:13 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (set_pe_subsystem): When setting the subsystem + to windows, set the entry point. + + * Makefile.in (ldlex.c): Don't pass any options to $(LEX). + +Mon Oct 7 17:29:05 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Options): Mention .so extensions for shared + libraries. + +Sun Oct 6 22:35:36 1996 Jason Merrill <jason@yorick.cygnus.com> + + * scripttempl/elf{,mips,ppc}.sc: Add DWARF 2 sections. + +Fri Oct 4 18:49:31 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/m68kcoff.sc: Only set the address of .text if + RELOCATING. + +Fri Oct 4 10:59:52 1996 Doug Evans <dje@canuck.cygnus.com> + + * emulparams/sparcaout.sh ({BIG,LITTLE}_OUTPUT_FORMAT): Define. + * scripttempl/aout.sc ({BIG,LITTLE}_OUTPUT_FORMAT): Provide default. + (OUTPUT_FORMAT): Support bi-endian targets. + +Thu Oct 3 13:52:03 1996 Ian Lance Taylor <ian@cygnus.com> + + * fnmatch.h, fnmatch.c: Remove (now in libiberty). + * Makefile.in: Rebuild dependencies. + (CFILES): Remove fnmatch.c. + (HFILES): Remove fnmatch.h. + (OFILES): Remove fnmatch.o. + +Thu Oct 3 15:41:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) + + * Makefile.in (mostlyclean): Move config.log to distclean. + +Wed Oct 2 23:45:25 1996 Geoffrey Noer <noer@cygnus.com> + + * emultmpl/pe.em: increase size of stack reserve to 0x2000000 + (necessary in order to compile parse.c in gcc sources under NT) + +Wed Oct 2 14:49:10 1996 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (ld_options): Fix typo in --rpath-link description. + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest + --rpath if a needed library is not found. + +Tue Oct 1 16:17:33 1996 Joel Sherrill <joel@oarcorp.com> + + * configure.tgt (mips*-*-rtems*): New target, like mips*-*-elf*. + +Tue Oct 1 15:50:34 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Options): Give more detail on -l option. + + * scripttempl/elfmips.sc: Handle CREATE_SHLIB the same way that + elf.sc does, so that glibc works better. + + * ldver.c (ld_program_version): New variable. + (ldversion): Use it. + * ldver.h (ld_program_version): Declare. + * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not + --version. Change --version handling to match current GNU + standards. + (help): Print bug report address. + +Mon Sep 30 12:14:43 1996 Doug Evans <dje@canuck.cygnus.com> + + * Makefile.in (em32relf.c): Add rule for. + * configure.tgt (m32r-*-*): Recognize. + * emulparams/m32relf.sh: New file. + +Thu Sep 26 13:58:47 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-make.sed: Add symbolic doublequoting to ldmain compile edit. + * mpw-config.in: Add mips-*-* case as mips-elf, and use more + wildcards in matching. + * mpw-emipself.c: New file, pregenerated mips elf emulation. + +Tue Sep 17 12:18:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldint.texinfo: Rewrote. + + * configure.tgt: Add cases for MIPS 5000 like MIPS 4300. + +Mon Sep 16 17:55:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/armcoff.sc: Only define symbols if RELOCATING. Fix + syntax error on __end__ line. + + * scripttempl/armcoff.sc: For -N or -n, don't align .data. From + Chris Hadley <Christopher.Hadley@cl.cam.ac.uk> + +Sun Sep 15 22:09:56 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS. + +Sun Sep 15 10:38:16 1996 Mark Alexander <marka@cygnus.com> + + * emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put + stack at top of simulator memory. + +Fri Sep 13 15:49:45 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlex.l (SYMBOLCHARN): Add $, _, and ~. + +Wed Sep 11 23:30:42 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (get_emulation): Check for -mips4 like -mips1, et. al. + +Thu Sep 5 15:24:12 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (section_already_linked): Accept a lang_input_statement + as the PTR argument. If the file is symbols only, discard all + input sections. + (ldlang_add_file): Pass entry to bfd_map_over_sections. + +Wed Sep 4 15:53:43 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny + <fila@ibi.com>. + +Tue Sep 3 00:52:54 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS + +Sun Sep 1 21:48:58 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/v850.sh: Set EMBEDDED. + +Fri Aug 30 22:30:30 1996 Jeffrey A Law (law@cygnus.com) + + * emulparms/v850.sh: Entry symbol is "_start", tweak + ctor/dtor support. + +Fri Aug 30 18:32:31 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (sh-*-elf*): New target. + * emulparams/shelf.sh: New file. + * emulparams/shlelf.sh: New file. + * Makefile.in (ALL_EMULATIONS): Add eshelf.o and eshlelf.o. + (eshelf.c, eshlelf.c): New targets. + * scripttempl/elf.sc: If EMBEDDED is defined, then don't add + SIZEOF_HEADERS to TEXT_START_ADDR. Expand CTOR_START and CTOR_END + around .ctors, and DTOR_START and DTOR_END around .dtors. Expand + OTHER_RELOCATING_SECTIONS if RELOCATING. + +Thu Aug 29 16:57:46 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure.{host,tgt} (i[345]86-*-*): Recognize i686 for pentium + pro. + +Mon Aug 26 12:58:11 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (section): Add opt_nocrossrefs; pass value to + lang_enter_overlay. + (opt_nocrossrefs): New nonterminal. + * ldlex.l: Recognize NOCROSSREFS keyword in EXPRESSION mode. + * ldlang.c (overlay_nocrossrefs): New static variable. + (lang_enter_overlay): Add nocrossrefs parameter. + (lang_leave_overlay): Only add nocrossrefs if overlay_nocrossrefs + is set. Initialize overlay_nocrossrefs. + * ldlang.h (lang_enter_overlay): Update declaration. + * ld.texinfo (Overlays): Update documentation. + + * ldver.c (ldversion): Print GNU ld in the version message. + +Thu Aug 22 17:10:40 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.host: Set HLDENV. + * configure.in: Substitute HLDENV. + * configure: Rebuild. + * Makefile.in (HLDENV): New variable. + ($(LD_PROG)): Use $(HLDENV). + +Thu Aug 22 16:29:28 1996 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (ev850.c): New target. + * configure.tgt (v850-*-*): New target. + * emulparams/v850.sh: New file. + +Thu Aug 22 11:16:02 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit. + +Wed Aug 21 11:26:37 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Put .gnu.linkonce* sections in appropriate + containing sections. + +Mon Aug 19 13:01:42 1996 Ian Lance Taylor <ian@cygnus.com> + + * fnmatch.c: Include sysdep.h. + +Mon Aug 19 11:28:29 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * genscripts.sh: Undo 8/16 change. + + * emulparams/d10velf.sh (MACHINE): Explicitly set to nothing. + +Fri Aug 16 19:18:08 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * genscripts.sh: Explicitly reset any shell variables set or used + by the various .sc scripts to allow inadvertant use of these + names as normal environment variables by the person running + configure. + + * Makefile.in (ed10velf.c): Use tdir_d10v, not tdir_arcelf. + +Fri Aug 16 14:15:41 1996 James G. Smith <jsmith@cygnus.co.uk> + + * scripttempl/armcoff.sc (__bss_start__, __bss_end__, + __data_start__, __data_end__): Added to keep in sync. with the + default ARM crt0.s. Added __CTOR_LIST__ and __DTOR_LIST__ support. + +Thu Aug 8 14:24:56 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldcref.c (check_reloc_refs): If info->same, look for any symbol + defined in info->defsec, not just the section symbol. + +Wed Aug 7 14:40:48 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + + * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk. + * acconfig.h (NEED_DECLARATION_STRSTR): New macro. + (NEED_DECLARATION_SBRK): New macro. + * configure, config.in: Rebuild. + * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR. + * ldmain.c (sbrk): Declare if HAVE_SBRK and + NEED_DECLARATION_SBRK. + + * ldlang.c (lang_record_phdrs): Cast xmalloc and xrealloc return. + +Mon Aug 5 16:26:14 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlex.l: Recognize OVERLAY. + * ldgram.y: Add section_phdr field to %union. + (section): Handle phdr_opt result. Add OVERLAY case. + (opt_exp_without_type): New nonterminal. + (phdr_opt): Return list of phdrs. + (overlay_section): New nonterminal. + * ldlang.c: Include <ctype.h>. + (lang_leave_output_section_statement): Add phdrs parameter. + Change all callers. + (lang_section_in_phdr): Remove. + (overlay_vma, overlay_lmn, overlay_max): New static variables. + (struct overlay_list): Define. + (overlay_list): New static variable. + (lang_enter_overlay, lang_enter_overlay_section): New functions. + (lang_leave_overlay_section, lang_leave_overlay): New functions. + * ldlang.h (lang_leave_output_section_statement): Update + declaration for new parameter. + (lang_section_in_phdr): Don't declare. + (lang_enter_overlay, lang_enter_overlay_section): Declare. + (lang_leave_overlay_section, lang_leave_overlay): Declare. + * ld.texinfo (Overlays): New node under SECTIONS, documenting + overlays. + + * ldlex.l: Recognize MAX and MIN. + * ldgram.y (MAX, MIN): New terminals. + (exp): Recognize MAX and MIN. + * ldexp.c (fold_binary): Handle MAX and MIN. + * ld.texinfo (Arithmetic Functions): Document MAX and MIN. + + * ld.texinfo (PHDRS): Use @cindex, not @kindex, for program header + index entries. + + * ldgram.y (SIZEOF, ADDR): Do not specify type. + + * ldcref.c (check_nocrossref): Skip symbols with no output + sections. + +Fri Aug 2 14:57:49 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (LOADADDR): New terminal. + (exp): Handle LOADADDR. + * ldlex.l: Recognize LOADADDR. + * ldexp.c (exp_print_token): Add LOADADDR. + (fold_name): Implement LOADADDR. + * ldlang.c (exp_init_os): Treat LOADADDR like ADDR. + * ld.texinfo (Arithmetic Functions): Document LOADADDR. + +Thu Aug 1 12:52:19 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (check_nocrossrefs): Declare. + * ldlang.h (struct lang_nocrossref): Define. + (struct lang_nocrossrefs): Define. + (nocrossref_list): Declare. + (lang_add_nocrossref): Declare. + * ldlex.l: Recognize NOCROSSREFS keyword. + * ldgram.y (%union): Add nocrossref field. + (NOCROSSREFS): New terminal. + (ifile_p1): Recognize NOCROSSREFS. + (nocrossref_list): New nonterminal. + * ldlang.c (nocrossref_list): Define. + (lang_add_nocrossref): New function. + * ldmain.c (main): If nocrossref_list is not NULL, call + check_nocrossrefs. + (warning_callback): Free symbols if there is no place to store + them. + (notice): Call add_cref if nocrossref_list is not NULL. + * ldcref.c: Include "ldexp.h" and "ldlang.h". + (check_nocrossrefs): New function. + (check_nocrossref): New static function. + (struct check_refs_info): Define. + (check_refs, check_reloc_refs): New static functions. + * Makefile.in: Rebuild dependencies. + * ld.texinfo (Option Commands): Document NOCROSSREFS. + + * ld.texinfo (Section Placement): Improve the wording of the + wildcard documentation. Mention that wildcards are only searched + for on the command line, not in the file system. + + * emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Move + definition of lib_path inside condition where it is used. + +Wed Jul 31 13:17:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * emulparams/d10velf.sh: Now works with elf.sc. + +Wed Jul 31 11:52:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * emulparams/d10velf.sh (SCRIPT_NAME): Change to vanilla. + +Tue Jul 30 14:46:42 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_size_sections): Add the section VMA to the result + value when computing the address of a section. + + * ld.h (args_type): Add cref field. + * lexsup.c (parse_args): Set command_line.cref. + * ldmain.c (main): Check command_line.cref rather than + link_info.notice_all. + (notice): Likewise. + + * ldcref.c (output_one_cref): Don't crash if a symbol is defined + in a section without an owner. + +Mon Jul 29 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com> + + * fnmatch.h, fnmatch.c: New files. + * ldlex.l: Remove unused definition of FILENAME. Add definition + of WILDCHAR. In SCRIPT mode, accept any sequence of WILDCHAR as a + NAME. + * ldgram.y (file_NAME_list): Accept '*' and '?' specially. + (input_section_spec): Accept '?' specially. + (statement): Change exp to mustbe_exp in length and FILL cases. + (section): Call ldlex_script before section statements, and call + ldlex_popstate after them. + * ldlang.c: Include "fnmatch.h". + (wildcardp): New static function. + (wild_section): Permit the section name to be a wildcard. + (wild_file): New static function, broken out of wild. + (wild): Call wild_file. Permit the file name to be a wildcard. + (open_input_bfds): Don't call lookup_name for a wildcard pattern. + * Makefile.in: Rebuild dependencies. + (CFILES): Add fnmatch.c. + (HFILES): Add fnmatch.h. + (OFILES): Add fnmatch.o. + * ld.texinfo: Document that file and section names can now be + wildcard patterns. + + * ldlang.c (lang_place_orphans): Correct condition: place a common + section if not relocateable or if common definitions are forced. + +Wed Jul 24 12:16:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * emulparams/d10velf.sh (SCRIPT_NAME): Change to elf. + +Wed Jul 24 13:38:22 1996 Michael Meissner <meissner@wogglebug.tiac.net> + + * configure.tgt (d10v-*-*): Don't require the -elf, allow plain d10v. + +Tue Jul 23 10:36:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * Makefile.in (ed10velf.c): New target. + * configure.tgt (d10v-*-elf*): New target. + * emulparams/d10velf.sh: New file. + +Thu Jul 18 16:25:39 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (sparc*-*-sysv4*): New target. From Andrew Gierth + <ANDREWG@microlise.co.uk>. + + * configure.host: Change irix5 to irix[56]*. + * configure.tgt: Likewise. + +Wed Jul 17 10:52:46 1996 Kim Knuttila <krk@cygnus.com> + + * emultempl/pe.em (sort_sections): Pay attention to return code. + + * ldmisc.c (demangle): Remove all prefix '.'s from a name. + +Mon Jul 15 11:49:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Round + the value of __start_SECNAME to the alignment required by the + section to be placed. + +Tue Jul 9 12:09:02 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (mips*el-*-elf*): Use elf32elmip. + (mips*-*-elf*): Use elf32ebmip. + * emulparams/elf32bmip.sh (EMBEDDED): Don't define. + * emulparams/elf32lmip.sh (EMBEDDED): Don't define. + * emulparams/elf32elmip.sh: New file; copy of elf32lmip.sh with + EMBEDDED defined. + * emulparams/elf32ebmip.sh: New file; copy of elf32bmip.sh with + EMBEDDED defined. + * emulparams/elf32b4300.sh (EMBEDDED): Define. + * emulparams/elf32l4300.sh (EMBEDDED): Define. + * Makefile.in (ALL_EMULATIONS): Add eelf32ebmip.o eelf32elmip.o. + (eelf32ebmip.c, eelf32elmip.c): New targets. + +Thu Jul 4 12:01:03 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldver.c (ldversion): Set version to cygnus-2.7.1. + + * Released binutils 2.7. + + * emulparams/pc532macha.sh: Rename from pc532machaout.sh to avoid + System V file name limitations. + * configure.tgt (nc32k-pc532-mach*, ns32k-pc532-ux*): Use + pc532macha rather than pc532machaout. + * Makefile.in (ALL_EMULATIONS): Change epc532machaout.o to + epc532macha.o. + (epc532macha.c): Rename target from epc532machaout.c. + +Wed Jul 3 11:40:10 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (print_padding_statement): Use %u, not %x, to print + fill value. + +Sun Jun 30 11:16:43 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-eppcmac.c: Update to reflect May 23 change to aix.em. + +Thu Jun 27 14:03:42 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Put the .sa + file just before the .so file, rather than just after. + + * configure.host: Use -print-file-name=FILE rather than piping + -print-libgcc-file-name through sed. + (i[345]86*-*-sco*, i[345]86-*-isc*): Create crtbegin.o and + crtend.o files, in case gcc doesn't use them. + * Makefile.in (mostlyclean): Remove crtbegin.o and crtend.o. + +Wed Jun 26 15:57:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (mips*-dec-osf*): New target. + +Tue Jun 25 22:15:29 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) + + * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir, + INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values. + (docdir): Removed. + * configure.in (AC_PREREQ): autoconf 2.5 or higher. + (AC_PROG_INSTALL): Added. + * configure: Rebuilt. + +Mon Jun 24 18:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc (_GLOBAL_OFFSET_TABLE_): Don't do a + PROVIDE of _GLOBAL_OFFSET_TABLE_, since it needs to be at a + non-fixed location. + +Mon Jun 24 17:55:31 1996 Jouke Numan <jnuman@bazis.nl> + + * ldlang.h (enum section_type): Define. + (lang_output_section_statement_type): Remove loadable field. Add + sectype field. + (lang_enter_output_section_statement): Change flags parameter in + prototype to sectype. + * ldgram.y (typebits): Remove. + (sectype): New static variable. + (opt_at): Use sectype rather than typebits. + (type): Set sectype rather than typebits. + (atype): Likewise. + * ldlex.l: Recognize DSECT, COPY, INFO, and OVERLAY in + EXPRESSION mode. + * ldlang.c (lang_output_section_statement_lookup): Set sectype + field rather than loadable field. + (wild_doit): Check sectype rather than loadable. + (lang_record_phdrs): Likewise. + (lang_enter_output_section_statement): Rename flags parameter to + sectype. Set sectype field rather than loadable field. Set flags + field based on sectype. + +Mon Jun 24 12:00:32 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Force .stab* and .comment sections to start + at 0. + + * configure.in: On alpha*-*-osf*, link against libbfd.a if not + using shared libraries. + * configure: Rebuild with autoconf 2.10. + +Fri Jun 21 17:40:56 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil> + + * configure.tgt: Add support for *-*-rtems* configurations. + +Fri Jun 21 13:05:51 1996 Richard Henderson <rth@tamu.edu> + + * configure.tgt (alpha-*-linuxecoff*): New target. + (alpha-*-linux*): Use elf64alpha. + * emulparams/elf64alpha.sh: New file. + * emultempl/elf32.em: If ELFSIZE is not set, set it to 32. Use + ${ELFSIZE} rather than 32 when calling BFD routines. + (hold_rodata): New static variable. + (gld${EMULATION_NAME}_place_orphan): Use hold_rodata for a + readonly section that is not code. + (gld${EMULATION_NAME}_place_section): Set hold_rodata. Don't use + a .rel section unless its bfd_section field is not NULL. + * Makefile.in (ALL_EMULATIONS): Add eelf64alpha.o. + (eelf64alpha.c): New target. + +Fri Jun 21 12:45:46 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldmisc.c (vfinfo): Correct handling of 0 in %W case. + +Thu Jun 20 13:55:28 1996 Ian Lance Taylor <ian@cygnus.com> + + Add enough support to understand the gcc svr3.ifile script: + * ldlex.l: Recognize BLOCK and GROUP in EXPRESSION context. Add + BIND keyword. + * ldgram.y: Add BIND token. + (section): Recognize GROUP. + (opt_ext_with_type): Recognize a couple of cases of BIND. + * ldlang.c (init_os): Don't do anything if section is already + initialized. Call exp_init_os on addr_tree field. + (exp_init_os): New static function. + (map_input_to_output_sections): Call exp_init_os on assignment + expression. + (lang_place_orphans): Check for common sections by name COMMON + rather than by common_section field. Don't warn about absence of + [COMMON] command. + + * ldlang.h (lang_input_statement_type): Remove useless fields + common_section, common_output_section, and complained, as well as + all references to them. + + * ldexp.c: Reindent a lot of code. + (exp_fold_tree): Call FAIL rather than einfo in default case. + +Wed Jun 19 11:40:14 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.host (m88*-*-dgux*): Quote HOSTING_CRT0. From + <randall.hron@medaphis.com>. + +Tue Jun 18 15:53:09 1996 Jeffrey A. Law <law@rtl.cygnus.com> + + * scripttempl/h8300s.sc: New file for H8/S. + * emulpararms/h8300s.sh: New file for H8/S. + * Makefile.in (ALL_EMULATIONS): Add H8/S. + (e_h8300s.c): Add dependencies. + * configure.tgt: Add H8/S to targ_extra_emuls. + +Tue Jun 18 17:55:39 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (i[345]86*-*-isc*): New target. From + <uddeborg@carmen.se>. + +Wed Jun 12 12:46:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c: Include "libiberty.h". + (parse_args): Copy the -Y argument into memory. + (set_default_dirlist): Don't put the ':' back into the directory + list. + +Fri Jun 7 11:27:42 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em: Include libiberty.h. + (gld${EMULATION_NAME}_set_symbols): New static function to add + LD_LIBRARY_PATH to the list of search directories. + (ld_${EMULATION_NAME}_emulation): Add new set_symbols routine. + +Thu Jun 6 11:50:31 1996 Ian Lance Taylor <ian@cygnus.com> + + * emulparams/elf32bmip.sh (OTHER_GOT_SYMBOLS): Use ALIGN(16) + rather than . when computing _gp value. From Per Fogelstrom. + * emulparams/elf32lmip.sh (OTHER_GOT_SYMBOLS): Likewise. + + * ldmain.c (main): Don't close and unlink the file on error, since + remove_output will do it anyhow. + * ldlang.c (open_output): Set boolean variable to true, not 1. + +Wed Jun 5 18:34:14 1996 James G. Smith <jsmith@cygnus.co.uk> + + * emulparams/{elf32b4300.sh,elf32l4300.sh} (SCRIPT_NAME): Use + elfmips instead of elf. + +Tue Jun 4 18:43:07 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldcref.c: New file. + * ld.h (add_cref, output_cref): Declare. + * ldmain.c (main): Initialize notice_all field. If it is set at + end of link, call output_cref. + (notice): Rename from notice_ysym. Check notice_all. + * ldmisc.c (finfo): Make globally visible. + * ldmisc.h (finfo): Declare. + * lexsup.c (OPTION_CREF): Define. + (ld_options): Add "cref". + (parse_args): Handle OPTION_CREF. + * Makefile.in: Rebuild dependencies. + (CFILES): Add ldcref.c. + (OFILES): Add ldcref.o. + * ld.texinfo, ld.1: Document --cref. + +Tue Jun 4 12:12:25 1996 Tom Tromey <tromey@csk3.cygnus.com> + + * Makefile.in (install): Make $(tooldir) and $(tooldir)/bin. + +Fri May 31 12:40:55 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (sort_sections): Don't assume that a + wild_statement has a section name. + +Wed May 29 13:13:35 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elfmips.sc: Quote test -z argument. + + * ld.texinfo: Clarify the CONSTRUCTORS command. + +Thu May 23 16:07:44 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize + file, not impfile. + +Wed May 22 11:31:30 1996 Doug Evans <dje@seba.cygnus.com> + + * ldlang.c (wild_doit): Don't copy over SEC_LINK_{ONCE,DUPLICATES} + if final link. + * emultempl/pe.em (sfunc): Renamed to sort_by_file_name. + (sort_by_section_name, sort_sections_1): New functions. + (sort_sections): Only sort by file name sections in .idata. + Add "Grouped Sections" support. + (gld${EMULATION_NAME}_place_orphan): Rewrite to support Grouped + Sections. + (gld${EMULATION_NAME}_place_section): Delete. + * scripttempl/pe.sc (.text,.data,.rdata): Add *(.foo\$). + (.CRT,.rsrc): Rewrite to use Grouped Section support. + +Tue May 21 14:31:48 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-eppcmac.c: Update to reflect changes to aix.em. + +Sun May 19 16:59:44 1996 Doug Evans <dje@seba.cygnus.com> + + * ldlang.c (dprint_statement): Stop printing at end of list. + +Sat May 18 13:12:05 1996 Steve Chamberlain <sac@slash.cygnus.com> + + Support for --force-exe-suffix + * ld.h (args_type): Add force_exe_suffix. + * ld.texinfo: Add documentation. + * ldmain.c (main): Add support for option. + * lexsup.c (OPTION_FORCE_EXE_SUFFIX): New. + (ld_options, parse_args): Add support for option. + +Wed May 15 12:50:25 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call. + +Fri May 10 16:28:44 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc (__stack): Make __stack 0 if it was + referenced but not defined. + +Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com> + + * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}: + Set a new variable to signify if the final target is an embedded + system. + * scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to + .text for an embedded system. + +Tue May 7 10:56:11 1996 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function. + (gld${EMULATION_NAME}_place_section): New function. + (hold_{section,use,text,rdata,data}): New static locals. + (ld_${EMULATION_NAME}_emulation): Update orphan field. + * scripttempl/pe.sc: Whitespace cleanup. Semicolon usage cleanup. + (INIT,FINI): Delete, unused. + (.text): Document orphan .text.foo sections. + (.rdata): Document orphan .rdata.foo sections. + (.data): Document orphan .data.foo sections. + +Tue May 7 11:35:46 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300.sc: Place ".tiny" sections right + after ".data" sections. + * scripttempl/h8300h.sc: Place ".tiny" sections into + the "tiny" memory region, 0xff8000 through 0xffff00. + + * scripttempl/h8300.sc: Set the entry point to the value of + "_start" rather than the start of the text segment. + * scripttempl/h8300h.sc: Likewise. + + * scripttempl/h8300.sc: Place .rodata sections before .text + sections in main ram. + * scripttempl/h8300h.sc: Likewise. + +Mon May 6 23:32:30 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the + 8-bit region and 8-bit sections. + +Wed May 1 17:50:06 1996 Doug Evans <dje@canuck.cygnus.com> + + * ldlang.c (section_already_linked): Fix typos. + +Mon Apr 29 20:31:06 1996 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/pe.sc (.endjunk): Define __end__. + +Mon Apr 29 17:05:13 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (longest_section_name): Remove. + (SECTION_NAME_MAP_LENGTH): Define. + (print_size, print_alignment, print_fill, print_section): Remove. + (print_flags): Remove. + (lang_map): Rewrite. + (print_output_section_statement): Rewrite. + (print_assignment): Rewrite. + (print_one_symbol): Rewrite. + (print_input_section): Rewrite. + (print_fill_statement): Rewrite. + (print_data_statement): Rewrite. + (print_address_statement): New static function. + (print_reloc_statement): Rewrite. + (print_padding_statement): Rewrite. + (print_wild_statement): Rewrite. + (print_statement_list): Clean up. + (print_statement): Clean up. Some minor output changes. + (print_statements): Clean up. + (load_symbols): Put another - before -whole-archive. + * ldexp.c (exp_print_tree): Change etree_value and etree_rel to + print 0x and to omit leading zeroes. For etree_rel, use %B to + print the BFD. For etree_assign, remove the space after the + destination name. + * ldwrite.c: Include "libiberty.h". + (clone_section): Call xstrdup, not strdup. + (ldwrite): Don't print any map information. + (print_symbol_table, print_file_stuff, print_symbol): Remove. + * ldmain.c (main): Call lang_map when appropriate. + * ldmisc.c (vfinfo): Add support for %W. + (print_address): Remove. + * ldmisc.h (print_address): Don't declare. + * Makefile.in: Rebuild dependencies. + +Mon Apr 29 10:29:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure.host (m68*-*-linux*): Add -dynamic-linker to + HOSTING_CRT0. Search -lgcc both before and after -lc in + HOSTING_LIBS. Look for crt{begin,end}.o in the compiler directory + at first. + (i[345]86-*-linux*): Look for crt{begin,end}.o in the compiler + directory at first. + +Fri Apr 26 14:42:27 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldmisc.h (demangle): Declare. + * ldmisc.c: Include "libiberty.h". Include demangle.h with "", + not <>. + (demangle): Make non-static. Remove remove_underscore paramter. + Always return an allocated string. + (vfinfo): Free result of demangle. Add case 'G'. Use %T to print + functionname, rather than calling demangle. Print a colon between + the BFD(section+offset) and the line number. + * ldmain.c (add_archive_element): Improve format of archive + information in map file. + (constructor_callback): Don't print anything to the map file. + * ldlang.c (lang_one_common): Improve format of common symbol + information in map file. + * ldctor.c (ldctor_build_sets): If producing a map file, print set + information. + * ldwrite.c (print_symbol_table): Print a newline before the + header in the map file. + * Makefile.in: Rebuild dependencies. + + * ldmisc.c (vfinfo): Reindent. + +Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_size_sections): If _cooked_size is not 0, then + don't clobber it when not relaxing. + + * ld.h (ld_config_type): Remove traditional_format field. + * ldmain.c (main): Use link_info.traditional_format rather than + config.traditional_format. + * ldlang.c (ldlang_open_output): Likewise. + * lexsup.c (parse_args): Likewise. + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise. + * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise. + + * ldlang.c (wild_doit): Discard debugging sections if we are + stripping debugging information. + + * emulparams/z8002.sh (ARCH): Set to z8002, not z8k. + +Tue Apr 16 16:38:32 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldexp.c (fold_binary): Correct handling of subtraction with + absolute values. + (fold_name): Permit symbols in lang_allocating_phase_enum. + + * scripttempl/aout.sc: Only PROVIDE __stack when RELOCATING. Undo + accidental changes in last patch. + +Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure.tgt (powerpc*-*-{sysv,linux}): Add aliases. + (powerpcle*-*-{sysv,solaris}): Ditto. + +Mon Apr 15 14:50:56 1996 Rob Savoye <rob@chinadoll.cygnus.com> + + * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it + in m68k/crt0.S without things blowing up. + +Fri Apr 12 16:40:56 1996 Rob Savoye <rob@chinadoll.cygnus.com> + + * scripttempl/m68kcoff.sc: Remove default address for .data so + .text, .data, and .bss are all sequential. + +Thu Apr 11 12:05:35 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/m68kcoff.sc: Remove regions and simplify. + +Wed Apr 10 14:41:53 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300.sc: Add the "8-bit area" in the upper 256 + bytes of the address space. Put data from the ".eight" sections + into the 8-bit area. + * scripttempl/h8300h.sc: Likewise. + +Tue Apr 9 14:10:42 1996 Doug Evans <dje@canuck.cygnus.com> + + * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): + Pass $ARCH to ldfile_set_output_arch instead of setting + ldfile_output_architecture directly. + +Tue Apr 9 14:22:15 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc (.init,.fini): Put .init, .fini section + next to .text. Put _etext after .text, .init, .fini, and + .rodata{,2} sections. + +Tue Apr 9 12:18:57 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo: Rearrange option documentation. + + * lexsup.c (ld_options): New static array. + (parse_args): Build shortopts and longopts from ld_options array. + (help): New static function. + * ldver.h (help): Don't declare. + * ldver.c (ldversion): Reindent. + (help): Remove. + + * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic. + +Mon Apr 8 11:56:23 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em: When checking for a native emulation, check + that the current emulation is the default emulation. + * emultempl/sunos.em: Likewise. + + * configure.in: Permit --enable-shared to specify a list of + directories. + * configure: Rebuild. + + * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic, + for HP/UX compatibility. + +Fri Apr 5 14:30:14 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New + static function, if ${host} = ${target}. + (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a + needed shared library if ${host} = $[target}. + + * configure.host (i[345]86-*-linux*): Add -dynamic-linker to + HOSTING_CRT0. Search -lgcc both before and after -lc in + HOSTING_LIBS. + + * configure.tgt: Add i[345]86-*-freebsdelf* target; from John + Polstra <jdp@polstra.com>. + +Fri Apr 5 18:11:25 1996 James G. Smith <jsmith@cygnus.co.uk> + + * emulparams/elf32{b,l}4300.sh (MACHINE): Add explicit + architecture number. + * scripttempl/elf.sc: Use $MACHINE definition if present. + * configure.tgt (targ_extra_emuls): Force 4100 build to use same + template as 4300. + +Mon Apr 1 17:35:40 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_size_sections): Change region check to handle + regions which end at the highest possible address correctly. + From Roland Weber <roweber@ira.uka.de>. + + * ldlang.c (section_already_linked): New static function. + (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a + relocateable link. Don't worry about section being NULL, since it + never should be. Don't call init_os unless the section is going + to be added. + (ldlang_add_file): Call section_already_linked for each section. + * ldmain.c (multiple_definition): Don't warn about multiple + definitions in sections which are being discarded. + +Sun Mar 31 00:30:47 1996 steve chamberlain <sac@slash.cygnus.com> + + * scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/. + * emultempl/pe.em (init): Remove special case PPC code. + +Fri Mar 29 00:01:29 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300.sc: Make vectors section 0xc4 bytes long + so as not to overwrite the magic syscall entry at 0xc4. + * scripttempl/h8300h.sc: Likewise. + +Thu Mar 28 11:05:47 1996 Doug Evans <dje@canuck.cygnus.com> + + * configure.tgt (sparc64-*-solaris2*): Delete. + Stick with sparc-*-solaris2*. + +Wed Mar 27 12:33:24 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/". + * ldlang.c (init_os): Fail on an attempt to initialize any section + named DISCARD_SECTION_NAME. + (wild_doit): Discard input sections assigned to an output section + named DISCARD_SECTION_NAME. + * ld.texinfo: Document use of /DISCARD/. + + * ldlang.c: Fix some indentation and comments. + +Tue Mar 26 18:14:49 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Call bfd_set_error_program_name. + +Thu Mar 21 13:17:34 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo: Fix a couple of indexing entries. Mention that + --verbose displays builtin linker scripts. + + * ldmisc.c (vfinfo): case 'I': If the file is not in an archive, + and the local symbol name does not match the filename, print the + filename as well. + + Patches from John Polstra <jdp@polstra.com> for FreeBSD ELF: + * lexsup.c (parse_args): -Bshareable is a synonym for -shared. + * emulparams/elf_i386.sh (NONPAGED_TEXT_START_ADDR): Make the same + as TEXT_START_ADDR. + +Wed Mar 20 18:18:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * ld.texinfo: Fix typos. Use @pxref only inside parentheses. + +Wed Mar 20 16:56:15 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (add_wrap): New function. + * ldmain.h (add_wrap): Declare. + * lexsup.c (parse_args): Call add_wrap. + +Tue Mar 19 16:44:20 1996 Doug Evans <dje@canuck.cygnus.com> + + * configure.host (sparc*-*-solaris2* host): Accept any sparc variant. + +Wed Mar 13 17:47:31 1996 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300.sc: Change name of page zero memory + from "null" to "vectors". Create an output section for + vectors. Add comments on how to explicitly place items + in the vector table. + * scripttempl/h8300h.sc: Likewise. + +Wed Mar 13 12:40:18 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/lnk960.em (machine_table): Add jx and hx. + + * genscripts.sh: Don't use ${9:-xx}, since Ultrix /bin/sh doesn't + support it. + +Tue Mar 12 12:43:59 1996 David Mosberger-Tang <davidm@koala.azstarnet.com> + + * ld.h (ld_config_type): Add warn_multiple_gp field. + * lexsup.c (parse_args): Handle --warn-multiple-gp. + * ldmain.c (warning_callback): Suppress multiple gp values warning + if --warn_multiple_gp was not used. + * ld.texinfo, ld.1: Document --warn-multiple-gp. + +Tue Mar 12 12:02:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Handle --wrap. + * ldmain.c (main): Initialize link_info.wrap_hash. + * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED + and NAME cases. + * ld.texinfo, ld.1: Document --wrap. + + * configure: Rebuild with autoconf 2.8. + + Don't do SunOS style dynamic linking for sparc-aout: + * configure.tgt (sparc64-*-aout*): Use sparcaout, not sun4. + (sparclite*-fujitsu-*, sparc*-*-aout): Likewise. + (sparc*-wrs-vxworks*): Likewise. + * emulparams/sparcaout.sh: New file. + * Makefile.in (ALL_EMULATIONS): Add esparcaout.o. + (esparcaout.c): New target. + +Wed Mar 6 16:06:52 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * scripttempl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change + in a different manner to work around differences in shell variable + expansion. + +Wed Mar 6 18:08:18 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.h (ldemul_unrecognized_file): Declare. + (ldemulation_xfer_type): Add unrecognized_file field. + * ldemul.c (ldemul_unrecognized_file): New function. + * ldlang.c (load_symbols): If a file can not be recognized, call + ldemul_unrecognized_file before trying it as a linker script. + * aix.em (gld${EMULATION_NAME}_unrecognized_file): New static + function. + (gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r". + (ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file. + +Mon Mar 4 14:11:17 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wild): Handle foo.a(.text) by mapping each included + member of foo.a separately. From Jouke Numan <jnuman@bazis.nl>. + +Fri Mar 1 10:24:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): + Search trinary.cond rather than searching trinary.lhs twice. + +Tue Feb 27 15:08:43 1996 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-make.sed: Edit out shared library support. + (@TDIRS@): Edit out, can't use genscripts. + +Tue Feb 27 15:09:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure.tgt (m68k-*-linuxaout*, m68k-*-linux*): New targets. + * emulparams/m68klinux.sh: New file. + * emultempl/linux.em (gld${EMULATION_NAME}_before_allocation): + Call bfd_${EMULATION_NAME}_size_dynamic_sections instead of + bfd_linux_size_dynamic_sections. + * Makefile.in (ALL_EMULATIONS): Add em68klinux.o. + (em68klinux.c): New target. + * configure.host (m68*-*-linuxaout*, m68*-*-linux*): New hosts. + +Tue Feb 27 12:55:46 1996 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (ALL_EMULATIONS): Sort into alphabetical order. + Fill in missing entries. + + * lexsup.c (parse_args): Recognize --no-whole-archive. + * ldlang.h (lang_input_statement_type): Add whole_archive field. + * ldlang.c (new_afile): Set whole_archive field. + (load_symbols): Check input file specific whole_archive field + rather than global variable. + * ld.texinfo, ld.1: Document --no-whole-archive. + +Tue Feb 20 16:07:00 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt: Correct gldi960 to gld960. + +Mon Feb 19 11:16:44 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Check + the SONAME if it is available. + (gld${EMULATION_NAME}_stat_needed): Use the SONAME, not the + filename, when checking for conflicting library versions. Don't + assume that the suffix is only numbers and dots. + + * ld.texinfo: Mention that -R can be used for -rpath. + +Sun Feb 18 15:05:17 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.host: Check for 'do not mix' from native linker before + trying to use -rpath. + +Thu Feb 15 13:58:06 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Remove explicit substitution of CFLAGS; autoconf + does it anyhow. + * configure: Rebuild. + * Makefile.in (LDFLAGS): Set to @LDFLAGS@. + + * configure.in: Call AC_PROG_CC before configure.host. + * configure: Rebuild. + * configure.host: Remove go32 host, since it should no longer be + necessary. Don't set CC for romp host. + + * scripttempl/elf.sc: Don't skip a page in virtual memory space if + the text segment ends exactly on a page boundary. + + * configure.in: Substitute RPATH_ENVVAR. + * configure: Rebuild. + * configure.host: Set RPATH_ENVVAR. + * Makefile.in (RPATH_ENVVAR): New variable. + (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH. + +Wed Feb 14 18:49:01 1996 Alan Modra <alan@spri.levels.unisa.edu.au> + + * configure.in: Redo emulation handling so that each emulation + searches the correct tool directory, based on the target alias. + For example, "configure --enable-targets=m68k-coff i386-linux" + will search /usr/local/i386-linux/lib for linux and + /usr/local/m68k-coff/lib for m68k-coff. + * configure: Rebuild. + * configure.tgt: Add special tdir settings for Linux. + * Makefile.in: Add @TDIRS@. Pass "$(tdir_EMUL)" to ${GENSCRIPTS} + for each eEMUL.c target. + * genscripts.sh: Accept specific alias as 9th argument, and use it + in LIB_PATH. + +Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de> + + * ldlang.c (lang_set_startof): Don't do anything for a + relocateable link. + + * ldgram.y (mri_script_file): Call mri_draw_tree. + * mri.c (mri_draw_tree): Make globally visible. Don't bother to + create memory regions. + (mri_load): Don't call mri_draw_tree. + * mri.h (mri_draw_tree): Declare. + + * configure.tgt (m68*-*-psos): New target. + * emulparams/m68kpsos.sh: New file. + * scripttempl/psos.sc: New file. + * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o. + (em68kpsos.c): New target. + +Wed Feb 14 11:09:25 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (*-*-ieee*): New target; use vanilla. + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip + `:foo' from ${ARCH}. + +Tue Feb 13 15:58:58 1996 Bryan Ford <baford@snake.cs.utah.edu> + + * scripttempl/i386msdos.sc: Don't pad the .text section. Put + .rodata in .data. + +Tue Feb 13 14:04:19 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared. + + * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if + it looks like we might be linking in two different versions of the + same shared library. Based on a patch from H J Lu <hjl@zoom.com>. + +Thu Feb 8 19:25:54 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_size_sections): Increment the section size when a + padding statement is encountered. + +Wed Feb 7 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Look for --enable-shared. Change the value of + BFDLIB when linking against a shared library on SunOS. + * configure: Rebuild. + * configure.host: If using a shared BFD library, try to pass a + reasonable -rpath option when linking. + * Makefile.in (BFDLIB): Set to @BFDLIB@. + +Tue Feb 6 12:29:14 1996 Doug Evans <dje@charmed.cygnus.com> + + * emulparams/elf64_sparc.sh (ARCH): Change to `sparc:v9'. + * emultempl/generic.em: Strip `:foo' from ${ARCH}. + +Mon Feb 5 16:25:30 1996 Ian Lance Taylor <ian@cygnus.com> + + Support for building bfd and opcodes as shared libraries, based on + patches from Alan Modra <alan@spri.levels.unisa.edu.au>: + * configure.in (HLDFLAGS): New substitution. + * configure: Rebuild. + * configure.host: Set HLDFLAGS on SunOS. + * Makefile.in (HLDFLAGS): New variable. + (BFDDEP): New variable. + (BFDLIB): Change to -L../bfd -lbfd. + ($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB). Use + $(HLDFLAGS) in link. + (check): Set LD_LIBRARY_PATH in the environment. + +Fri Feb 2 19:26:25 1996 Michael Meissner <meissner@wogglebug.tiac.net> + + * scripttempl/elfppc.sc (.sdata2, .sbss2): Put .sdata2 and .sbss + in the read-only section, not read/write unless we are making a + shared library. + (.debug*): Add dwarf debug sections. + (.rela.{sdata*,sbss*}): Add sections. + +Fri Feb 2 16:50:21 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure: Regenerate. + +Thu Feb 1 10:50:46 1996 Ian Lance Taylor <ian@cygnus.com> + + * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000, + for SVR4 compatibility. + + * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE. + +Wed Jan 31 17:30:19 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New. + * emultempl/pe.em (definfo init): Make the default stack reserve + of a PPC larger. + +Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu> + + * configure.tgt (m68*-apple-aux*): New target. + * emulparams/m68kaux.sh: New file. + * scripttempl/m68kaux.sc: New file. + * Makefile.in (ALL_EMULATIONS): Add em68kaux.o. + (em68kaux.c): New target. + +Tue Jan 30 13:18:56 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore + -bnoentry, since the right thing tends to happen anyhow. + +Mon Jan 29 12:29:26 1996 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo, ld.1: Document -export-dynamic. + +Fri Jan 26 11:11:55 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * emultempl/sunos.em: Check for native compile by comparing + ${target} and ${host}. + +Thu Jan 25 16:46:58 1996 James G. Smith <jsmith@cygnus.co.uk> + + * emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed + TEXT_START_ADDR to allow use on IDT and PMON systems. + +Wed Jan 24 20:59:40 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): + correct spelling. + +Wed Jan 24 16:59:19 1996 Doug Evans <dje@charmed.cygnus.com> + + * configure.tgt (sparc64-*-solaris2*): New configuration. + (sparc64-*-aout*): Renamed from sparc64*. + +Mon Jan 22 13:01:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@. + * genscripts.sh: Set host, target and target_alias variables. + Check for native compile by comparing ${target} and ${host}. + * emultempl/elf32.em: Likewise. + * scripttempl/elfmips.sc: Test ${target}, not ${target_alias}. + +Mon Jan 22 11:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc: Refine eabi support to better support + .sdata, .sdata2, .sbss, etc. sections. + +Tue Jan 16 15:16:58 1996 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (%union): Add phdr field. + (phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at. + (phdr_qualifiers): New nonterminal. Add support for FLAGS. + (opt_hdrs, hdr): Remove. + (phdr_val): New nonterminal. + * ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr + and phdrs parameters. Add flags parameter. + (lang_record_phdrs): Update for changes to lang_phdr. Pass flags + to bfd_record_phdr. + * ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and + phdrs fields. Add flags field. + (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove. + (lang_new_phdr): Update declaration. + * ld.texinfo: Document FLAGS. + +Mon Jan 15 15:07:19 1996 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): + Don't make a shared library because of an undefined reference to + __GLOBAL_OFFSET_TABLE_. + + Add some Irix 5 support, mostly from Kazumoto Kojima + <kkojima@info.kanagawa-u.ac.jp>: + * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips. + (SHLIB_TEXT_START_ADDR): Define. + (OTHER_GOT_SYMBOLS): Define. + (OTHER_READWRITE_SECTIONS): Remove initialization of _gp. + (EXECUTABLE_SYMBOLS): Don't define. + (DYNAMIC_LINK): Don't define. + * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh. + * scripttempl/elfmips.sc: New file. + * configure.host (mips*-dec-bsd*): Change mips to mips*. + (mips*-sgi-irix4*): Likewise. + (mips*-sgi-irix5*): New entry. + * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than + elf.sc. + (eelf32lmip.c): Likewise. + +Sat Jan 13 09:41:43 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add + .rela.got.neg section. + +Fri Jan 12 14:56:19 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/sh.sc: Only build constructors when CONSTRUCTING. + + * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if + ANSI_PROTOTYPES is defined. Remove special handling of + WINDOWS_NT. Various indendation fixes. + (vfinfo): Change fmt parameter to const char *. + (info_msg): Write <stdarg.h> version. + (einfo, minfo, finfo): Likewise. + (info_assert): Change file parameter to const char *. + * ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is + defined, use a real prototype. + (info_assert): Change first parameter to be const char *. + +Fri Jan 12 13:29:55 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc: Add support for .sdata2/.sbss2, etc. Add + in old support that 2.7.2 needs, but the current compiler does + not. + + * Makefile.in (eelf32{,l}ppc.c): Fix up dependencies to use the + correct Linker script template. + + * emulparams/elf32{,l}ppc.sh (TEXT_START_ADDR): Set to 0x40000, + not 0x400000. + (DATA_ADDR,NONPAGED_TEXT_START_ADDR): Delete. + +Tue Jan 9 15:53:02 1996 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/alpha.sc: Put .rconst right after .rdata. + +Fri Jan 5 14:07:45 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): + sort using right pointer. + +Fri Jan 5 12:25:47 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc: Remove support for creating special + labels for eabi section begin/end here. The compiler now uses + crt{i,n}.o to create these symbols. + +Thu Jan 4 17:08:58 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure.host: Change existing Linux HOSTING_CRT0 to be used + for a.out only, and put in appropriate HOSTING_CRT0 and + HOSTING_LIBS values for Linux ELF. + +Thu Jan 4 12:02:05 1996 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/h8300.sc: Use all 64K for ram. + * scripttempl/h8300h.sc: Define 256K ram size. + +Thu Dec 21 15:57:18 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Pass + export_defines as true to bfd_xcoff_size_dynamic_sections if -unix + was used, regardless of whether -bE was used. + +Tue Dec 19 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set + relocateable before calling ldctor_build_sets if the output file + is in an XCOFF format. + +Fri Dec 15 16:34:36 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldwrite.c (build_link_order): When handling a data statement, if + the endianness of the output file is unknown, use the endianness + of the input file. + +Tue Dec 12 13:55:41 1995 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-config.in: Recognize mips-*-* as equivalent to + mips-idt-ecoff. + * mpw-eppcmacos.c: Rename to shorter mpw-eppcmac.c. + * mpw-ld.r: Add version resources. + (cfrg): Use symbolic instead of literal name for executable. + +Mon Dec 11 15:13:41 1995 Kim Knuttila <krk@cygnus.com> + + * scripttempl/ppcpe.sc (FINI): Moved the .reloc section. + +Wed Dec 6 14:33:50 1995 Doug Evans <dje@canuck.cygnus.com> + + * ldlang.c (print_statement{,s}): Delete duplicate prototype. + (print_statement_list): Renamed from print_statement. All callers + updated. + (print_statement): New function to print just one statement. + (print_{data,reloc,padding}_statement): Don't crash if + output_section == NULL. + (dprint_statement): New function. + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix + call to sort_sections. + +Wed Dec 6 14:59:06 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (unix_ld): New static variable. + (gld${EMULATION_NAME}_parse_args): Handle -unix. + (gld${EMULATION_NAME}_before_allocation): If unix_ld, pass + gc as false and export_defineds as true to size_dynamic_sections. + + * ldexp.c (exp_fold_tree): Permit assignments to dot in the final + phase if the current section is abs_output_section. + + +Tue Dec 5 09:49:39 1995 Doug Evans <dje@canuck.cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call + to sort_sections. + +Fri Dec 1 16:48:36 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (PHDRS): New token. + (ifile_p1): Accept phdrs. + (section): Accept phdr_opt at the end of the section definition. + (phdr_op): New nonterminal. + (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise. + * ldlex.l: Accept PHDRS. + * ldlang.h (struct lang_output_section_phdr_list): Define. + (lang_output_section_statement_type): Add phdrs field. + (struct lang_phdr): Define. + (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define. + (lang_new_phdr): Declare. + * ldlang.c (lang_phdr_list): New static variable. + (lang_output_section_statement_lookup): Initialize phdrs field. + (lang_process): Call lang_record_phdrs. + (lang_new_phdr): New function. + (lang_section_in_phdr): New function. + (lang_record_phdrs): New static function. + * ld.texinfo: Document PHDRS. + +Thu Nov 30 13:14:30 1995 Kim Knuttila <krk@cygnus.com> + + * scripttempl/ppcpe.sc: Moved .edata into its own section to + expose it. + +Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> + + * configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and + HOSTING_LIBS for testing. + (m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for + testing. + +Tue Nov 28 12:14:53 1995 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Set config.dynamic_link to false for -N + and -n. + +Mon Nov 27 13:12:09 1995 Ian Lance Taylor <ian@cygnus.com> + + * configure: Rebuild with autoconf 2.7. + +Fri Nov 24 18:35:35 1995 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/pe.sc: Two .junk's is too much junk. + +Tue Nov 21 16:14:32 1995 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Use BFD_NEED_DECLARATION. + * acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section. + * configure, config.in: Rebuild with autoconf 2.6. + + * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR + being unsupported if this is not a relocateable link and the input + BFD supports it, since ldctor_build_sets can cope with that case. + +Fri Nov 17 16:23:15 1995 Stan Shebs <shebs@andros.cygnus.com> + + * configure.tgt (powerpc-*-macos*): New target. + * emulparams/ppcmacos.sh: New file, PowerMac emulation. + * Makefile.in (ALL_EMULATIONS): Add eppcmacos.o. + (eppcmacos.c): New target. + * mpw-eppcmacos.c: Update. + * mpw-make.sed: Edit out attempts to use {GENSCRIPTS}. + +Fri Nov 17 10:37:27 1995 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not + $(host_canonical) and $(target_canonical). + (CXX_FOR_TARGET): Likewise. + +Thu Nov 16 11:23:42 1995 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/pe.sc (.endjunk): Move definition of `end' to here + so the malloc heap begins at a sane place. + +Thu Nov 16 03:09:32 1995 Ken Raeburn <raeburn@cygnus.com> + + Version 2.6 released. + * ldver.c (ldversion): Update to 2.6. + + * Makefile.in (mostlyclean): Delete ldemul-list.h here, but not + $(GENERATED_*FILES), since they need to be retained by distclean. + (maintainer-clean, realclean): Delete them here. + +Tue Nov 14 17:08:06 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Open the + base file with FOPEN_WB, not "w". + + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the + environment variable LD_RUN_PATH if neither -rpath nor -rpath-link + were used. + (gld${EMULATION_NAME}_before_allocation): Use the environment + variable LD_RUN_PATH if -rpath was not used. + * ld.texinfo, ld.1: Document LD_RUN_PATH. + +Thu Nov 9 13:09:29 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Recognize + -bl and -bloadmap options. + + * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target, + report a better error. + + * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add + 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. + +Wed Nov 8 11:40:59 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.c (ldemul_default_target): Cast getenv return value. + +Tue Nov 7 11:15:36 1995 Kim Knuttila <krk@cygnus.com> + + * emulparams/ppcpe.sh (ARCH): New file for PowerPC Portable + Executable support. + * scripttempl/ppcpe.sc: New file for PowerPC Portable Executable + support. + + * configure.tgt (targ_extra_emuls): Added powerpcle-pe target. + * Makefile.in (ALL_EMULATIONS): Added eppcpe.o target. + + * emultempl/pe.em (TARGET_IS_ppcpe): file tailoring macro + (gld_$_before_allocation): added hooks for toc construction based + on the above macro. + +Tue Nov 7 11:47:23 1995 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo: The linker does not use _main as an entry point. + +Tue Nov 7 11:46:11 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> + + * scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo + 0x2000 not 0x200. + +Mon Nov 6 10:59:21 1995 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Add test for whether free must be declared. + * sysdep.h: Declare free if necessary. Include "ansidecl.h". + * acconfig.h: Explain NEED_DECLARATION_FREE. + * configure, config.in: Rebuild. + + * lexsup.c (parse_args): Take B:: out of shortopts. + +Sun Nov 5 03:08:28 1995 Ken Raeburn <raeburn@cygnus.com> + + * emulparams/i386nbsd.sh (EXECUTABLE_SYMBOLS): Set __DYNAMIC to 0 + for now, as with m68k4kbsd, until shared library support gets + done. + + * configure.host: For i386 BSD variants, crt0.o lives in + /usr/lib. (True for NetBSD at least, unconfirmed for others.) + +Wed Nov 1 15:42:45 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de> + + * Makefile.in (ALL_EMULATIONS): Add edelta68.o. + (edelta68.c): New target. + * configure.tgt (m68*-motorola-sysv*): New target. + * emulparams/delta68.sh: New file. + * scripttempl/delta68.sc: New file. + + * scripttempl/m88kbcs.sc: Handle .init and .fini. Change section + addresses. + +Wed Nov 1 11:41:56 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (mri_script_command): Accept ',' as well as '=' in + ALIGN and ALIGNMOD statements. + + * emultempl/aix.em: Include ldgram.h. + (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on + AIX 4.1. + * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h. + +Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com> + + * configure.host (alpha-*-linux*): New host. + * configure.tgt (alpha-*-linux*): New target. + +Tue Oct 31 12:36:52 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (export_files): Remove. + (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. + +Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com> + + * 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. + +Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se> + + * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD + m68k4k arch. + (em68k4knbsd.c): New rule. + + * configure.tgt: Added support for the NetBSD m68k4k arch. + + * genscripts.sh, ldint.texinfo, + emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960, + gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s, + hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32, + i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx, + m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd, + pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd, + st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed + PAGE_SIZE to TARGET_PAGE_SIZE. + + * emulparams/m68knbsd.h: Ditto. + (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize. + (EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time + being. + + * emulparams/m68k4knbsd.sh: New file. + + * scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating. + +Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em: Include ldctor.h. + (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. + + * ldmisc.c (demangle): Fix indentation. Remove a leading period. + +Thu Oct 26 22:22:49 1995 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-config.in: Add PowerMac target support, generate config.h. + * mac-ld.r: New file, Mac resources. + * mpw-make.sed: New file, edits Makefile.in into MPW syntax. + * mpw-make.in: Remove. + * mpw-eppcmacos.c: Prebuilt version of PowerMac linking script. + +Thu Oct 26 14:11:26 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat + -static as a synonym for -bnso. + + * scripttempl/aix.sc: Move special symbols inside sections. + Always start .data at 0. + +Wed Oct 25 11:52:12 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * Makefile.in (diststuff): Also make info. + (maintainer-clean realclean): Also delete *.info*. + +Wed Oct 25 11:27:25 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em: Add support for various AIX linker options, + for AIX import and export files, and for AIX shared objects. + * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC. + + * ldmain.c (main): Initialize new field link_info.static_link. + + * ldmain.c (add_keepsyms_file): Add \n at end of einfo calls. + (constructor_callback): Likewise. + * ldmisc.c (vfinfo): Likewise. + * ldwrite.c (build_link_order): Likewise. + + * ld.texinfo: The MRI ALIGN directive is supported. + +Mon Oct 23 11:46:43 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk> + + * emulparams/elf32vr4300.sh: Deleted. + * emulparams/elf32vr4300el.sh: Deleted. + * emulparams/elf32b4300.sh: Added. + * emulparams/elf32l4300.sh: Added. + * configure.tgt, Makefile.in: Updated the build to use the + new 8.3 unique names. + +Thu Oct 19 17:41:46 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (entry_symbol): Make non-static. + * ldlang.h (entry_symbol): Declare. + + * ldlex.l: Treat PROVIDE as a keyword in expression state. + +Wed Oct 18 17:34:06 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttempl/pe.sc (.bss): Move to be after .text + +Tue Oct 17 12:22:05 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment): + Search trinary.cond rather than searching trinary.lhs twice. From + linli@ihp.PHys.ethz.CH. + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move + 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. + + * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em. + (eelf32lppc.c): Likewise. + * emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32. + (GENERATE_SHLIB_SCRIPT): Define as yes. + +Mon Oct 16 19:11:13 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em: Struct bfd_elf_link_needed_list is now named + bfd_link_needed-list; make appropriate changes. + + * configure.tgt (powerpc-*-aix*): New target; use aixppc. + (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. + +Fri Oct 13 14:00:37 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttemp/pe.sc (.reloc): Move to the end. + +Tue Oct 10 17:53:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_finish): Don't try to use an entry_symbol from a + section which was not linked into the final output. + +Tue Oct 10 10:17:22 1995 steve chamberlain <sac@slash.cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix + fatal typos. + +Tue Oct 10 01:01:51 1995 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (args_type): Add rpath_link field. + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for + required dependencies in rpath_link path. Only search + LD_LIBRARY_PATH when configured native. + * lexsup.c (parse_args): Recognize -rpath-link. + * ld.1, ld.texinfo: Document -rpath-link. + +Sat Oct 7 17:07:17 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't + bother searching for needed libraries unless doing a final link. + +Fri Oct 6 16:26:16 1995 Ken Raeburn <raeburn@cygnus.com> + + Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * ld/ld.1: Fix formatting bugs. + +Wed Oct 4 17:37:46 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldexp.c (exp_get_abs_int): Return bfd_vma, not int. + * 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. + +Mon Oct 2 13:56:09 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (global_stat): New file static variable. + (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. + +Fri Sep 29 12:00:18 1995 Doug Evans <dje@deneb.cygnus.com> + + * scripttempl/armcoff.sc: Start .text at 0x8000. + Start .data at 0x40000. + +Fri Sep 29 11:09:46 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If + command_line.rpath is set, use it, rather than the -L options, to + build the rules section. + * ld.texinfo: Document this use of -rpath. + + * lexsup.c (parse_args): Don't set link_info.shared for -assert + 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. + +Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (parsing_defsym): Declare. + * 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. + + * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other + COFF targets, allowing for the leading underscore used on SPARC + COFF. + + * lexsup.c (parse_args): Handle -assert. + * 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. + +Thu Sep 28 01:40:37 1995 Doug Evans <dje@deneb.cygnus.com> + + * Makefile.in (earmcoff.c): Build. + * configure.tgt (arm-*-coff): New target + * emulparms/armcoff.sh: New file. + * scripttempl/armcoff.sc: New file. + +Tue Sep 26 10:59:32 1995 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/i386coff.sc: Remove .data2; no longer needed. + +Fri Sep 22 18:09:02 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldfile.c (ldfile_set_output_arch): Make arch const. + +Thu Sep 21 17:55:24 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc: Correctly locate __bss_start at the + beginning of the .bss area, not at the end of data. Add + __sbss_{start,end} symbols. + +Wed Sep 20 12:29:36 1995 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (CC_FOR_TARGET): Quote $(program_transform_name). + (CXX_FOR_TARGET, install): Likewise. + +Mon Sep 18 14:53:22 1995 Ian Lance Taylor <ian@cygnus.com> + + Based on patches by Alan Modra <alan@spri.levels.unisa.edu.au>: + * Makefile.in (CC_FOR_TARGET): Remove brokensed stuff. + (CXX_FOR_TARGET): Likewise. + (install): Likewise. + (GENERATED_HFILES): Remove config.h. + (.dep): Depend upon config.h. + +Mon Sep 18 14:39:38 1995 Arne H. Juul <arnej@pvv.unit.no> + + * configure.tgt (mips*-dec-netbsd*): New target. + +Fri Sep 15 20:01:52 1995 Ken Raeburn <raeburn@cygnus.com> + + * configure.host (m88*-*-dgux*): Fix another shell syntax error. + +Fri Sep 15 23:28:05 1995 Andrew Cagney <cagney@highland.com.au> + + * configure.host (i[345]86-*-bsd*): Fix shell syntax error. + +Thu Sep 12 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttemp/pe.sc: Allow both spellings of .ctors/.dtors. + Start .text section on the right boundary. Always align + stabs. + +Tue Sep 12 12:24:17 1995 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (maintainer-clean): New target. + + * ldmain.c (struct warning_callback_info): Define. + (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. + + * ld.texinfo: Clarify -L option. + + * ldlang.c (lang_one_common): Add cast to avoid warning. + (topower): Likewise. Also, reindent. + * ldwrite.c (clone_section): Change i to unsigned int. + * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add + cast to avoid warning. + +Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (config.status): Depend upon configure.tgt. + + * ldemul.h (ldemul_set_symbols): Declare. + (ldemul_parse_args): Declare. + * ldemul.c (ldemul_parse_args): Fix indentation. + + * configure.in: Call AC_HEADER_DIRENT. + * configure, config.in: Rebuild. + * emultempl/sunos.em: Use autoconf recommend mechanism to define + DIR and struct dirent. + + * configure.tgt (mips*-*-bsd*): New case. + + * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*) + New case. + * configure.tgt (i[345]86-*-ptx*): New case. + +Thu Sep 7 10:48:26 1995 Ian Lance Taylor <ian@cygnus.com> + + * config.in: Rename from config.h.in. + * 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. + + * Makefile.in (distclean): Remove config.h and stamp-h. + + * configure.host (sparc-*-sunos64*): Remove. + * ldlang.c (lang_map): Check BFD64, not HOST_64_BIT. + + * ldexp.c (exp_fold_tree): Don't warn about moving the location + counter backward in the absolute section. + +Wed Sep 6 14:42:11 1995 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Rewrite to use autoconf. + * 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. + +Tue Sep 5 14:55:24 1995 Ken Raeburn <raeburn@cygnus.com> + + * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and + ns32k-pc532-lites* like ns32k-pc532-netbsd*. From Ian Dall. + +Fri Sep 1 22:29:52 1995 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/pe.sc: Fix typo in spelling of .ctors/.dtors. + +Fri Sep 1 13:13:29 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (warning_callback): Add abfd, section, and address + 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. + +Fri Sep 1 08:35:16 1995 James G. Smith <jsmith@beauty.cygnus.com> + + * configure.in: Added mips*vr4300-idt-elf* and + mips*vr4300el-idt-elf* targets. + * Makefile.in: Added eelf32vr4300* targets. + * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added. + * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added. + +Fri Sep 1 10:51:45 1995 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe + <brendan@cygnus.com>. + +Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com> + + * 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. + +Thu Aug 31 17:01:37 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_memory_region_lookup): Don't use the first region + as the default region. Create a new region instead. + +Tue Aug 29 14:21:41 1995 steve chamberlain <sac@slash.cygnus.com> + + * ldemul.c (ldemul_set_symbols): New function. + * ldemul.h (ld_emulation_xfer_struct): Add set_symbols. + * ldmain.c (main): Add call to ldemul_set_symbols. + * lexsup.c (set_pe_value): New args. + (set_pe_name): New. + (parse_args): Cope with new set_pe_value args. + * emultempl/pe.em (set_symbols): New function. + (ld_emulation_xfer_struct): Add set_symbols. + * scripttempl/pe.sc: Use new symbols. + +Thu Aug 24 18:12:18 1995 Ian Lance Taylor (ian@cygnus.com) + + * lexsup.c (parse_args): Don't call set_default_dirlist for -O. + For -Y, ignore a leading `P,', and only call set_default_dirlist + after processing all the other arguments. + +Tue Aug 22 07:36:58 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttempl/pe.sc: Keep .edata, don't base stabs at 0. + * emulparams/armpe.sh: Run PE script. + +Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com> + + * ldmain.c (main): Remove PE stuff. + * lexsup.c (options): Load more PE options. + (set_pe_value): New function. + +Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com> + + + * 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. + +Thu Aug 17 14:46:34 1995 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/h8500s.sc (.rdata): All data must go in data segment. + (.strings,.ctors,.dtors): Likewise. + +Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttempl/armpe.sc: Always start code at 0x401000, even + if -r. + * ldwrite.c (strdup): New extern declaration. + * ldgram.y (atype): New rule to clarify type parsing. + * ldlang.c (init_os): Remove commented out code. + (lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits + unless told not to by the link script. + +Wed Aug 16 11:45:11 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_set_startof): New static function. + (lang_process): Call it. + + * ldgram.y: Tweak casesymlist to avoid bison errors. + + * lexsup.c (parse_args): Accept -h as a synonym for --soname, for + Solaris compatibility. + +Tue Aug 15 17:31:16 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (YYDEBUG): If not defined, define as 1. + (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. + +Tue Aug 8 19:14:58 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc + instead of alloca. + +Tue Aug 8 15:24:05 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use + $r/../gcc/xgcc unless it is present. + +Thu Aug 3 11:56:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/m68kcoff.sc: Only put .ctors and .dtors in .text + when CONSTRUCTING. + * scripttempl/m68klynx.sc: Likewise. + * scripttempl/nw.sc: Likewise. + * scripttempl/sa29200.sc: Likewise. + * scripttempl/sparclynx.sc: Likewise. + +Fri Jul 28 12:02:23 1995 steve chamberlain <sac@slash.cygnus.com> + + * emulparams/{z8001.sh, z8002.sh}: Fix typo. + +Thu Jul 27 21:06:21 1995 Ken Raeburn <raeburn@cygnus.com> + + * configure.in (i[345]86-*-linuxoldld): Treat like linuxaout*. + +Thu Jul 27 15:26:28 1995 steve chamberlain <sac@slash.cygnus.com> + + * scripttempl/i386pe.sc: Cope with constructors. + * scripttempl/z8ksim.sc: Deleted. + * scripttempl/z8000.sc: Resurrected as this, but + can handle z8001 and z8002 formats. + * emulparams/z8ksim.sh: Deleted. + * emulparams/{z8001.sh, z8002.sh}: New files. + * config/z8ksim.mt: Deleted + * config/z8k-coff.mt: New, generates both emulations. + +Tue Jul 25 14:53:02 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmisc.c (vfinfo): In %C and %D case, always print the BFD using + %B, in case it is in an archive. + +Mon Jul 24 15:23:39 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_process): Call reset_memory_regions for each + relaxation pass. + +Fri Jul 21 22:49:44 1995 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfppc.sc: Add support for .sdata, .sbss, and + _SDA_BASE. + +Thu Jul 20 16:26:55 1995 Ken Raeburn <raeburn@cygnus.com> + + * ldmain.c (constructor_callback): Allocate set_name in stack + frame, rather than always calling alloca with a fixed size. + +Wed Jul 19 16:21:43 1995 Doug Evans <dje@canuck.cygnus.com> + + * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little. + (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define. + +Mon Jul 17 13:57:00 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldwrite.c (clone_section): Set the alignment of the clone + section to that of the section being cloned. + + * ldwrite.c (split_sections): Don't split the first input section + into a new output section. + +Sat Jul 15 00:26:35 1995 Michael Meissner <meissner@cygnus.com> + + * emulparams/elf32ppc.sh (TEMPLATE_NAME): Define as elf32. + (GENERATE_SHLIB_SCRIPT): Define as yes. + +Fri Jul 14 12:11:46 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/mipsecoff.em (check_sections): Use %P, not %F. + + * ldver.c (help): Update list of options to match currently + supported list. + +Thu Jul 13 13:52:10 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/lnk960.em (ld_lnk960_emulation): Initialize + after_open field. + + * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type; + it takes a size_t anyhow. + (exp_binop): Likewise. + (exp_trinop): Likewise. + (exp_unop): Likewise. + (exp_nameop): Likewise. + (exp_assop): Likewise. + * ldlang.c (lang_memory_region_lookup): Likewise. + (init_os): Likewise. + (ldlang_add_undef): Likewise. + (insert_pad): Likewise. + * ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to + bfd_size_type. + + * Makefile.in (ALL_EMULATIONS): It's earmaoutb.o, not earmoutb.o. + +Wed Jul 12 11:32:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to + declaration. + (ld_emulation_xfer_type): Add search parameter to + open_dynamic_archive entry point. + * ldemul.c (ldemul_open_dynamic_archive): Add search parameter. + * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and + make non-static. Change all callers to use new name. + (ldfile_open_file_search): Make static. If entry is dynamic, call + ldemul_open_dynamic_archive. + (ldfile_open_file): Don't call ldemul_open_dynamic_archive. + * ldfile.h (ldfile_open_file_search): Don't declare. + (ldfile_try_open_bfd): Declare. + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + Accept search parameter. Don't search for a library, just look in + a single place. + * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive): + Likewise. + +Tue Jul 11 16:44:21 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (set_scripts_dir): Don't base script directory on + current directory. + +Tue Jul 11 12:29:02 1995 Rick Sladkey <jrs@world.std.com> + + * ldmisc.c (vfinfo): Don't print the line number if it isn't + meaningful. + +Mon Jul 10 13:38:28 1995 Ian Lance Taylor <ian@cygnus.com> + + * ld.h (ld_config_type): Add field warn_constructors. + * ldmain.c (add_to_set): Warn if config.warn_constructors. + (constructor_callback): Likewise. + * lexsup.c (parse_args): Handle -warn-constructors. + * ld.texinfo, ld.1: Document -warn-constructors. + + * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't + get confused by directory names if we searched for the file. + + Based on patches from H.J. Lu <hjl@nynexst.com>: + * ldlang.h (lang_input_statement_type): Add new field dynamic. + * ldlang.c (new_afile): Set dynamic from config.dynamic_link. + * ldfile.c: Include bfdlink.h. + (ldfile_open_file): Check dynamic field of entry, not global + dynamic_link field. Don't do a dynamic search when doing a + relocateable link. + * ldmain.c (main): Don't warn about dynamic_link for a + relocateable link. + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if + dynamic is false. + (gld${EMULATION_NAME}_create_output_section_statements): Always + loop over input files. + * Makefile.in: Rebuild dependencies. + + * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and + -shared. + +Mon Jul 10 13:29:43 1995 Eric Youngdale <eric@aib.com> + + * ldmain.c (main): Set link_info.symbolic to false. + * lexsup.c (parse_args): Handle -Bsymbolic. + +Wed Jul 5 00:12:11 1995 Fred Fish (fnf@cygnus.com) + + * ldmain.c (HAVE_SBRK): Define for everything except + specific systems that are known to not support sbrk. + (main): Use HAVE_SBRK to decide whether or not to use sbrk. + +Tue Jul 4 12:55:48 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): + Handle etree_provide. + + * emultempl/elf32.em (global_needed): New static variable. + (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. + +Mon Jul 3 14:26:37 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * configure.in (i386-*-win32): New target. + +Mon Jul 3 14:39:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Let -G either set the small data size or + be equivalent to --shared, depending on the next argument. Accept + and ignore -z for Solaris compatibility. + +Sun Jul 2 17:52:34 1995 Ian Lance Taylor <ian@cygnus.com> + + * lexsup.c (parse_args): Cast fopen result to PTR before storing + it in link_info.base_file. Fix indentation. + +Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * 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. + +Thu Jun 22 19:55:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu> + + * configure.in (i386-*-msdos*, i386-*-moss*): New targets. + * Makefile.in (ALL_EMULATIONS): Added i386msdos.o. + (i386msdos.o): New target. + * config/i386-msdos.mt: Created. + * emulparams/i386msdos.sh: Created. + * scripttempl/i386msdos.sc: Created. + +Thu Jun 22 15:06:35 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * scripttempl/elfppc.sc (.fixup): Add support for a .fixup section + that contains pointers to be relocated. + +Tue Jun 20 17:47:20 1995 Stan Shebs <shebs@andros.cygnus.com> + + * mpw-esh.c: New file, modified for MPW from esh.c. + * scripttempl/sh.sc: Reformatted to simplify MPWification, + use *() to concat stab sections instead of []. + +Thu Jun 15 08:48:16 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * scripttempl/armpe.sc: Add constructor support. + +Tue Jun 13 09:11:20 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * ldlang.c (lang_size_sections): Any section with a DATA + statement has contents. + +Sun Jun 11 15:20:46 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * emulparams/m68kelf.sh (NOP): Define. + (DYNAMIC_LINK): Don't define. + (TEXT_START_ADDR): Set to 0x80000000; the extra 0x100 for headers + will come from the linker script. + +Thu Jun 8 14:17:33 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack. + +Mon Jun 5 02:16:24 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> + + * configure.in (i[345]86-*-gnu*): Use GNU elf config. + +Thu May 25 11:49:28 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + From Andrew Cagney <cagney@highland.com.au> + * Makefile.in: Fixup more gotchas from renaming elf32ppcle to + elf32lppc. + +Wed May 24 11:23:21 1995 Steve Chamberlain <sac@slash.cygnus.com> + + Add support for ARM-PE. + * Makefile.in (ALL_EMULATIONS): Add armpe.o + * configure.in: Recognize armpe. + * config/arm-pe.mt: New file. + * emulparams/armpe.sh: New file. + * scripttempl/armpe.sc: New file. + + +Mon May 22 15:19:26 1995 Doug Evans <dje@chestnut.cygnus.com> + + * configure.in (h8300h-*-hms): Deleted + * config/cf-h8300h.mt: Deleted. + +Thu May 18 04:26:10 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com> + + Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + From David Taylor (dtaylor@armltd.co.uk) + * Makefile.in (ALL_EMULATIONS): Add earmout[lb].o + * configure.in: Recognize arm{,e[lb]-*-aout. + * config/arm[lb]-aout.mt: New files. + * emulparams/armaout[lb].sh: New files. + * scripttempl/armaout.sc: New file. + +Tue May 16 18:27:11 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * config/ppcle-elf32.mt (EMUL): Use elf32lppc, not elf32ppcle, to + be unique in 8 characters for DOS. + + * emulparams/elf32lppc.sh: New file, renamed from elf32ppcle.sh. + * emulparams/elf32ppcle.sh: Deleted. + +Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com> + 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 + +Wed May 10 18:37:59 1995 Stu Grossman (grossman@andros.cygnus.com) + + * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text + segment. This allows ld -r to preserve unwind sections. + +Tue May 9 17:19:57 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure.in: Add little endian PowerPC support. + + * Makefile.in (ALL_EMULATIONS): Add eelf32ppcle.o. + (eelf32ppcle.c): Support for little endian PowerPC. + + * config/ppcle-elf32.mt: New file for little endian PowerPC. + * emulparams/elf32ppcle.sh: Ditto. + +Wed May 3 12:56:32 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * ldlang.c (print_output_section_statement): Check + subsection_alignment, instead of checking section_alignment twice. + Noticed by Alan Modra <alan@spri.levels.unisa.edu.au>. + +Tue May 2 16:36:07 1995 Jeff Law (law@snake.cs.utah.edu) + + * configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*. + +Mon Apr 24 19:21:02 1995 Michael Meissner <meissner@cygnus.com> + + * ldwrite.c (ldwrite): Before doing anything, reset the error + code. If bfd_final_link returns an error, but the error code is + unset, don't issue an extra message. Assume a correct error + message was already set. + +Fri Apr 14 16:31:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * Makefile.in (ALL_EMULATIONS): Added em68kelf.o. + (em68kelf.o): New target. + * config/m68k-elf.mt, emulparams/m68kelf.sh: New files. + * configure.in: Use them for m68*-*-elf. + +Tue Apr 11 12:02:03 1995 Stan Shebs <shebs@andros.cygnus.com> + + Merge in support for Mac MPW as a host. + (Old change descriptions retained for informational value.) + + * mpw-config.in (i386-unknown-aout): Change to i386-unknown-go32. + (i386-unknown-coff): Remove. + (sh-hitachi-hms): New target. + (emulation_ofiles): Set correctly for each target. + (version, TDEFINES): Add to makefile fragment. + * mpw-make.in (BISON): Use byacc instead of bison. + (em_*.c): Replace with e*.c everywhere. + (ldgram.h): Separate action from ldgram.c generation. + (LD_PROG): Depend on Version.r. + (Version.r): generate from version info. + * mpw-emipsidt.c: New file, modified for MPW from emipsidt.c. + + * mpw-config.in (m68k-apple-macos, ppc-apple-macos, + i386-unknown-aout, i386-unknown-coff): New targets. + (m68k-aout, m68k-coff): Remove targets. + (mk.tmp): Add definition of EMUL. + + * mpw-config.in (emulname): Set based on target. + (ldemul-list.h): Construct. + * mpw-make.in (install-only): New target. + (install): Depend on install-only. + + * mpw-make.in (bindir): Fix pathname. + (install): Move here from mpw-build.in. + + * mpw-config.in: New file, MPW configuration 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. + +Tue Apr 4 17:55:18 1995 Steve Chamberlain <sac@bang.hack.com> + + * ldwrite.c (clone_section): Align clone sections on even + boundaries. + +Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com) + + * configure.in: Change linux to default to elf. Using + i[345]86-*-linuxaout will build a linker which defaults to a.out. + * config/i386-laout.mt: Rename from old config/i386-linux.mt. + * config/i386-linux.mt: Rename from old config/i386-lelf.mt. + * config/i386-lelf.mt: Remove. + +Thu Mar 30 13:09:46 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): If opening the map file fails, call + bfd_set_error before calling einfo. + + * ld.texinfo, ld.1: Document the -no-keep-memory option. + +Mon Mar 27 11:10:08 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Revert patch of March 10, since the SVR4 linker + does mark shared libraries as executable. + +Tue Mar 21 15:15:38 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_common): Change power to int. Pass larger values + before smaller values. + (lang_one_common): Treat info as int *. Don't bother to check for + last value, since it is now zero. + +Sat Mar 18 01:49:14 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (load_symbols): An empty archive is OK. + +Fri Mar 17 16:15:31 1995 Stan Shebs <shebs@andros.cygnus.com> + + * ldmain.c (progress.h): Include. + (main): Call START_PROGRESS and END_PROGRESS. + +Thu Mar 16 17:17:33 1995 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfppc.sc: Move _GOT2_END_ after the .ctors and + .dtors sections, so that these pointers get relocated also. + Define the symbols __{C,D}TOR_{LIST,END}__ to mark the beginning + and end of the constructors/destructors. + +Thu Mar 16 13:59:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * ldlang.c (load_symbols): If whole_archive is true and ENTRY + describes an archive, call bfd_link_add_symbols on each member. + * ldmain.c (whole_archive): New variable. + (main): Initialize it to false. + * ldmain.h: Declare whole_archive. + * lexsup.c (parse_args): Grok --whole-archive switch. + * ld.texinfo, ld.1: Document --whole-archive. + +Thu Mar 16 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com> + + * genscripts.sh (EMULATION_NAME): Set LIB_PATH to empty when not + using the default emulation. + + * config/dgux.mh (HOSTING_EMU): Use -m rather than trying to set + LDEMULATION. + * config/hppaelf.mh (HOSTING_EMU): Likewise. + +Tue Mar 14 12:28:03 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Set force_maj + for -lc.N. From H.J. Lu <hjl@nynexst.com>. + +Fri Mar 10 14:43:48 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): Don't set EXEC_P if link_info.shared is set. + + * ldlex.l: Return -lFILENAME as the token LNAME. + * ldgram.y: Add token LNAME. + (input_list): Treat LNAME like NAME, but pass it to + lang_add_input_file as lang_input_file_is_l_enum. + * ld.texinfo: Document using -lFILENAME in INPUT. + +Thu Mar 9 12:21:51 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * ldlang.c (lang_check): If the architectures are compatible call + bfd_merge_private_bfd_data to let the backend do additional + checks. + +Tue Mar 7 00:53:08 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.c (ldemul_choose_mode): If emulation not recognized, list + all supported emulations. + +Mon Mar 6 14:03:50 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.c (ldemul_list_emulations): New function. + * ldemul.h (ldemul_list_emulations): Declare. + * ldver.c (help): List supported targets and emulations. + +Fri Mar 3 15:40:36 1995 Doug Evans <dje@canuck.cygnus.com> + + * scripttempl/elf.sc (.debug): Relocate to address 0. + (.debug_srcinfo, .debug_aranges, .debug_pubnames, + .debug_sfnames, .line): Likewise. + +Fri Mar 3 17:07:14 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (hold_rel): New static variable. + (gld${EMULATION_NAME}_place_orphan): Place readonly sections with + contents whose names begin with ".rel" after hold_rel. Remove the + assertion which checked for unplaced .rel sections. Don't try to + sort the section into place if place->bfd_section is NULL. + (gld${EMULATION_NAME}_place_section): Set hold_rel to the first + section beginning with ".rel". + +Thu Mar 2 14:34:43 1995 Ian Lance Taylor <ian@cygnus.com> + + Doc note from pierre@phi.la.tce.com (Pierre Willard): + * ld.texinfo: -X and -x work even if -s or -S are not specified. + * ld.1: Similar change. + +Wed Mar 1 13:51:16 1995 Ian Lance Taylor <ian@cygnus.com> + + * emulparams/gld960coff.sh (COFF_CTORS): Define. + * scripttempl/i960.sc: Use COFF_CTORS if CONSTRUCTING. + +Tue Feb 28 12:42:56 1995 Ian Lance Taylor <ian@cygnus.com> + + * configure.in (i[345]86-*-linuxelf*): New target. Use i386-lelf. + (i[345]86-*-gnuelf*): New target. Use i386-gelf. + * config/i386-lelf.mt: New file. + * config/i386-gelf.mt: New file. + +Tue Feb 28 10:27:54 1995 Rob Savoye <rob@darkstar.cygnus.com> + + * configure.in: Match on mips-ecoff, and default to the IDT + configuration. + +Fri Feb 17 13:06:47 1995 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfppc.sc: Add support for .got1 and .got2 sections. + Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area + to double the size of the table. + +Thu Feb 9 18:29:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * Makefile.in (distclean): Do recursive deletion, since ldscripts + is a directory. + +Thu Feb 9 11:38:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (main): If trace_file_tries is true, and we are using + an internal linker script, print out the script. + * ldfile.c (try_open): Reindent function. Make the messages about + opening script files more informative. + + * lexsup.c (parse_args): For -V, call ldversion with 1, not 0. + * ld.texinfo, ld.1: Update accordingly. + +Wed Feb 8 17:34:45 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_one_common): Adjust references to common symbol + information for new structure. + +Mon Feb 6 12:17:24 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldmain.c (undefined_symbol): Handle section being NULL. + + * ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak. + * ldexp.c (fold_name): Likewise. + * ldlang.c (print_one_symbol): Likewise. + (lang_finish): Likewise. + * ldmain.c (multiple_common): Likewise. + * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak + renamed to bfd_link_hash_undefweak. + + * scripttempl/alpha.sc: Set address of .data section correctly + when -n or -N is used. Patch from Chris G Demetriou + <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>. + * scripttempl/mips.sc: Similar change. + +Tue Jan 31 16:20:52 1995 Doug Evans <dje@canuck.cygnus.com> + + * ldlang.c (lang_size_sections): Clarify error message when user + specified start addr conflicts with region. Fix resetting of + region pointer. + +Tue Jan 31 12:37:09 1995 Ian Lance Taylor <ian@cygnus.com> + + * ldexp.c (fold_name): In case NAME, permit an absolute symbol + in lang_allocating_phase_enum. + +Mon Jan 30 11:33:25 1995 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (distclean): Depend upon clean. Don't bother to + remove files which will be removed by clean. From patch by + alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra). + +Fri Jan 27 16:27:34 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): For + a MIPS target, clobber the size of all but the first input + .reginfo section to be 0, so that lang_size_sections sets the + correct size for the output .reginfo section. + +Thu Jan 26 19:53:37 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): + Remove unused variable is. + +Thu Jan 26 12:33:05 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure.in: Add support for powerpc-*-eabi. + + * scripttempl/elfppc.sc: New file for PowerPC embedded ABI + support. + + * emulparams/elf32ppc.sh (SCRIPT_NAME): Use elfppc.sc instead of + elf.sc, which defines some new symbols PowerPC elf needs. + +Tue Jan 24 10:32:15 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldctor.c (ldctor_add_set_entry): Don't dump core if a + constructor entry is in the absolute section. + +Mon Jan 23 13:58:13 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * configure.in (i[345]86-*-gnu*): Set ld_target to i386-gnu. + * config/i386-gnu.mt: New file. Include ELF support. + +Thu Jan 19 16:22:11 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): If + there are any input sections named .gnu.warning, treat them as + containing a warning message to be printed by the linker, and + clobber the size so that the message is not copied into the output + file. + * scripttempl/elf.sc: Put .gnu.warning sections into the .text + section. + +Sun Jan 15 16:45:00 1995 Steve Chamberlain <sac@splat> + + * configure.in (w65-*-*): New target. + * Makefile.in: Update. + * scripttempl/w65.sc: New. + * config/coff-w65.mt: New. + +Thu Jan 12 01:32:25 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com> + + * ldlang.c (lang_place_orphans): Don't ignore files with + just_syms_flag set. Instead, put all their sections in + bfd_abs_section_ptr, using the section VMA as the output_offset. + +Wed Jan 11 22:59:09 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * ldctor.c (ldctor_build_sets): Don't use `const' with typedef + name `reloc_howto_type', since it's now defined to be const. + * ldlang.c (lang_add_reloc): Ditto. + * ldlang.h (lang_reloc_statement_type, lang_add_reloc): Ditto. + +Wed Jan 11 11:24:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldexp.c (fold_binary): Adding or subtracting an absolute value + to a relative value does not require forcing the relative value to + be absolute. Also, reindent function. + +Wed Dec 28 22:05:52 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ldwrite.c (clone_section): Create a symbol with the + same name as the section. + +Mon Dec 19 14:02:13 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ld.h (split_by_reloc, split_by_file): New flags. + * ldwrite.c (clone_section, split_sections): New functions. + * lexsup.c (parse_args): Understand new split options. + +Fri Dec 9 17:22:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * scripttempl/elf.sc: Move .ctors and .dtors from .text segment to + .data segment. They must be writable when creating a shared + library. From H.J. Lu <hjl@nynexst.com>. + +Fri Dec 2 14:09:00 1994 Ian Lance Taylor <ian@rtl.cygnus.com> + + * emultempl/miposecoff.em: New file. + * 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. + + * ld.h (args_type): Add new field embedded_relocs. + * 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. + +Wed Nov 23 22:04:47 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * Makefile.in: Add eshl.o. + * config/coff-sh.mt: Add shl emulation. + +Tue Nov 22 11:55:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * scripttempl/elf.sc: Fill .text section with NOPS. From Eric + Youngdale <eric@aib.com>. + +Thu Nov 17 14:39:48 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + Patches from pirker@eiunix.tuwien.ac.at (Martin Pirker). + * config/i386linux.mh: New file; set HOSTING_CRT0. + * genscripts.sh: Don't put ${libdir} in LIB_PATH if it is + /usr/lib, since that is already in LIB_PATH. + +Wed Nov 16 10:03:03 1994 Jeff Law (law@snake.cs.utah.edu) + + * scripttempl/hppaelf.sc (.text): Handle a use rdefined text start + address. + (.data, .bss): If "-N", then place the data/bss just after the end + of the .text section rather than at the default 0x40000000. + + * scripttempl/hppaelf.sc (.text): Place unwind descriptors in the + text segment. + +Sat Nov 12 15:55:56 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Patches from Eric Youngdale <eric@aib.com>: + * ldlang.c (lang_finish): Don't warn if entry symbol not found + when generating a shared library. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Warn if + attempting to place an orphaned relocation section when generating + a dynamically linked object. + + * scripttempl/elf.sc: Add ENTRY(${ENTRY}), and default ${ENTRY} to + _start. + +Fri Nov 11 14:27:23 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ld.h (args_type): Add field export_dynamic. + * 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. + +Wed Nov 9 12:47:11 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldlang.c (lang_one_common): Set SEC_ALLOC in any section where + we allocate common symbols. + +Tue Nov 8 17:50:43 1994 Eric Youngdale (eric@aib.com) + + * scripttempl/elf.sc: Add .rel.init, .rela.init, .rel.fini, and + .rela.fini to the list of .rel* sections. + +Tue Nov 8 17:47:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldlang.c (load_symbols): Add new argument place. Only accept + linker scripts if place is not NULL. Put commands found in an + assumed linker script into place. + (lookup_name): Pass NULL as place argument to load_symbols. + (open_input_bfds): In lang_input_statement_enum case, pass a place + argument to load_symbols, and store any new statements after the + current one. + +Mon Nov 7 15:53:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * ldver.c (ldversion): Bump to 2.5.3. + +Fri Nov 4 15:11:26 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * Makefile.in (e*nbsd.c): Fix typo in dependencies. + +Thu Nov 3 19:35:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * Makefile.in (check): Add missing "else true" clause. + + * emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out". + + * scripttempl/go32coff.sc: Changes from DJ Delorie: Change default + entry point to "start". Align at end of each section to 0x200. + Start .text section 0x1000 later. Add _etext, _edata, _end + symbols. + +Wed Nov 2 12:17:49 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldctor.c (ldctor_add_set_entry): Don't permit a set to be + composed of different object file formats. + (ldctor_build_sets): If the output format does not support the + reloc, and we are not generating a relocateable link, try getting + the reloc from the input format. + +Tue Nov 1 10:30:19 1994 J.T. Conklin (jtc@rtl.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o. + (em68knbsd.c): New target. + + * config/m68k-nbsd.mt: New file. + * emulparams/m68knbsd.sh: New file. + * configure.in (m68*-*-netbsd*): Use above configs. + +Mon Oct 31 19:35:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an + appropriately named static library, stop the search at that + directory. + +Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o + and esparcnbsd.o; sorted entries. + (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets. + + * config/netbsd532.mt: Removed. + * emulparams/netbsd532.sh: Removed. + + * config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files. + * emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files. + * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*, + sparc*-*-netbsd*): Use above configs. + +Tue Oct 25 11:47:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldmain.c (multiple_common): One of the types may now be + bfd_link_hash_indirect. The old BFD argument may be NULL. + +Thu Oct 20 22:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in: Add * at the end of m68k-hp-hpux. + +Tue Oct 18 15:58:39 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to + YY_CHAR *. + +Mon Oct 17 14:53:16 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * scripttempl/nw.sc: Gather constructors and destructors and + define __CTOR__LIST__ and __DTOR_LIST__ appropriately. + +Fri Oct 14 14:35:38 1994 J.T. Conklin (jtc@rtl.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Add ei386nw.o and eppcnw.o. + (ei386nw.c, eppcnw.c): New targets. + + * config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh, + scripttempl/nw.sc: New files, for i386 and powerpc netware. + + * configure.in: Changed netware ld_target name to be {i386,ppc}-nw + instead of {i386,ppc}-elf. + + * configure.in (sparc*-*-netware): Removed. There is no such + thing anymore. + + * ldint.texinfo: Move misplaced `@end iftex'. + +Fri Oct 14 12:02:18 1994 Eric Youngdale (eric@aib.com) + + * scripttempl/elf.sc: Add .rel.ctors, .rela.ctors, .rel.dtors, and + .rela.dtors to the list of .rel* sections. + +Thu Oct 13 14:16:27 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * ldver.c (ldversion): Update to version 2.5. + * Version 2.5 released. + + * configure.in (all_targets): Handle i386-linux*. + +Thu Oct 13 11:24:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * scripttempl/aout.sc: Set _etext and __etext to ., not + ${DATA_ALIGNMENT}. This is compatible with SunOS, and, with luck, + will not break any other system. From Eric Valette + <ev@chorus.fr>. + +Wed Oct 12 16:22:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * lexsup.c (parse_args): Change -V to be a synonym for -v. Add + --verbose to get the old -V behaviour. + * ld.1, ld.texinfo: Document this change. + +Tue Sep 27 14:56:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove + assertion, since it could fail with a user defined linker script. + + * ldexp.c (fold_name): For DEFINED case, don't try to look up the + name in the hash table during the first phase--the hash table does + not even exist at that point, much less have the right value. + + * Makefile.in (CC): Define. + (CXX): Move definition, change from g++ to gcc. + (EXPECT, RUNTEST): Copy definitions from top level Makefile.in. + (RUNTEST_CC, RUNTEST_CFLAGS): Remove. + (RUNTEST_CXX, RUNTEST_CXXFLAGS): Remove. + (CC_FOR_TARGET, CXX_FOR_TARGET): Copy from top level Makefile.in. + (.cc.o): Comment out. + (testdir): Remove. + (site.exp): Don't create testdir or set tmpdir. + (check): Run checks even if not running native. Use CC_FOR_TARGET + instead of RUNTEST_CC, and likewise for CXX. + (cdtest targets): Comment out. + * config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once. + * cdtest-bar.cc, cdtest-foo.cc, cdtest-foo.h: Remove. + * cdtest-main.cc, cdtest.exp: Remove. + +Mon Sep 26 11:40:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * emulparams/elf32bmip.sh: Rename from elf32mipb.sh to avoid DOS + file naming problems. + * emulparams/elf32lmip.sh: Rename from elf32mipl.sh. + * Makefile.in (ALL_EMULATIONS): Rename eelf32mipb.o to + eelf32bmip.o and eelf32mipl.o to eelf32lmip.o. + (eelf32bmip.c): Rename from eelf32mipb.c. Use elf32bmip.sh. + (eelf32lmip.c): Rename from eelf32mipl.c. Use elf32lmip.sh. + * config/mipsb-elf32.mt (EMUL): Use elf32bmip, not elf32mipb. + * config/mipsl-elf32.mt (EMUL): Use elf32lmip, not elf32mipl. + + * genscripts.sh: Always search /usr/local/TARGET/lib. + + * scripttempl/elf.sc: If -N is set, force DATA_ADDR to be ".". + +Fri Sep 23 15:05:49 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * configure.in: Handle i386-bsdi* targets like i386-bsd. + +Fri Sep 23 00:06:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * lexsup.c (parse_args): Add support for -a for HP/UX + compatibility. + + * lexsup.c (parse_args): -c takes an argument. + +Tue Sep 20 14:35:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ld.h (args_type): Add new field endian. + * lexsup.c (parse_args): Handle -EB and -EL by setting + command_line.endian. + * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments. + * ldlang.c (lang_add_output_format): Add arguments big and little. + If command_line.endian is set, use it to select big or little + rather than the default. Changed all callers. + * ldlang.h (lang_add_output_format): Update declaration. + * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT. + * emulparams/elf32mipl.sh: Likewise. + * emulparams/mipsbig.sh: Likewise. + * emulparams/mipsbsd.sh: Likewise. + * emulparams/mipsidt.sh: Likewise. + * emulparams/mipsidtl.sh: Likewise. + * emulparams/mipslit.sh: Likewise. + * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT if not already defined. Pass them to + OUTPUT_FORMAT. + * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT. + * scripttempl/mipsbsd.sc: Likewise. + + * Makefile.in (ldgram.h): Make separate target from ldgram.c, + depending upon ldgram.c, so that a parallel make does not try to + build both at once. + + * configure.in (mips*el-elf*): New target. + * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o. + (eelf32mipl.c): New target. + + * config/mipsl-elf32.mt: New file. + * emulparams/elf32mipl.sh: New file. + +Fri Sep 16 12:16:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldmain.c (main): Rather than prohibiting ld -r -s, treat it as + ld -r -S -x. + +Thu Sep 15 13:05:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldmisc.c (vfinfo): Print BFD file name as well as file name + returned by find_nearest_line, in case the file name is something + unhelpful such as a .h file. Handle %u. + +Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ldlang.c (lang_do_assignments): Make sure output statement + has an attached bfd_section before trying to dereference it. + +Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ld.h (ld_config_type): Add new field warn_once. + * ldmain.c (undefined_symbol): Handle -warn-once. + * lexsup.c (parse_args): Recognize -warn-once. + * ld.texinfo (Options): Document -warn-once. + * ld.1: Likewise. + + * ldmisc.c (vfinfo): Handle %D as %C, but never print the function + name. For %C, print the function name on a separate line, to keep + the length of error messages under control. + * ldmain.c (multiple_definition): Use %D for ``first defined + here.'' + (undefined_symbol): Use %D for ``more undefined references + follow''. + + * ldmisc.c (multiple_warn): Remove; no longer used. + * ldmisc.h (multiple_warn): Don't declare. + +Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ldlang.c (print_output_section_statement): Print all lines + to the map file. + +Tue Sep 13 16:30:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldlang.c (load_symbols): Check for archive before object. Use + 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. + +Mon Sep 12 17:04:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * config/m68klynx.mh: New file. + +Mon Sep 12 01:50:03 1994 Jeff Law (law@snake.cs.utah.edu) + + * emultempl/hppaelf.em: Add newlines to the error messages. + +Sat Sep 10 16:05:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * config/i386lynx.mh: New file. + * scripttempl/i386lynx.sc: Don't put .ctors and .dtors in .text + unless CONSTRUCTING. + +Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32. + (GENERATE_SHLIB_SCRIPT): Define as yes. + (DYNAMIC_LINK): Define as false. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): + Initialize config.dynamic_link to DYNAMIC_LINK if it is defined. + (gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end. + * Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than + generic.em. + +Thu Sep 8 16:30:37 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * scripttempl/h8500b.sc: Put rdata stuff into own segment. + +Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Don't define; + .got section is now explicitly handled in elf.sc. + +Wed Sep 7 13:08:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * scripttempl/alpha.sc: Redo script to set . outside of sections + and not bother to explicitly specify section addresses. + Explicitly place .sdata section. + +Tue Sep 6 23:51:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/m68kcoff.sc: Put .bss in data segment. + + * scripttempl/h8300.sc: Change .stab and .stabstr to use a VMA of + 0, and to only be marked as NOLOAD if relocating. + * scripttempl/h8500.sc, scripttempl/h8500b.sc: Likewise. + * scripttempl/h8500c.sc, scripttempl/h8500m.sc: Likewise. + * scripttempl/h8500s.sc, scripttempl/i386coff.sc: Likewise. + * scripttempl/i386go32.sc, scripttempl/i386lynx.sc: Likewise. + * scripttempl/m68kcoff.sc, scripttempl/m68klynx.sc: Likewise. + * scripttempl/sh.sc, scripttempl/sparccoff.sc: Likewise. + * scripttempl/sparclynx.sc: Likewise. + +Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * Makefile.in, configure.in: Add support (disabled) the ARM/RISCiX. + * config/riscix.mt, emulparams/riscix.sh, scripttempl/riscix.sc: + New files. + +Tue Aug 30 11:48:08 1994 Eric Youngdale (ericy@cais.cais.com) + + * ld.h (args_type): Add field soname. + * lexsup.c (parse_args): Handle -soname argument. + * emultempl/elf32.em: In call to bfd_elf32_size_dynamic_sections, + pass soname. + * ld.texinfo: Document -soname. + +Mon Aug 29 15:21:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldlang.c (lang_check): Don't try to set the architecture if the + input and output files are incompatible. Just warn. + +Wed Aug 24 12:52:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * configure.in: Change i[34]86 to i[345]86. + +Sun Aug 21 16:17:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * emulparams/hp3hpux.sh: Define __DYNAMIC to be 0. + +Thu Aug 18 15:37:45 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + Make the ELF linker handle orphaned sections reasonably. Also, + define __start_SECNAME and __stop_SECNAME around sections whose + names can be represented in C, for the benefit of symbol sets in + glibc. + * ldemul.h (ldemul_place_orphan): Declare. + (ld_emulation_xfer_type): Add place_orphan field. + * ldemul.c (ldemul_place_orphan): New function. + * ldlang.h (wild_doit): Declare. + * ldlang.c (wild_doit): Make nonstatic. + (lang_place_orphans): Call ldemul_place_orphan. + * emultempl/elf32.em: Include <ctype.h> and "ldgram.h". + (hold_section, hold_use, hold_text, hold_data, hold_bss): New + static variables. + (gld${EMULATION_NAME}_place_orphan): New static function. + (gld${EMULATION_NAME}_place_section): New static function. + (ld_${EMULATION_NAME}_emulation): Initialize place_orphan field. + +Tue Aug 16 00:17:20 1994 Eric Youngdale (ericy@cais.cais.com) + + * scripttempl/aout.sc: Add .linux-dynamic after .data. + +Tue Aug 16 00:08:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * lexsup.c (parse_args) Treat --dll-verbose as --version, for + Linux compatibility. From hjl@nynexst.com (H.J. Lu). + +Mon Aug 15 17:17:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldexp.h (exp_get_abs_int): Declare. + +Sat Aug 6 01:45:39 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ldlang.c (lang_do_assignments): Handle complex AT's better. + * ldexp.c (exp_get_abs_int): New function. + +Fri Aug 5 20:55:55 1994 Jason Molenda (crash@phydeaux.cygnus.com) + + * configure.in: add i960-nindy-coff support. + +Thu Aug 4 14:45:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldlex.l (yy_create_string_buffer): Handle change to internal + interface in flex 2.4.7. + +Tue Aug 2 11:52:06 1994 Eric Youngdale (ericy@cais.cais.com) + + * emultempl/linux.em (gld${EMULATION_NAME}_find_address_statement): + New function; add 0x20 to any use of -Ttext. + (gld${EMULATION_NAME}_create_output_section_statements): New + function. + (ld_${EMULATION_NAME}_emulation): Use the new function + gld${EMULATION_NAME}_create_output_section_statements. + +Mon Aug 1 15:50:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * scripttempl/mips.sc: Redo script to set . outside of sections + and not bother to explicitly specify section addresses. + +Tue Jul 26 11:02:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * scripttempl/elf.sc: Copy several more relocation sections into + the output. Put .got.plt sections into .got. + +Fri Jul 22 12:15:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end. + + 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. + + * ldlang.c (lang_common): Pass desired alignment to + lang_one_common as power of two. + (lang_one_common): Get common symbol alignment from linker hash + table entry. Treat desired alignment as a power of two. + + * ldlang.c (wild_section): Attach all section with the given name, + not just the first one. If there is no name, attach all sections + even if the SEC_IS_COMMON flag is set. + +Wed Jul 20 15:49:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ld.h (args_type): Add field rpath. + * lexsup.c (S_ISDIR): Define if not already defined. + (parse_args): Add support for -rpath. If -R is used to name a + directory, treat it as -rpath for Solaris compatibility. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): + Pass command_line.rpath to bfd_elf32_size_dynamic_sections. + * ldmain.c (main): Initialize command_line.rpath to NULL. + * ld.texinfo: Document -rpath option. + +Sun Jul 10 00:33:24 1994 Ian Dall (dall@hfrd.dsto.gov.au) + + * emulparams/pc532machaout.sh: New file. Pc532 mach script + parameters. + + * emulparams/netbsd532.sh: New file. Netbsd 532 script parameters. + + * config/pc532mach.mt: New file. Pc532 mach target support. + + * config/pc532mach.mh: New file. Pc532 mach host support. + + * config/netbsd532.mt: New file. Netbsd 532 target support. + + * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd support. + + * Makefile.in: Add epcmachaout.c dependency and enetbsd532.c + dependency. + +Fri Jul 8 10:57:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use + bfd_abs_section_ptr, not &bfd_abs_section. + + * lexsup.c (parse_args): Changed "retain-symbols-file" from + no_argument to required_argument. From djm. + +Thu Jul 7 12:29:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * scripttempl/elf.sc: Explicitly mention .stab and .stabstr + sections to force a VMA of 0; needed for ELF backends which have + not been converted to the new linker style. + +Mon Jul 4 19:35:45 1994 Jeff Law (law@snake.cs.utah.edu) + + * scripttempl/hppaelf.sc (__stack_zero): Don't define this name, + it was for the HPUX dynamic loader's use and it creates problems + with ELF GDB. + +Fri Jul 1 12:53:47 1994 Jeff Law (law@snake.cs.utah.edu) + + * ldlang.c (lang_do_assignments): No longer static. Delete decl. + * ldlang.h (lang_do_assignments): Put external decl here. + * emultempl/hppaelf.em: Minor cleanups throughout file. + (hppa_elf_create_output_section_statements): Rewrite. + (hppaelf_finish): Rewrite. + +Wed Jun 29 16:50:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib. + + * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not + accept plain -B. + * ld.texinfo: -Bstatic is not ignored. + +Tue Jun 28 12:13:34 1994 Stan Shebs (shebs@andros.cygnus.com) + + * ldlex.l: Recognize \r the same as \n. + +Thu Jun 23 17:53:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + Preliminary support for generating shared libraries, from Eric + Youngdale <ericy@cais.cais.com>. + * genscripts.sh: If the emulation parameter file sets + GENERATE_SHLIB_SCRIPT, generate a .xs script file with + CREATE_SHLIB defined. + * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): If + link_info.shared is set, use the .xs script file. + * scripttempl/elf.sc: If CREATE_SHLIB is set, don't create a + .interp section, and don't include TEXT_START_ADDR in the starting + address of the first section. + * emulparams/elf_i386.sh (GENERATE_SHLIB_SCRIPT): Likewise. + * emulparams/elf32_sparc.sh (GENERATE_SHLIB_SCRIPT): Define. + +Thu Jun 23 12:52:22 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * configure.in: Change --with-targets to --enable-targets. + +Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * lexsup.c (parse_args): Add support for new options -( -) with + synonyms --start-group --end-group. + * ldlang.h (enum statement_enum): Add lang_group_statement_enum. + (lang_group_statement_type): Define new struct. + (lang_statement_union_type): Add group_statement field. + (lang_enter_group, lang_leave_group): Declare. + * ldlang.c (lang_for_each_statement_worker): Handle + lang_group_statement_enum. + (map_input_to_output_sections, print_statement): Likewise. + (lang_size_sections, lang_do_assignments): Likewise. + (open_input_bfds): Completely rewrite. Now does its own looping, + rather than using lang_for_each_statement. Handle groups. + (lang_process): Update call to open_input_bfds. + (print_group): New static function. + (lang_enter_group, lang_leave_group): New static functions. + * ldfile.c (ldfile_open_file): If the file has already been + opened, just return rather than taking an assertion failure. + * ldver.c (help): Mention new options. + * ld.texinfo: Document new options. + + * ldlang.c (end_of_data_section_statement_list): Don't define. + (lang_leave_output_section_statement): Don't set obsolete variable + end_of_data_section_statement_list. + + * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an + ALIGN. + + * ldlang.c (lang_size_sections): Adjust current region address + even for sections with an explicit address. From + ralphc@pyramid.com (Ralph Campbell). + + * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0. + From jrs@world.std.com (Rick Sladkey). + + * scripttempl/mipsbsd.sc: Let sections align to their natural + boundaries. + +Tue Jun 21 11:27:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ldlang.c (lang_init): Use new bfd_abs_section_ptr, not + &bfd_abs_section. + (lang_abs_symbol_at_beginning_of): Likewise. + (lang_abs_symbol_at_end_of): Likewise. + (lang_size_sections): Use bfd_is_abs_section to check for the + absolute section. Don't try to set the VMA or output_offset or + size of the absolute section. + * ldmain.c (notice_ysym): Use bfd_is_und_section to check for the + undefined section. + +Thu Jun 16 22:48:41 1994 Jeff Law (law@snake.cs.utah.edu) + + * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000 + when generating relocatable objects. + +Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com) + + * 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. + +Thu Jun 16 12:22:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * lexsup.c (parse_args): Add -shared to longopts, and handle it. + * ldmain.c (main): Initialize link_info.shared to false. Give + error if link_info.relocateable and link_info.shared are both set. + + * configure.in: If EMUL_EXTRA* is defined in a config file, treat + it as naming an emulation to be added to EMULATION_OFILES. + * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386. + + * Makefile.in: Rebuilt dependencies. + (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o, + eelf64_sparc.o. Remove $(OTHER_EMULATIONS). + (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets. + * config/i386-linux.mt (OTHER_EMULATIONS): Don't define. + (ei386linux.c): Remove; now in Makefile.in. + * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define. + * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define. + * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define. + * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define. + (eelf64_sparc.c): Remove; now in Makefile.in. + * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define. + (eelf32_sparc.c): Remove; now in Makefile.in. + + * ldexp.c (exp_print_tree): Don't crash if etree_rel section has + no owner--it might be bfd_abs_section. From Eric Youngdale + <ericy@cais.cais.com>. + + * scripttempl/aout.sc: Let sections align to their natural + boundaries. + +Wed Jun 15 01:54:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldemul.h (ldemul_open_dynamic_archive): Declare. + (ld_emulation_xfer_type): Add new field open_dynamic_archive. + * ldemul.c: Include ldexp.h and ldlang.h. + (ldemul_open_dynamic_archive): New function. + * ldfile.h (ldfile_open_file_search): Declare. + * ldfile.c: Include ldemul.h. + (try_open_bfd): Rename from cache_bfd_openr. Return boolean + argument, not bfd *. Change all callers. + (ldfile_open_file_search): Rename from open_a. Return boolean + argument, not bfd *. Clean up. Change all callers. + (ldfile_open_file): If doing a dynamic link, call + ldemul_open_dynamic_archive rather than assuming the extension of + a dynamic object is ".so". + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + New function. + (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive + field. + * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise. + + * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility. + * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility. + Accept -static as a synonym for -non_shared. + + Let the user change the dynamic linker used by ELF code. + * 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. + + * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not + generic.em. + + * lexsup.c (parse_args): Sort out the option macros and change the + definitions to make it easier to add a new option. + + * scripttempl/aout.sc: Define __etext and __edata to go along with + _etext and _edata. + + * ld.h (ld_config_type): Add new field traditional_format. + * lexsup.c (parse_args): Add traditional-format to longopts, and + handle it. + * ldmain.c (main): Initialize config.traditional_format to false. + * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD + flags of output_bfd according to config.traditional_format. + * ldver.c (help): Mention -traditional-format. + * ld.texinfo: Document -traditional-format. + +Tue Jun 14 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldctor.c (ldctor_add_entry): Add entries to a set in the order + they are encountered. + +Tue Jun 14 18:05:09 1994 Eric Youngdale (ericy@cais.cais.com) + + * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000. + (NONPAGED_TEXT_START_ADDR): Define as 0x20. + +Mon Jun 13 15:46:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of + _FTEXT, _ETEXT and _FDATA. Dont define _END. + + * ldfile.c (open_a): If this is not an archive, try to open it in + the current directory before searching for it. + + * lexsup.c (parse_args): Treat -i as a synonym for -r. + + * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that + BLOCK works in a section address as documented. + + * ldgram.y (YYDEBUG): Don't define. + +Fri Jun 10 16:45:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * emultempl/gld960.em: Pass false for new argument to + ldfile_add_library_path. + * emultempl/gld960c.em, emultempl/lnk960.em: Likewise. + + * emultempl/sunos.em: Only look for .so files if doing a dynamic + link. + +Thu Jun 9 08:35:17 1994 Ian Lance Taylor (ian@cygnus.com) + + * scripttempl/i960.sc: Add CONSTRUCTORS to .data. + +Thu Jun 9 06:52:29 1994 Bill Cox (bill@rtl.cygnus.com) + + * Makefile.in (check): Delete ld.new dependency so that a regression + test doesn't trigger a rebuild of the linker. + +Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (map_input_to_output_sections): For lang_address, call + init_os if it hasn't already been called. + +Thu Jun 2 17:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Add support for SunOS shared libraries. + * 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. + * emulparams/sun3.sh (TEMPLATE_NAME): Likewise. + * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em. + (esun3.c): Likewise. + + * ldlang.c: Minor formatting cleanups. + (lang_for_each_input_file): New function. + * ldlang.h (lang_for_each_input_file): Declare. + + * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline + 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. + +Wed Jun 1 14:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.h (lang_input_statement_type): Remove fields subfiles, + total_size, superfile and chain. + * ldfile.c (open_a): Don't clear search_dirs_flag. + (ldfile_open_file): Don't try to open superfile. Assert that file + has not already been opened. + * ldlang.c (new_afile): Don't initialize superfile. + * ldmain.c (add_archive_element): Don't initialize subfiles or + chain or superfile. Initialize search_dirs_flag to false. + +Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * ldver.c (ldversion): Changed version to "cygnus-2.4.1". + + Changes from binutils-2.4 release: + + * genscripts.sh (RELOCATING, CONSTRUCTING): When setting + variables, use whitespace, so scripts don't break. + + * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted. + + * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}. + + * cdtest-bar.cc: Renamed from cdtest-func.cc. + * Makefile.in: Noted change. + + * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I + don't know where that's supposed to come from, or why it's + necessary. + + Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com) + + * configure.bat: update to latest makefile.in + * emulpara/go32.sh: set to coff-go32 not aout + * emultemp/generic.em: strength-reduce the structure of + this shell script, since the only available shell for + DOS can't handle complex syntax. + * emultemp/stringify.sed: for "sed -f" instead of inline. + * makefile.in: depend on stringify.sed as well as genscripts.sh + * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format + * genscripts.sh: empty variables aren't always considered "set", + so set them to "y" instead. + +Fri May 27 01:08:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (entry_symbol): Make static. + (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. + +Tue May 24 16:13:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give + .reginfo an address. + (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address. + (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss. + * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script. + +Thu May 19 13:31:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Add support for ELF shared libraries. + * 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. + +Wed May 18 10:15:39 1994 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): Redirect output of ln to /dev/null. + +Mon May 16 13:35:08 1994 Jeff Law (law@snake.cs.utah.edu) + + * emultempl/hppaelf.em: Change all references of + .hppa_linker_stubs to .PARISC.stubs. + * scripttempl/hppaelf.sc: Likewise. + +Fri May 13 13:00:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (print_output_section_statement): Change ``no attached + output section'' message slightly. + (lang_do_assignments): Don't recurse down if there is no real + section. + + * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to + match corresponding change in emulation templates. + * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise. + * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise. + +Wed May 11 18:16:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * ldver.c (ldversion): Updated version number. + + * cdtest-foo.cc: Use explicit "#pragma implementation". + * cdtest-bar.cc: Renamed from cdtest-func.cc. + * Makefile.in: References to cdtest-func.o changed to + cdtest-bar.o. + +Wed May 11 16:24:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Don't create unnecessary output sections. + * ldlang.c (out_bfd_get_section_by_name): Remove. + (wild_section): Call bfd_get_section_by_name rather than + our_bfd_get_section_by_name. Don't call wild_doit if there is no + section. + (lang_create_output_section_statements): Remove. + (map_input_to_output_sections): For several cases, call init_os if + it has not already been called. + (lang_size_sections): If output section was not created, skip it. + (lang_process): Don't call lan_create_output_section_statements. + (lang_place_orphans): Skip files with just_syms_flags set to true. + * ld.texinfo: Document change. + +Tue May 10 14:31:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (wild_doit): Don't bother initializing the vma and + section size. Don't special case SEC_SHARED_LIBRARY. + (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections + specially. + +Fri May 6 12:24:27 1994 Steve Chamberlain (sac@cygnus.com) + + * config/go32.mh : New file for Xgo32X. + +Fri May 6 15:15:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call + before calling einfo, since we are reporting an fopen failure. + From jrs@world.std.com (Rick Sladkey). + + * configure.in: Use "e" rather than "em_" as prefix for + emulations. + +Fri May 6 01:08:14 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * emultempl/generic.em: Use "e" rather than "em_" as prefix for + filename. + * 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. + + * config/mipsl-idt.mt: Renamed from mips-idtl.mt. + * configure.in: Adjusted. + +Thu May 5 15:07:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (install-info): Don't use "$<*", it doesn't always + work. Instead, check build dir and $srcdir explicitly, and use + `echo' to get all the filenames. + + * configure.in (h8300h-*-hms): Changed ld_target name to + cf-h8300h. + * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it + unique in 8.3. + + * config/i960coff.mt: New file. + * emulparams/gld960coff.sh: New file. + * emultempl/gld960c.em: New file. + * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use + i960coff configuration. + * Makefile.in (em_gld960coff.c): Added dependencies, build rule. + + * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the + code isn't included in FSF releases, and it can still be + explicitly selected. + (distclean): Remove site.bak and tmpdir. + (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES). + (mostlyclean): Delete them explicitly here. Also remove tmpdir. + + Patches from Ralph Campbell: + * config/mipsbsd.mh: New file. + * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc. + * scripttempl/mipsbsd.sc: Don't define __DYNAMIC. + * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out' + instead of `aout'. + + * configure.in (i386-*-gnu*): Treat like i386-*-mach*. + +Wed May 4 11:59:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * config/m68k.mt (EMUL): Set to m68kaout. + * emulparams/m68kaout.sh: New file. + * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o. + (em_m68kaout.c): New target. + + * ldlang.c (lang_size_sections): If dot moves because of an + assignment, don't try to insert a pad into the absolute output + section, just change the address of the default memory region + instead. + + * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur, + cdtest-ur.out, and cdtest-ur.tmp. + +Wed Apr 27 16:03:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/sa29200.sc: Align all sections to four byte + boundaries. + +Wed Apr 27 10:48:03 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in, configure.in: Support for go32 coff. + * config/i386-go32.mt: New file + * emulparams/i386go32.sh: New file + * scripttempl/i386go32.sc: New file + +Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com) + + * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use + Lynx-specific script templates. + * configure.in (sparclite*-*-coff): Use coff-sparc. + * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx. + * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx. + (ENTRY): Set to __main. + * scripttempl/i386lynx.sc: New file, script for I386 Lynx. + * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections. + * scripttempl/sparclynx.sc: New file, script for uSparc Lynx. + +Tue Apr 26 12:41:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16 + byte boundary, in case the global constructors do not take up an + even 16 bytes. + + * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not + exist, get crtbegin based on gcc -print-libgcc-file-name. + (HOSTING_LIBS): Similar change for ../gcc/crtend.o. + +Mon Apr 25 15:27:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (lang_size_sections): When no address is given for a + section, align it according to its requirements. + +Thu Apr 21 17:24:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in (clean, distclean): Remove configdoc.texi. + +Tue Apr 19 12:12:15 1994 Bill Cox (bill@rtl.cygnus.com) + + * configure.in: Add i[34]86-*-bsd386 to the patterns recognized. + +Fri Apr 15 14:35:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (lang_size_sections): When relaxing, adjust the + position of a padding statement, and adjust dot accordingly. + +Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com) + + * Makefile.in (EXPECT, RUNTEST): Set these for the check goal. + +Mon Apr 11 12:32:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/i386coff.sc: If relocating, don't put .init and + .fini sections into .text; keep them separate. + * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not + exist, get crtbegin based on gcc -print-libgcc-file-name. + (HOSTING_LIBS): Similar change for ../gcc/crtend.o. + +Mon Apr 11 10:31:00 1994 Bill Cox (bill@rtl.cygnus.com) + + * Makefile.in (check): Set TCL_LIBRARY for runtest. + +Wed Apr 6 00:09:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the + manufacturer. + + * emultempl/hppaelf.em (hppaelf_finish): Only resize sections + if building a final executable. + +Tue Apr 5 12:17:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (main): Check the return value of bfd_close. + +Thu Mar 31 18:07:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/alpha.sc: Clean up section alignment to ensure that + sections never overlap when using -r. + +Wed Mar 30 15:51:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD + changes: get_symtab_upper_bound renamed and returns long, + bfd_canonicalize_symtab returns long, check for error indications. + +Fri Mar 25 17:20:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (print_input_section): For section size, use + _cooked_size if it is non-zero, size otherwise. + (size_input_section): Likewise. + (lang_do_assignments): Likewise (case lang_input_section_enum). + +Thu Mar 24 15:20:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (new_afile): Add new argument add_to_list. Don't set + real to true for lang_input_file_is_marker_enum. Clear the_bfd. + (lang_add_input_file): Pass true to new_afile for add_to_list. + (lookup_name): Remove force_load argument. Changed all callers. + Pass false to new_afile for add_to_list. Split loading of symbols + out into separate function. + (load_symbols): New function split out of lookup_name. Don't load + the symbols if they are already loaded. + (open_input_bfds): For lang_input_statement_enum call load_symbols + rather than lookup_name. + (lang_process): Pass abs_output_section rather than NULL to + lang_size_sections. + (lang_startup): Set real field of first_file to true. + +Wed Mar 23 14:15:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (had_relax): Removed. + (relax_again): New static variable. + (lang_size_sections): Change call to bfd_relax_section to + correspond to BFD changes. Set relax_again appropriately. + (lang_process): Remove #if 0 code. When relaxing, keep calling + lang_do_assignments and lang_size_sections until relax_again + becomes false. + + * emultemp/gld960.em: Include libiberty.h + (gld960_before_parse): Pass NULL as final argument to concat. + +Tue Mar 22 13:08:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/aout.sc: Force _end and __end to be aligned to a + four byte boundary. + + * ldwrite.c (build_link_order): Handle lang_data_statement_enum by + building a bfd_data_link_order, rather than by setting the section + contents immediately. + +Mon Mar 21 18:28:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Changes to make -Ur work again. + * ldmain.c (add_to_set): Now takes reloc argument rather than + bitsize. Check config.build_constructors here. If an new hash + table entry is created, mark it as undefined. + (constructor_callback): No longer takes bitsize argument. Pass + BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the + BFD backend supports it. + (reloc_overflow): Handle a NULL abfd argument. + (reloc_dangerous, unattached_reloc): Likewise. + * ldctor.c: Include ldmain.h. + (struct set_info): Change bitsize field to reloc. + (ldctor_add_set_entry): Now takes reloc argument rather than + bitsize. Don't bother to check config.build_constructors here. + (ldctor_build_sets): Get the size from the reloc howto. If + generating relocateable output, call lang_add_reloc rather than + lang_add_data. + * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc + instead of bitsize. + * ldlang.h (statement_enum): Add lang_reloc_statement_enum. + (lang_reloc_statement_type): New structure. + (lang_statement_union_type): Add reloc_statement field. + (lang_add_reloc): Declare new function. + * ldlang.c (lang_for_each_statement_worker): Handle + lang_reloc_statement_enum. + (map_input_to_output_sections, print_statement): Likewise. + (lang_size_sections, lang_do_assignments): Likewise. + (print_reloc_statement): New function. + (lang_add_reloc): New function. + * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum. + + * Makefile.in (cdtest.out, cdtest-ur.o): New targets. + (cdtest-ur, cdtest-ur.out): New targets. + (check-cdtest): Now also check that -Ur works correctly. + + * scripttemp/alpha.sc: Align all sections to 16 byte boundaries. + +Thu Mar 17 12:45:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (lang_process): Move lang_common call before + map_input_to_output_sections, to ensure that any alignment + constraints set by common symbols are copied over to the output + sections. + +Fri Mar 11 22:17:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define. + (OTHER_READWRITE_SECTIONS): Rename .toc to .got. + * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em. + * emultempl/ppc.em: Remove ugly stub code; turns out not to be + needed for ELF. + +Tue Mar 8 04:22:27 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * config/i386bsd.mh: New file. + +Mon Mar 7 15:23:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be + defined. + * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext. + (DATA_START_SYMBOLS): Define _fdata. + +Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com) + + * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined. + +Sun Feb 27 16:29:38 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * emultempl/hppaelf.em (hppaelf_finish): Update comments. This + works again. Attach some output symbols to the stub file bfd. + + * emultempl/hppaelf.em: Include elf32-hppa.h. + (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. + +Sat Feb 26 10:58:25 1994 Ian Lance Taylor (ian@cygnus.com) + + * ldmain.c (write_map): Don't define. Removed all references. + Just use map_file or map_filename instead. + (add_archive_element): Use minfo to write map information, not + info_msg. + (constructor_callback): Use fprintf to write map information, not + info_msg. + * ldmain.h (write_map): Don't declare. + * ldgram.y (mri_script_command): Removed reference to write_map. + * ldlang.c (lang_one_common): Likewise. + * lexsup.c (parse_args): Likewise. + +Fri Feb 25 19:12:03 1994 Ian Lance Taylor (ian@cygnus.com) + + * scripttempl/elf.sc: Force all sections to be aligned. + + * ldgram.y (section): Reverse the order of memspec_opt and + fill_opt to avoid an ambiguity when both are used. + * ld.texinfo: Changed accordingly. + + * ldgram.y: Move include of ldlex.h back with other includes. + * 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. + + * ldgram.y (dirlist_ptr): Removed; not used. + * lexsup.c: Include ldver.h. + * Makefile.in: Rebuilt dependencies. + +Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com) + + * ldlang.c (lookup_name): don't call bfd_set_gp_size. + (ldlang_add_file): call it here instead. + +Fri Feb 25 18:13:46 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * ldgram.y: Include ldlex.h after %token decls, for byacc. + +Fri Feb 25 10:47:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * emultempl/hppaelf.em: First attempt to clean this file up. + 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. + + * ldlang.c (lang_size_sections): No longer static (PA ELF calls + 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. + +Thu Feb 24 16:47:33 1994 Ian Lance Taylor (ian@cygnus.com) + + * configure.in (powerpc-*-elf*): New target; use ppc-elf32. + * 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. + +Thu Feb 24 12:27:07 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * lexsup.c (parse_args): Use symbolic numbers for long options. + Fix misunderstanding in -Y and -call_shared et al. + + Use getopt instead of lex and yacc to parse the command line. + + * 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. + +Thu Feb 24 08:43:26 1994 Ken Raeburn (raeburn@rtl.cygnus.com) + + * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't + require that it be in $(srcdir). + +Tue Feb 22 09:21:18 1994 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (lang_size_sections): Only align section to alignment + required by linker script, not to maximum alignment of input + sections. + + * ldlang.h (largest_section): Don't declare. + * ldlang.c (largest_section): Don't define. + (size_input_section): Don't set largest_section; not used. + +Mon Feb 21 15:15:29 1994 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (new_afile): Pass NULL as last argument to concat. + +Thu Feb 17 15:51:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c, ldmain.c: Include libiberty.h. + + * ldmisc.h (concat): Don't declare. + * ldmisc.c (concat): Don't define; just use the one in libiberty. + + * ld.h (as_output_section_statement): Removed; not used. + +Thu Feb 17 09:32:14 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and + bfd_set_error and new error names. + +Tue Feb 15 20:14:53 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * ldwrite.c (build_link_order): If the cooked size of the section + has been set, use it, for determining link_order size. + (ldwrite): In the error message displayed if bfd_final_link fails, + indicate that it was in fact the final link step that failed. + + * ldlang.c (lang_size_sections): Clear bfd_error before calling + bfd_relax_section, in case it returns false but doesn't flag an + error. If an error is returned, indicate which one it is in the + error message. + + * Makefile.in (install-info): Depend on ld.info, and use "$<*" so + it'll get picked up from $(srcdir) if appropriate. + +Tue Feb 15 16:32:04 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set. + * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT. + +Fri Feb 11 17:02:49 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldlex.l (comment): Increment line number when newline is read. + +Fri Feb 11 17:36:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (lookup_name): Take new argument, force_load. If true, + reload the file even if it is already loaded. + (wild): Call lookup_name with force_load argument of 0. + (open_input_bfds): Call lookup_name with force_load argument of 1. + (print_symbol): Remove declaration of non-existent function. + (print_one_symbol): Return true rather than falling off end. + +Thu Feb 10 11:52:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (main): Use %ld when printing long values. + + * scripttempl/elf.sc: Move _edata after the .sdata section. + Permit OTHER_BSS_SYMBOLS to be defined. + * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss. + +Mon Feb 7 16:31:15 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * Rename all "hppaosf" files to "hppaelf". + * Change all "osf" references to "elf" in hppaelf files. + * Makefile.in: Likewise. + * configure.in: Likewise. + +Sun Feb 6 20:31:56 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmain.c (main): Call xatexit, not atexit. + Call xmalloc_set_program_name. + + * ldlang.c (lang_size_sections): Check if bfd_relax_section set + bfd_errno. + +Sat Feb 5 03:54:34 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * emultempl/lnk960.em (append), emultempl/hppaosf.em + (hppaosf_finish): Call xmalloc, not ldmalloc. + * ldmain.c (preserve_output): Function removed. + (main): Do it here instead. + +Fri Feb 4 23:02:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused) + GNU C specific macros. + + * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining + call to LANG_FOR_EACH_INPUT_SECTION. + +Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions + deleted; will use libiberty versions instead. + * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c + mri.c Makefile.in: Change callers. + + * ldmisc.c (vfinfo): Remove cleanup code. + * ldmain.c (remove_output): Put it here (new function). + (preserve_output): New function. + (main): Register remove_output and preserve_output with atexit. + * ldmain.c ldgram.y: Call xexit instead of exit. + * ldmisc.h: Declare xexit. + +Fri Feb 4 15:19:01 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in: Lots of new H8/500 memory models. + +Sun Jan 30 14:33:40 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * ldlex.l: Removed duplicate rules. + (yywrap): Provide default definition, needed with some versions of + flex. + +Fri Jan 28 09:12:56 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print + the archive filename too. + + * ldlex.l: Add rule to catch invalid input characters instead of + printing them. Include "ldmain.h" for program_name decl. + (lex_warn_invalid): New function. + * Makefile.in: Add dependency. + +Fri Jan 28 12:58:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (check): Don't bother running any tests of + cross-linker until the test suite no longer assumes native mode. + +Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ldlang.c (print_one_symbol, print_input_section): Print + global symbols in symbol table again. + +Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given, + exit successfully instead of complaining if no input files are + given. + +Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com) + + * Makefile.in: Format variable definitions consistently. + (LD_PROG): Remove unnecessary variables from link command, + change variable LOADLIBES to EXTRALIBS. + + * ldmain.c (main): Compute and display total execution time. + * ld.texinfo (-stats): Document the option. + +Mon Jan 24 12:56:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (reloc_overflow): Added name, reloc_name and addend + arguments. + + * ldlang.c (lookup_name): Set BFD GP size to -G argument value + after opening BFD. + + * ldlang.c (relaxing): Removed global variable. + (lang_size_sections): If the canonical symbols have not already + been read in, read them in before relaxing. + * ldlang.h (relaxing): Removed declaration. + +Fri Jan 21 00:44:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (new_afile): Initialize loaded field to false. + (lookup_name): If file was already loaded, don't call the + add_symbols entry point again. + +Wed Jan 19 13:57:00 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ld.texinfo: Clarify what -T option does. + +Tue Jan 18 16:18:15 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's + for a.out. + +Tue Jan 11 13:22:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (add_archive_element): If trace_files or + trace_file_tries, print file name. + * ldlang.c (lookup_name): Likewise. + (ldlang_add_file): Don't put files on input_bfds list in reverse + order. + + * scripttempl/elf.sc: Correct typo. + +Mon Jan 10 19:49:05 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and + their arguments optional, for compatibility with the old GNU ld. + +Fri Jan 7 20:00:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/elf.c: Define __bss_start before the .sbss section. + +Thu Jan 6 00:13:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (add_to_set): Add bitsize argument. + (constructor_callback): New function. + (link_callbacks): Add constructor_callback. + * ldctor.c (struct set_info): Add bitsize field. + (ldctor_add_set_entry): Add bitsize argument. + (ldctor_build_sets): Base the size of the elements of the set on + the bitsize, rather than always using LONG. + * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration. + + * ld.h (QUAD_SIZE): Define. + * 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. + + * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections, + since the Alpha doesn't use them. + +Wed Jan 5 17:42:16 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldemul.h (ld_emulation_xfer_struct): Comment the members. + +Sat Jan 1 13:39:31 1994 Rob Savoye (rob@darkstar.cygnus.com) + + * Makefile.in, configure.in: Add support for VSTa micro-kernel. + * config/vsta.mt, emulparams/vsta.sh: New files for VSTa. + +Sat Jan 1 10:53:35 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating; + needed for i386mach. (Should be a no-op on other systems.) + + * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again. + (PAGE_SIZE): Don't define; not used. + +Fri Dec 31 16:12:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldgram.y (yyerror): Make argument const char *, and actually + print it out rather than assuming it is a syntax error. + * ldmisc.h: Change declaration of yyerror. + * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate. + +Fri Dec 31 11:37:28 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include + exec header offset, since the exec header isn't loaded. + (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c. + +Thu Dec 30 13:01:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + A major rewrite to move the bulk of the linker into BFD so that + 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. + +Thu Dec 16 21:19:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + + * ldmain.c (lprefix): Change default from a char to a string + 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. + +Tue Dec 14 17:19:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlex.h: Don't declare yywrap if it is a macro. + * ldlex.l: Include sysdep.h. + * ldlang.c (lang_for_each_statement_worker, + lang_for_each_statement): Forgot to use PARAMS. + +Mon Dec 13 14:30:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in: Added .PHONY targets where appropriate. Added some + comments. Also: + (gcclibdir, version): Removed unused variables. + (DEP): New variable, set to mkdep. + (ALL_CFLAGS): New variable. Used in .c.o target. + (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New + variables. + (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES, + GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed + mostly obsolete variables. Adjusted remaining uses. + (DEF_EMUL): Removed variable. + (ldmain.o): Handle undefined EMUL error correctly. + (ldemul-list.h): Depend on config.status rather than Makefile. + Create via temporary file. + (ver960.c, roll, make): Removed obsolete targets. + (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild + dependencies. + * dep-in.sed: New file, used when rebuilding dependencies. + +Sat Dec 11 14:43:44 1993 Ian Lance Taylor (ian@deneb.cygnus.com) + + Made many changes to eliminate gcc warnings. Made various + cosmetic changes, declared various things in header files, removed + various extern declarations from .c files. No substantive + changes. + + * ldlang.c (lang_process): Ifdef out final call to + lang_size_sections again (reverting change of Nove 2), since it + breaks the Sun4 linker. + +Thu Dec 2 16:31:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in (alpha-*-netware*): New target; use alpha. + +Wed Dec 1 14:04:20 1993 Ken Raeburn (raeburn@cygnus.com) + + * configure.in: Group targets by CPU. Merge some m68k target + entries with different CPU specs that use the same ld_target + values. + + * configure.in: Add sparc*-*-coff. + * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files. + * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o. + (em_coff_sparc.c): Add dependencies and build rules. + + * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare. + +Wed Dec 1 12:19:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval): + New tokens. + (command_line_option): Accept and ignore them (for now). + * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On + where n is a number. + +Mon Nov 22 14:14:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (subfile_wanted_p): If merging a common symbol which is + not in bfd_com_section, create the section in the BFD so that it + can be placed in the right output section. + +Fri Nov 19 14:12:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32. + * emulparams/elf32mipsb.sh (DATA_ADDR): Define. + (OTHER_READONLY_SECTIONS): Define for .reginfo. + (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK. + * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating. + Move OTHER_READONLY_SECTIONS after all the other readonly + sections. Don't use DATA_ADDR twice. + + * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If + p is in a common section, make sure the BFD has a section of that + name. + + * ldlang.c (lang_common): Add newline to error message. + +Thu Nov 11 15:54:41 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a + Lynx-specific script instead of m68kcoff. + (OUTPUT_FORMAT): Define as "coff-m68k-lynx". + (ENTRY): Define as __main. + (TEXT_START_ADDR): Define as 0. + (PAGE_SIZE): Define as 0x1000. + * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment. + * scripttempl/m68klynx.sc: New file. + +Mon Nov 8 12:00:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3 + arguments rather than treating them as emulation names. + +Fri Nov 5 09:02:52 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com) + + * configure.in: Support x86 unixware and netware plus generic netware. + +Fri Nov 5 21:47:55 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): + Correct values (?). + +Wed Nov 3 15:10:15 1993 Ken Raeburn (raeburn@rover.cygnus.com) + + * Makefile.in (distclean): Don't delete dvi or info files. + (ld.info): Update dependency list. + (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi. + +Wed Nov 3 12:07:39 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT. + Set output_filename instead of creating a new node. + (open_output): Don't set output_filename. + (lang_final): Create the new node here. + * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT. + +Tue Nov 2 15:45:51 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + + From Pete Hoogenboom (hoogen@cs.utah.edu): + + * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext, + edata, _edata, end): Add definitions of these symbols. + (__end): Remove definition of this symbol. + (__data_start): Move definition of this symbol. + + * emultempl/hppaosf.em: Various fixes and support for linker stub + 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. + + * ldlang.c (lang_process): Re-enable last call lang_size_sections. + Pass abs_output_section rather than NULL to avoid invalidating + absolute symbols. + +Thu Oct 28 21:16:42 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o. + (em_i386mach.c): New rule. + * configure.in (i[34]86-*-mach*): New case. + * config/i386-mach.mt: New file. + * emulparams/i386mach.sh: New file. + +Fri Oct 29 14:55:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ld.h (flag_is_*): Removed macros. + * ldmain.c (enter_global_ref), ldsym.c (write_file_locals): + Consistently check the BFD symbol flags directly, rather than + using file_is_* macros. + +Thu Oct 28 19:08:42 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * configure.in (sparc*-*-lynxos*): New target. + * Makefile.in: Add rule for em_sparclynx.c. + (ALL_EMULATIONS): Add Lynx emulations. + * config/sparc-lynx.mt: New file. + * emulparams/sparclynx.sh: New file. + * scripttempl/sparccoff.sc: New file. + +Thu Oct 28 13:50:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in: Add dependency for $(EMULATION_OFILES). + +Mon Oct 25 16:09:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * relax.c (write_relax): Check return value of bfd_seclet_link. + +Mon Oct 25 09:31:21 1993 Ken Raeburn (raeburn@cygnus.com) + + * ldlang.c (delete_output_file_on_failure): New variable. + (open_output): Set it after bfd open succeeds. + * ldmisc.c (vfinfo): Test it. + + Changes from Peter Hoogenboom, hoogen@cs.utah.edu: + + * ldsym.c (write_file_locals): Set the BSF_FILE flag for object + symbols. + + * ldemul.c: Support was added to allow emulation-specific + processing to occur. This support was added primarily for linker + stub generation in the elf32-hppa gld. + (ldemul_finish, ldemul_create_output_section_statements): New + functions. + * ldemul.h: Support was added to allow emulation-specific + processing to occur. (As described above.) Added finish and + create_output_section_statements fields to + ld_emulation_xfer_struct structure. + * ldlang.c: Add calls to emulation-specific routines. + (lang_process): Add call to + ldemul_create_output_section_statements function. + (lang_process): Add call to a emulation-specific routine (and + some processing after the call). + +Fri Oct 22 20:54:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * configure.in: mips*- instead of mips-, mips*el changes + +Tue Oct 19 15:46:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in (alpha-*-osf*): New target; use alpha.mt. + * Makefile.in (ALL_EMULATIONS): Added em_alpha.o. + (em_alpha.c): New target; use alpha.sh and alpha.sc. + * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define. + * config/alpha.mt: New file. + * emulparams/alpha.sh: New file. + * scripttempl/alpha.sc: New file. + +Fri Oct 15 02:20:04 1993 Doug Evans (dje@canuck.cygnus.com) + + * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle + types of different sizes (eg: 64 and 32 bits), so coerce. + * ld.h (ALIGN_N): Add warning about usage. + +Wed Oct 13 16:02:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldmain.c (enter_global_ref): Just ignore any weak symbol for + which we already have a definition, rather than checking in + several different places whether the symbol is weak. + +Tue Oct 12 17:30:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in (mips-*-elf*): New target; use mipsb-elf32. + * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and + OTHER_READWRITE_SECTIONS if relocating. Shell variables are not + expanded within them. + * config/mipsb-elf32.mt: New file. + * emulparams/elf32mipb.sh: New file. + * Makefile.in (em_elf32mipb.c): New target. + +Thu Sep 30 17:00:36 1993 Rob Savoye (rob@darkstar.cygnus.com) + + * ldgram.y: In input_list, change lang_input_file_is_file_enum to + lang_input_file_is_search_file_enum so objects brought in using + INPUT() do a path lookup. + +Tue Sep 28 13:31:23 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx + instead of {i386,m68k}-coff. + * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets. + * config/i386-lynx.mt: New file. + * config/m68k-lynx.mt: New file. + * emulparams/i386lynx.sh: New file. + * emulparams/m68klynx.sh: New file. + + * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY}, + but defaulting to _start. + + * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h, + ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with + LynxOS libc. + +Thu Sep 23 14:51:03 1993 Ian Lance Taylor (ian@cygnus.com) + + * config/solaris2.mh: New file. Define HOSTING_CRT0 and + HOSTING_LIBS for testing. + +Fri Sep 17 17:52:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Finish up support for i386-sysv4 (without shared libraries): + * ld.h (flag_is_weak): Define. + * ldlang.c (print_symbol): Mention whether symbol is weak. + (print_input_section): Print weak symbols as globals. + * ldmain.c (refize): Do not zero out BSF_WEAK flag. + (enter_global_ref): Do not warn if a weak symbol redefines a + global symbol. Do not let a weak symbol redefine a common symbol. + (enter_file_symbols): Treat weak symbols as global symbols. + (subfile_wanted_p): Do not pull in an object file from a archive + just to resolve an undefined weak symbol. + * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal + error; the error might be that malloc has run out of space. + * ldsym.c (write_file_locals): Treat weak symbols as global. + * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets; + use i386-elf. + * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib. + * config/i386-elf.mt: New file; set EMUL to elf_i386. + * emulparams/elf_i386.sh: New file. + * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0). + * Makefile.in (NATIVE_LIB_DIRS): Define to be empty. + (ALL_EMULATIONS): Add em_elf_i386.o. + (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument. + (em_elf_i386.c): New target, like other em_*.c targets. + ($(LD_PROG)): Pass $(CFLAGS) to $(CC). + * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If + nonempty, and configured for native, add it to LIB_PATH. + +Fri Sep 17 13:07:39 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}: + Added statements to pass stab and stabstr sections through and + mark them as NOLOAD, which makes GDB happier. + +Wed Sep 15 16:02:29 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * configure.in: Accept m68k-lynx-lynxos config. + + * Makefile.in: Use $(SHELL) to run genscripts.sh. + +Sun Sep 12 16:04:40 1993 Doug Evans (dje@cygnus.com) + + * config/coff-h8300.mt: Add EMUL=h8300h. + + * ldmain.c (main): Call set_scripts_dir after argv has been processed. + +Fri Sep 10 09:36:29 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: Changed CXX back to g++. + +Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule. + +Fri Sep 10 07:26:57 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in (TAGS): Use shell wildcards. + +Tue Sep 7 18:04:54 1993 Jeffrey Osier (jeffrey@cygnus.com) + + * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target + +Fri Sep 3 16:46:41 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * ld.texinfo: re-enable included config file; conditionalize doc + for -oformat to interact properly with SingleFormat doc config + var; rename @up/@down to @raisesections/@lowersections. + +Wed Aug 25 16:29:56 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * configure.in: recognize m88110. + +Tue Aug 24 18:49:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + From Peter Hoogenboom <hoogen@shafer.cs.utah.edu>: + * 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. + +Tue Aug 24 16:17:00 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no + longer in bfd.h. + + * ldlang.c, ld.h: updated copyright. + +Tue Aug 17 15:22:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldlang.c (open_output, lang_check): Check return value of + bfd_set_arch_mach. + +Tue Aug 17 07:02:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + * scripttempl/h8500.sc: Start all sections in a different segment. + * scripttempl/z8ksim.sc: Handle constructors + +Thu Aug 12 16:05:37 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: revert earlier changes back to execute runtest + with make check. cdtest and bootstrap now function as they + did within the Makefile. + +Thu Aug 12 10:20:05 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in: Update dependencies. + + * configure.in: Set EMULATION_OFILES in Makefile based on + --with-targets option. + +Thu Aug 12 08:52:29 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: check targets reimplemented to old way. + +Wed Aug 11 08:26:11 1993 Ian Lance Taylor (ian@cygnus.com) + + * config/i386v.mh, config/irix4.mh: Use gcc + -print-libgcc-file-name rather than $(libdir)/libgcc.a. + * config/i386sco.mh: New file; copy of i386v.mh to correspond to + bfd/configure.host change. + +Mon Aug 9 14:25:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * scripttempl/elf.sc: Handle .line and .debug* sections. + + * ldlex.l: Use bfd_scan_vma, not strtoul. + +Fri Aug 6 08:57:39 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c: + Remove inital caps in some error messages, change "can't" to + "cannot", add missing colons. + * ldmisc.c (vfinfo): Print "%%" as a single %. + For '%' followed by unrecognized character, print them both + verbatim instead of expecting a char * arg. + For '%C', don't put the function name in parens. + + * ldexp.c (invalid): Pass "%%", not "% ". + +Fri Aug 6 14:31:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss. + (BSS_VAR): Removed; now always define _fbss. + * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR): + Removed. + +Thu Aug 5 15:55:19 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * configure.in: z8k-coff is the same as z8k-sim + +Wed Aug 4 21:00:18 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * testsuite/lib/ld.exp: new file + * testsuite/config/unix-ld.exp: new file + * testsuite/ld.bootstrap/bootstrap.exp: new file + * Makefile.in: add dejagnu support for make check + +Wed Aug 4 17:52:32 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldlex.l (comment): Add missing newline in message. + * ldindr.c (add_indirect): Ditto. + * ldexp.c (exp_fold_tree): Ditto. + +Tue Aug 3 10:57:41 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons + into externs. + + * ldmisc.c (multiple_warn): New function. + * ldmisc.h: Declare it. + * ldmain.c (enter_global_ref): Call it. + * ld.h (ld_config_type): Add warn_common. + * ldlex.l, ldgram.y: Set it with -warn-common option. + * ldver.c (help): Document it. + +Mon Aug 2 12:04:36 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and + target-specific sections, and for changing data section vma. + +Mon Jul 26 14:00:02 1993 Ken Raeburn (raeburn@deneb.cygnus.com) + + * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New + terminals, for Solaris. + (dirlist_ptr): New static variable. + (command_line_option): Accept new options. + + * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and + "-YP,...". + + * config/sun4sol2.mt: Pass emulation name without ".sh". + + * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c. + * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly. + +Fri Jul 23 13:51:09 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * scripttempl/elf.sc: Add support for .init, .fini, .ctors, + .dtors, .data1, .rodata1 sections, instead of combining them into + other sections. For `-r', set all section start addresses to + zero. + + * emulparams/elf32-sparc.sh (TEXT_START_ADDR, + NONPAGED_TEXT_START_ADDR): Value should be 0x10100. + (MAXPAGESIZE): Renamed from PAGE_SIZE. + +Wed Jul 21 14:28:42 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * genscripts.sh: If this is the default emulation, set + COMPILE_IN. + * emultempl/*.em: Use it to determine whether to compile in the + scripts. + + * Makefile.in (GENSCRIPTS): Pass the default emulation name to + genscripts.sh. Pass the current emulation name without ".sh" on + the end. + * genscripts.sh: Take an default emulation arg. + Use the current emulation name as EMULATION_NAME. + Make default lib path for cross-compiling ':', not null. + * emulparams/*.sh: Don't set EMULATION_NAME. + * ldemul.c (ldemul_get_script): Take isfile arg. + Pass it to emulation's get_script function. + * ldemul.h: Adjust get_script prototypes. + * ldfile.c (ldfile_find_command_file): Renamed from find_a_name. + No longer static. + * ldfile.h: Declare it. + * ldgram.y: Accept a script on the command line again, + for parsing compiled-in scripts. + * ldmain.c (main): If ld script is a file, parse it as a -T + option, otherwise parse it directly. + * emultempl/*.em (*get_script): Return the scripts themselves if + this is the default emulation; otherwise return their file names. + * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of + generic.em. + * emulparams/m88kbcs.sh: Use it. + + * ld.h (ld_config_type::unix_relocate): Remove unused element. + +Tue Jul 20 12:01:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which + there's no change log entry yet, tsk tsk) from the list of + emulations compiled in until Mark gets around to checking in + emulparams/i386linux.sh. + (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is + changed, this file gets updated. + +Fri Jul 16 14:14:32 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldgram.y (OPTION_Lfile): New token. + (command_line_option): Accept OPTION_L NAME (whitespace after -L). + * ldlex.l (<COMMAND>): Accept -L without FILENAME. + +Fri Jul 16 13:44:26 1993 Doug Evans (dje@canuck.cygnus.com) + + * configure.in: h8/300h support needs own .mt file. + config/coff-h8300h.mt: New file. + +Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmain.c: Don't include sys/stat.h; it already got included + somewhere along the way. + +Thu Jul 15 14:43:34 1993 Doug Evans (dje@canuck.cygnus.com) + + * Makefile.in: Add h8300h support. + emulparams/h8300h.sh: New file. + scripttempl/h8300h.sc: New file. + +Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldfile.c (ldfile_open_file): In error message, use the name the + user gave (e.g., "-lc"), rather than the base file name. + + * ldexp.c (exp_fold_tree): Don't assign an int to an enum. + + * ldmain.[ch]: Remove initial Q_ from function names. + * ldexp.c, ldindr.c, ldlang.c: Change callers. + + * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries. + + * ldlang.c (lang_process): Move loading of default script from + here to main. Add a "/" to start of script name to prevent + finding it in "." first. + + * ldmain.c (set_scripts_dir): Don't look in "." first. + + * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var + option_longmap. + +Thu Jul 15 10:55:59 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (em_m88kbcs.c): Correct dependency. + * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET + statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}. + * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs. + +Wed Jul 14 21:42:53 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldfile.c (ldlang_open_file, ldfile_open_command_file), + main.c (main): Print the errno string in the error message. + +Tue Jul 13 20:00:30 1993 Doug Evans (dje@canuck.cygnus.com) + + * configure.in: Accept h8300h for target cpu. + + * ldmisc.c (vfinfo): Have demangle remove leading underscore if + present (demangle is smart enough to know whether to do it or not). + +Mon Jul 12 11:45:48 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for + ldscripts, as well as <ld bin dir> and SCRIPTDIR. + + * ldlang.c (lang_process): Use sizeof instead of magic constant. + + * ldmain.c (get_emulation, check_for_scripts_dir, + set_scripts_dir): New functions. + (main): Call them. + +Mon Jul 12 10:57:03 1993 Ken Raeburn (raeburn@deneb.cygnus.com) + + * scripttempl/elf.sc: Include .init, .fini, .rodata sections. + Create symbol "end" instead of "__end". Comment out some parts + that may not be needed (yet) for elf. + + * configure.in: Accept sparc-elf and sparc-solaris2 configs. + +Thu Jul 8 15:33:32 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS). + + * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro + when no prototype is being supplied. + (ldmalloc, ldrealloc): Size argument is now size_t. + + * ldmisc.c (finfo): New function, accepts FILE* argument. + (vfinfo, case 'v'): New format character; displays bfd_vma in hex + without leading zeros. + (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a + bfd_vma value, instead of fprintf(%x) which won't hold a long long + value. + (concat, buystring): String lengths are size_t. + (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t. + + * ldlang.c (new_statement): Size argument is now size_t. Added + forward declaration with prototype. + +Thu Jul 8 10:53:47 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldgram.y (OPTION_v): Don't turn on verbose output. + +Wed Jul 7 17:10:45 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * ldlex.l: Get rid of local typedef for bfd_vma! Get it from + bfd.h instead. + +Wed Jul 7 11:33:12 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): Don't install as $(tooldir)/bin/gld; + collect2 doesn't look for gld any more anyhow. + +Mon Jul 5 14:29:48 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (lang_relocate_globals): Skip indirect symbols, which + now have a non NULL srefs_chain. + + * config/hp300hpux.mt: Use emulation hp3hpux rather than + hp300hpux, since the latter does not exist. + +Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * genscripts.sh: Put the scripts in the ldscripts directory, not + emulations. + * configure.in (ldscripts): Make, instead of emulations. + * Makefile.in (scriptdir): Take off the "ld" part. + (install, clean, distclean): Use ldscripts, not emulations. + In tests, don't pass -Lemulations. + Don't pass tooldir/lib to genscripts.sh. + * genscripts.sh: Don't take tooldir/lib arg. + * ldlang.c (lang_process): Add "ldscripts/" to the name of the + default script file. + +Fri Jul 2 17:13:35 1993 Doug Evans (dje@canuck.cygnus.com) + + * scripttempl/h8300.sc: Add .tors section for constructor/destructors. + +Thu Jul 1 16:38:45 1993 Doug Evans (dje@canuck.cygnus.com) + + * config/coff-h8300.mt: EMUL=h8300hms -> h8300. + +Wed Jun 30 15:45:55 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * Makefile.in (.y.c): skip default .y.c rules. gnu make can now + run in parallel without colliding on yacc's static file names. + Without the stub rule, make will try to start two yacc's + concurrently which fails because of yacc's static file names. + +Tue Jun 29 12:20:36 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldmain.c (subfile_wanted_p): Don't dump core if there are no + symbols. + +Mon Jun 28 12:22:11 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's + different from libdir. + + * Makefile.in (scriptdir): Base on tooldir, not datadir. + +Sat Jun 26 12:03:57 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldver.c (help): New function. + * ldver.h: Declare it. + * ldlex.l, ldgram.y: Recognize new options --help and --version. + +Mon Jun 21 20:39:48 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) + + * Makefile.in (INCLUDES): Don't need ../include any more. + +Mon Jun 21 16:38:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldlex.l, ldgram.y: Support new -oformat option. + Remove attempt at supporting script fragments on the command line. + * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT. + * mri.c (mri_format), ldgram.y: Change callers. + * ldlang.h: Change prototype. + +Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com) + + * Makefile.in: canonicalize install.sh; for use within + this directory (and subdirs) + +Thu Jun 17 14:33:09 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldgram.y: Tweak grammar to make reporting of invalid options work. + + * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc + and .cc.o rule. + +Wed Jun 16 11:45:32 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * ldfile.c (ldfile_open_command): Don't try .ld extension. + 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. + +Tue Jun 15 23:04:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * Makefile.in (INCLUDES): Look in ../include, not ../bfd. + + * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO + dependent on RELOCATING, not RELOCATION. + * hp3hpux.sh (SHLIB_PATH): Define it. + +Mon Jun 14 19:06:15 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * 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. + +Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) + + * Makefile.in: remove parentdir support, use INSTALL_XFORM + +Thu Jun 10 14:00:06 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldexp.c (exp_fold_tree): Don't lose the old flag bits. + * ldgram.y (statement_list_opt): New nonterminal, either empty or + statement_list. + (section): Use statement_list_opt, not statement_list. + * m68kcoff.sc-sh: Gather constructors and destructors and define + __CTOR_LIST__ and __DTOR_LIST__ appropriately. + * sa29200.sc-sh: Gather constructors and destructors and define + ___CTOR_LIST__ and ___DTOR_LIST__ appropriately. + +Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h. + * configure.in: No longer need to configure to get sysdep.h. + +Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: remove install:all and install-info:info + dependencies (these cause some spurious rebuilds at 'make install' + time) + +Fri Jun 4 08:50:14 1993 Ian Lance Taylor (ian@cygnus.com) + + * configure.in (mips-idt-ecoffl*): New target; use mips-idtl. + (mips-idt-ecoff*): Added trailing '*'. + * config/mips-idtl.mt: New file; use EMUL of mipsidtl. + * mipsidtl.sh: New file; like mipsidt.sh, but little endian. + * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o. + + * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and + incorrect definitions. + +Tue Jun 1 14:56:10 1993 Per Bothner (bothner@rtl.cygnus.com) + + * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR + symbols, unless stripping. + +Tue May 25 15:34:25 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in: configure looks for ####, so remove lines with many + '#' characters. + * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0 + and HOSTING_LIBS correctly so that ``make check'' will work. + +Thu May 20 13:56:16 1993 Per Bothner (bothner@deneb.cygnus.com) + + * mips.sc-sh: Define _etext, _edata, and _end, in addition + to etext, edata, and end. Needed for IRIX 4.0.5F. + Patch from mwp@iconix.oz.au (Michael Paddon). + + * Version 2.2.1 released. + +Thu May 20 11:42:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh. + * mipsbsd.sh (EMULATION_NAME): Use new file name. + +Tue May 18 17:10:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it + properly right now. + + * Version 2.2 released. + +Mon May 17 15:37:28 1993 Ken Raeburn (raeburn@deneb.cygnus.com) + + * ldver.c (ldversion): Bump version number to 2.2. + +Mon May 17 12:44:31 1993 Per Bothner (bothner@cygnus.com) + + * NEWS: New file. + +Fri May 14 11:26:24 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: Don't define BSS_VAR unless relocating. + +Wed May 12 13:33:29 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (mkscript.o, mkscript): Build mkscript via + mkscript.o, rather than directly from mkscript.c. + +Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * configure.in: Look for ${target_makefile_frag} relative to + ${srcdir}, not relative to build directory. + + * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files. + * configure.in: Recognize hppa*-hp-osf. + * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation. + (em_hppaosf.c): Build it. + * config/hppaosf.mh, hppaosf.mt: New files. + + * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with + some system header files. All uses changed. + + * configure.in: Recognize i386-aix configurations as i386-coff + targets. + + * configure.in: Recognize m68*-*-hpux. + * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output + the value of STACKZERO. + * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation. + (em_hp3hpux.c): Build it. + * hp3hpux.sh, config/hp300hpux.mt: New files. + +Tue May 4 12:37:35 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: Put constructors in the .data section. + * Makefile.in (cdtest): Added dependency on ld.new. + +Mon May 3 19:43:39 1993 Per Bothner (bothner@cygnus.com) + + * Makefile.in: Change definition of $(tooldir) to match FSF. + * vax.sh, config/vax.mt, configure.in, Makefile.in: + Support VAX Ultrix and BSD. + +Mon Apr 26 18:35:47 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH. + +Wed Apr 14 21:01:51 1993 John Gilmore (gnu@cygnus.com) + + * ldlang.h (struct memory_region): Change `length' and + `old_length' fields to bfd_size_type. Eliminate use of bfd_offset. + * ldlang.c, mri.c: Corresponding changes, plus lint. + +Thu Apr 8 22:08:18 1993 Ian Lance Taylor (ian@cygnus.com) + + * configure.in: For all i386 targets, accept i486 as well. + +Mon Apr 5 17:33:39 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (wild_doit): Preserve all flags for a + SEC_SHARED_LIBRARY section. + (size_input_section): Consider any SEC_HAS_CONTENTS section when + computing largest_section. + +Fri Apr 2 14:33:52 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (lang_output_section_statement_lookup): Initialize all + fields of newly created structure. + +Wed Mar 31 18:19:15 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldmain.c (g_switch_value): New variable. + * ldgram.y (OPTION_G, OPTION_Gval): New tokens. + (command_line_option): Accept -G and set g_switch_value. + * ldlex.l (COMMAND): Accept -G. + * ldlang.c (open_output): Call bfd_set_gp_size on new BFD. + +Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + Support for linking and loading at different places: + + * 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. + + * ldindr.c (add_indirect): Keep more information in the alias + symbol chain. + * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section + attribute from an input section. + * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by + default. (Q_enter_file_symbos): Indirect symbols now are known by + their section, not a special symbol flag. + * ldsym.c (write_file_locals): Indirect symbols aren't local. + (write_file_globals): Write the mapping for an indirect symbol. + * relax.c (build_it): When forced to write a NEVER_LOAD section, + fill it with zeros. + +Tue Mar 23 13:24:10 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com) + + * ld.texinfo: changes for q1 + +Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck + +Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: rename HOST_CC to CC_FOR_BUILD + +Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: Added variables which may be overridden by a + specific emulation. + * mipsidt.sh: New file; emulation for IDT MIPS board. + * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o. + (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh. + * config/mips-idt.mt: New file; sets EMUL to mipsidt. + * configure.in (mips-idt-ecoff): New target; uses mips-idt. + +Sat Feb 27 00:00:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell, + ralphc@pyramid.com. + * i386bsd.sh, config/i386bsd.mt: New files. + * configure.in, Makefile.in: Added support for mipsbsd and 386bsd. + +Thu Feb 25 15:33:10 1993 Per Bothner (bothner@rtl.cygnus.com) + + * mri.c: Add extern declaration of strdup. + * ldsym.c (KEEP macro): Add spaces around '=' for the + sake of old (e.g. PCC) compilers. + +Wed Feb 24 19:49:31 1993 Per Bothner (bothner@rtl.cygnus.com) + + * ldver.c: Bump to version 2.1. + +Fri Feb 12 08:09:11 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldgram.y: allow section types without address expressions. + * ldlang.c (lang_relocate_globals): avoid possible hang with + undefined but unreferenced symbols. + * relax.c (relax_section): don't complain if the script file isn't + relaxable but -relax is set + +Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: go32 is the 3rd part of the triple, not the 2nd + +Wed Feb 3 09:05:56 1993 Ian Lance Taylor (ian@cygnus.com) + + * mipsbig.sh: New file. Big endian MIPS emulation. + * config/mips-big.mt: New file. Use mipsbig emulation. + * configure.in (mips-sgi-irix*): Use target mips-big. + * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o. + (em_mipsbig.c): New target. Uses mipsbig.sh. + +Tue Feb 2 11:32:27 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: Put .scommon sections into .sbss section. + + * ldmain.c (subfile_wanted_p): Preserve section of common symbols, + rather than always putting them in bfd_com_section. + * ldlang.c (lang_common): If a common symbol is not in + bfd_com_section, put in a section of the same name, rather than + always putting it in section COMMON. + +Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldmain.c (subfile_wanted_p): If we already have a common + definition of a symbol, don't necessarily pull in an object file + that provides a non-common definition. + + * ldlex.l (COMMAND): Accept -EB and -EL command line arguments, + returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS + linker. + * ldgram.y (OPTION_EB, OPTION_EL): New tokens. + (command_line_option): Accept and ignore OPTION_EB and OPTION_EL. + +Thu Jan 28 15:12:04 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): Remove $(tooldir)/bin/gld before creating + the link to it. + +Tue Jan 26 11:49:50 1993 Ian Lance Taylor (ian@cygnus.com) + + * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than + checking for equality to bfd_com_section. + +Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF + targets, linker script. + * mipslit.sh: New file. Little endian MIPS emulation. + * config/mips-lit.mt: New file. Use mipslit emulation. + * configure.in (mips-dec-ultrix*): Use target mips-lit. + * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o. + (em_mipslit.c): New target. Uses mipslit.sh. + +Thu Jan 14 15:30:27 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and + $(tooldir)/bin/gld, so that gcc can find it with or without + collect2. + +Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ldwrite.c: Removed perform_relocation, copy_and_relocate, and + write_norel. All linking is now done via write_relax. Call + ldsym_write before calling write_relax. + * relax.c: Added copyright. + (write_relax): Renamed from write_relaxnorel. Added relocateable + argument. seclet_dump renamed to bfd_seclet_link. + * relax.h: Added copyright. + +Mon Jan 11 15:41:56 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmain.c (decode_library_subfile): Patch from + hoogen@shafer.cs.utah.edu, don't reread library symbol tables. + +Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * config/vxworks960.mt renamed to config/i960.mt + + * configure.in: sparc-aout emulates a sun4, as does + sparc*-vxworks, i960-nindy uses gld960 emulation + +Fri Jan 8 14:39:07 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + Fix support for NOLOAD, add INCLUDE + * 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. + +Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in, config.h: no more default emulation. Make the lack + of emulation a compile time error + +Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: recognise all sparclite variants, not just 'sparclite' + +Mon Dec 28 11:15:35 1992 Ian Lance Taylor (ian@cygnus.com) + + * m68kcoff.sc-sh: define _end as well as end, for consistency with + aout.sc-sh. + + * configure.in: accept *-ericsson-ose for any m68k CPU. + + * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag + for each output section. + +Mon Dec 21 16:06:59 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new + macro bfd_asymbol_bfd as appropriate. + * Makefile.in: Un-duplicate ldlex.c dependency. + * condigure.in: Replace my_host case table by sourcing + ../bfd/configure.host. Allow std-host as the default. + * ldmisc.c: Change logic for C++ name demangling: There is + no initial '_' to remove from stab-derived function names. + +Sun Dec 13 16:31:26 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlang.c (lang_init_script_file): don't attach the output file + sections to the script file. + +Wed Dec 9 08:38:05 1992 Steve Chamberlain (sac@thepub.cygnus.com) + * ldlang.c (wild): run expansion loop over command line bfd too. + (lang_ini_script_file): initialize more parts of the command line + bfd. + * ldlex.l: fix DEFINED start states. + +Mon Dec 7 08:43:41 1992 Steve Chamberlain (sac@thepub.cygnus.com) + -y support + * 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. + +Sat Nov 21 03:15:27 1992 John Gilmore (gnu@cygnus.com) + + * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c, + ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h, + ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue + macros with PARAMS. Recreational cleanup. Update copyrights. + +Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: pass down the bfd source directory for includes + +Thu Nov 5 15:41:55 1992 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (lang_size_sections): don't change size and address for + SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD + sections. + +Thu Nov 5 11:33:57 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * relax.c (build_it): re-enable the processing of data_statements + in scripts, makes counted contructor lists work again. + +Thu Nov 5 05:43:01 1992 John Gilmore (gnu@cygnus.com) + + * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS). + +Tue Oct 20 10:56:06 1992 Ian Lance Taylor (ian@cygnus.com) + + * m68kcoff.sc-sh: don't use initial underscores for etext, edata + and end. + +Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com) + + * Support for i386-sysv. + configure.in: check for i386-*-sysv* and i386-*-sco*. + i386coff.sc-sh: rewrote to support SVR3 by default. + ldctor.c (find_constructors): preserve stat_ptr. + ldlang.c (wild_doit): initialize vma and size of new output + section to corresponding input section. This is required for + shared library support. + (lang_size_sections): don't modify vma and size of sections which + are never loaded (for shared libraries). + ldwrite.c (copy_and_relocate): copy the contents of any section + which has contents, not just sections which are loaded (for shared + libraries). + +Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlang.c (size_input_section): count the sizes of all sections + we allocate. + +Thu Oct 8 09:05:25 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to + to demangle symbols better + +Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com) + + * ldlang.c (lang_finish): don't warn if -e start symbol does not + exist when linking with -r. + +Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com) + + * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the + .bss segment. + +Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmain.c (linear_library): don't even think about processing + an object file if it's already been done + +Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: the hp9000/300 config file is now hp300 + +Wed Sep 30 07:34:09 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * config/z8ksim.mt: new file + +Fri Sep 25 13:49:52 1992 Ken Raeburn (raeburn@kyriath.cygnus.com) + + * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o, + lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h. + + * ld.h (strip_symbols_type): Add value STRIP_SOME. + * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token. + * ldlang.c (lang_add_keepsyms_file): New function. + * ldlex.l: Handle "-retain-symbols-file". + * ldsym.c (keepsyms_file, kept_syms): New vars. + (process_keepsyms): New functihon; reads file, marks symbols for + saving. + (write_file_locals): File symbols should always be kept. + (ldsym_write): Warn about "-retain-symbols-file" overriding "-S" + and "-s". Process retain-symbols file before setting symtab. + * ldsym.h (SYM_KEEP): New flag for ldsym_type flags. + (keepsyms_file, kept_syms): Declare them. + + * ldmain.c (main): Non-fatal errors should still cause non-zero + exit status even with -r. + +Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + Added initial support for the z8k + * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files + * configure.in, Makefile.in: modified to reflect above + + * ldlang.c (lang_check): when linking conflicting architectures, + make the output file reflect at least one of the bad inputs. + +Tue Sep 15 15:35:38 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): if $(tooldir) exists, install ld in + $(tooldir)/bin. + +Fri Sep 11 10:24:22 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * Makefile.in, configure.in: modified to support i386-coff + * i386coff.sh: new file + +Wed Sep 9 11:52:58 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt: + added m68k-coff emulation mode, stolen from a29k emulation. + Almost certainly wrong, but perhaps better than sun3. + +Thu Sep 3 14:19:30 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in, Makefile.dos, generic.em, genscripts.sh, + gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em, + vanilla.em: Rename all (generated) ld__*.c files to em_.c. + This is one character shorter, and lets people build on + SVR3 system. (ld__h8300xray.[co] was the killer there; + h8300xray.sc-sh is also overlong, but seems harmless.) + Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>. + * Makefile.in (clean): Fix typo mostclean -> mostlyclean. + * configure.in: Add host isc. + + * ldver.c: Call it version 2.0. + +Wed Sep 2 00:21:33 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldver.c: Bump to version 0.98. + * TODO: New file. + + * Makefile.in: Added mostlyclean, distclean, realclean rules. + +Tue Sep 1 23:42:16 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c). + * ldlex.l: Moved comment() to end, since some compilers + otherwise have problems with input() used before it is defined. + +Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: added Solaris 2 and Irix 4 host support. + +Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: remove -S flag from the FLEX definition + + * configure.in: rewrote, using new style case statement. use + m68k.mt for m68k-aout systems + +Sun Aug 30 21:38:53 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in: map "ld" through program_transform_name when + installing. + +Sun Aug 30 18:12:13 1992 Per Bothner (bothner@rtl.cygnus.com) + + * cplus-dem.c: Removed. Use the version in libiberty now. + * ldmisc.c: Use new libiberty version of cplus_demangle(). + +Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com) + + * gld960.em (gld960_choose_target): default to little endian, not + big endian. + +Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlang.c (lang_process): don't pass null pointers when + abs_output_section is what is required. + * ldwrite.c (ldwrite): use malloc to allocate the largest space + used, and pass that down. + * relax.c,relax.h (write_relaxnorel): use the passed malloc area rather + than alloca. + +Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com) + + * configure.in, config/ose68.mt: renamed OSE to ose. + +Thu Aug 20 19:55:22 1992 Ken Raeburn (raeburn@cygnus.com) + + * ldsym.c (write_file_locals): Reorder check for common or + undefined symbols so that it works. + +Tue Aug 18 13:41:36 1992 Ian Lance Taylor (ian@cygnus.com) + + * configure.in: accept all m68K family members. + + * Makefile.in: always create installation directories. + +Thu Aug 13 11:49:34 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlex.l: now parses comment correctly, added ~ to acceptable + 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. + +Fri Aug 7 12:31:10 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlang.h: add new field "loadable" to output_section_statement. + * 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. + +Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldint.texinfo: New internals manual (beginnings thereof). + * PORTING: Removed, merged into ldint.texinfo. + +Tue Aug 4 21:12:29 1992 Per Bothner (bothner@rtl.cygnus.com) + + * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc, + cdtest.exp: A test program (copied from libg++/test-install) + that tests that constructor and destructors are handled + corrrectly. + +Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in (install): install from ld.new, renaming during the + copy, or else the next 'make install' needs to re-link ld. + +Mon Jul 20 03:37:06 1992 D. V. Henkel-Wallace (gumby@cygnus.com) + + * configure.in: generalise hp recognition (from sef). + +Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: recognize bsd and hpux hppa configurations. + error messages echo to stderr, not stdout + +Fri Jul 17 22:06:11 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c, + ldmisc.c: removed rcsid's. + +Tue Jul 14 08:34:34 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlang.c (lang_map): print changes in sizes due to relaxing + (size_input_section): maintain the delta information. + * ldlang.h: add new field to struct to contain delta info. + * relax.c (relax_section): complain if input not relaxable. + * ldlex.l : add '_', ',' and '$' to chars which can appear at the + start of a filename + +Mon Jul 13 17:33:00 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmain.c(main): prevent -r and -relax from being on at the same + time. + +Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for + aliasing problems + + +Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * h8300hms.em, h8300hms.sc-sh: do the right thing for -r + * ldexp.c: lint + * ldlang.c(open_output): set the target arch and machine as soon + as we can. (lang_size_sections): use new macros for setting vma + * ldwrite.c: lint + +Mon Jun 15 08:47:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com) + + * configure.in (my_target): Accept m680?0 for wrs as vxworks68. + Also deleted an unreachable path to wrs. + +Wed May 27 23:24:19 1992 Michael Tiemann (tiemann@rtl.cygnus.com) + + * Makefile.in (install): use -d test for $tooldir before + installing ld there so that $tooldir can be inherited from + top-level Makefile. + +Wed May 27 16:56:48 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldlang.c: Two non-substantial changes for the sake of + the old Portable C Compiler. + +Wed May 27 15:15:58 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldgram.y, ldlex.l: parse ABSOLUTE + * ldexp.c: add support for ABSOLUTE + +Wed May 27 13:07:20 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Added default definitions for HOSTING_CRT0, + HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh. + * config/*.mh: Miscellaneous clean-up: Removed definitions + of YACC (since it is not longer used in the Makefile). + Remove HOSTING_* definitions that are subsumed by the + ones added to Makefile.in. Removed most definitions of CC. + * config/{sparc,news,hp300bsd,decstation}.mh: Removed; + These are no longer needed. + +Fri May 22 13:47:19 1992 Per Bothner (bothner@cygnus.com) + + * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex + rules, since these are used when building a distribution. + * Makefile.in (ldlex.c): Don't re-direct output, since that + leaves a bogus output files if it fails. + + * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working. + * ldlex.c: Fix some unnecessary flex-specific-isms. + +Fri May 8 11:49:43 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldgram.y: move spurious semicolon + * ldexp.h: fix prototype + +Thu May 7 17:01:12 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * ld.texinfo: references to linker now say "ld" not "gld". + +Wed May 6 13:26:19 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + changed calling convention for Q_enter_global_ref + * ldexp.c, ldlang.c, ldmain.c: reflect this + * ldver.c: bump version to 1.97.1 + * ldindr.c (add_indirect): when an edict declaring an indirect + symbol is found, make sure that any ideas about the symbol being + common are changed if it now known to be defined. + * ldmain.c (linear_library): complain once if archive isn't + ranlibbed. + * ldlang.h, ldlang.c: make room for and initialize the complain + once field. + +Wed May 6 11:07:35 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: use flex & bison from ../ if they exist. + +Tue May 5 17:47:33 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * relax.c (build_it): don't allocate space in the output file for + stuff if -R flag applys to it. + * ldfile.c: merge in VMS filename support + * ldmain.c (main): take out ./ from library path, and close file + before unlinking. Make multiple defs of a symbol create an + unexecable file. + * ldmisc.c: fatal errosrs delete output file + +Tue May 5 14:05:05 1992 Per Bothner (bothner@rtl.cygnus.com) + + * ldver.c: Increase version number to 1.97, for consistency + with ../binutils. + +Tue May 5 12:12:24 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: FLEX -> LEX. + + * ld.texinfo: {} -> @{@}. + +Mon May 4 17:52:41 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * ld.texinfo: describe alternate, MRI-compatible linker scripts + (and associated change in -c option, now used for these scripts) + +Mon May 4 16:10:10 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldver.c: Bumped version to 1.96 - new release, resync with the + bfd too #. + * ldexp.c, ldlang.c: now build memory shape tree in obstacks + rather than with raw malloc, makes it easier to track where memory + is going. + * ldsym.h, ldsym.c: create obstack for all global symbols too. + * ldwrite.c (ldwrite): moved malloc so only used when needed. + * sa29200-sc.sh: added support for .lit, data1 and data2 sections. + + +Fri May 1 18:17:52 1992 K. Richard Pixley (rich@cygnus.com) + + * config/sparc.mh: use ../gcc/libgcc.a on check if it exists. + + * Makefile.in: use bootstrap for check. + +Fri May 1 13:03:41 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and + PUBLIC. + * Makefile.in: now use flex, not lex + * ldlex.l, ldlang.c, ldctor.c: lint + +Wed Apr 22 12:48:42 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlex.l: added CMDFILENAMECHAR state so that you can lex + different sorts of filenames on the command line than in a script. + +Mon Apr 20 22:37:04 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: rework CFLAGS so that they can be passed on the + make command line. Remove MINUS_G. Default CFLAGS to -g. + +Fri Apr 17 08:57:17 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * relax.c: added handling for new "padding" seclet type, used to + fill out gaps between section. + * ldgram.y, ldlex.l: now -defsym on the command line is done + properly. + +Wed Apr 15 21:20:07 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: the tooldir copy of ld goes directly in tooldir. + +Wed Apr 15 16:09:33 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * mri.c, ldgram.y, ldlex.l: added support for minimal strange link + scripts. + +Thu Apr 9 05:52:02 1992 Ken Raeburn (Raeburn@Cygnus.COM) + + * Makefile.in (install): Install second copy in $(tooldir)/bin + without $(program_prefix), since that's what gcc expects. + +Sat Apr 4 17:44:06 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer. + * h8300*: fix bit rot and add support for h8300xray target + * go32.sh: target emulation for go32. + +Mon Mar 16 14:53:29 1992 Steve Chamberlain (sac@rtl.cygnus.com) + + * gld960.em, i960.sc-sh. Fix i960 bit rot + +Fri Mar 13 19:47:22 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: install man page. + +Fri Mar 13 08:23:59 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * config/mt-<foo> renamed to <foo>.mt + * config/mh-<foo> renamed to <foo>.mt + * configure.in changed to reflect this + * genscripts.sh now make .xbn files rather than .xN files + +Sat Mar 7 03:40:40 1992 K. Richard Pixley (rich@cygnus.com) + + * ldver.h: fix decl of ldversion. + +Fri Mar 6 22:00:35 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: added check target. + +Fri Mar 6 06:59:04 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldmain.c (Q_enter_file_symbols): now aliases work again + +Thu Mar 5 21:39:29 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: added clean-info target. + +Thu Mar 5 16:55:56 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldexp.c (exp_print_tree): don't try and follow null pointers + around. + * ldgram.y: remove 11 shift reduce errors + +Tue Mar 3 15:46:39 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: added tooldir and program_prefix. + +Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com) + + * ldlang.c (size_input_section): don't move absolute sections + around! + + +Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com) + + * cplus-dem.c: yet another copy of this - maybe it should go into + libiberty ? + * ldgram.y: now -V and -v have different actions + * ldver.c: if -V, prints list of emulations compiled in + * ldmisc.c: support for cplus demangling + + +Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in, configure.in: removed traces of namesubdir, + -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced + copyrights to '92, changed some from Cygnus to FSF. + +Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Change mkscript rule into one for ./mkscript + (for the sake of makes that don't realize they're the same). + * PORTING: Add more details. + * genscripts.sh: Add more tailorability of DATA_ALIGNMENT. + +Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com) + + * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd, + config/mt-hp300bsd: New port to hp300 running BSD. + +Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com) + + Major rewrite of how ld is configured. The major idea + is to use shell scripts to generate everything. + * generic.em replaces ldtemplate. + * Other *.em files replace various *.c files. + A *.em file is a shell script that generates the corresponding + ld__*.c file that implements an emulation. This is usually + a straight 'cat' of a here-document, possibly with substitutions. + * Script files (*.sc) are places by *.sc-sh scripts. + Again, these are simple shell scripts that 'cat' + here-documents, usually with some substitutions. + The output a *.sc-sh is a script file. + * Each emulation is defined by a short shell script with + extension *.sh that specifies the emulation-specific + parameters (such as the name of the *.sh-sc and *.em + files to use). + * genscript.sh is the master shell script used to generate + an emulation. It is passed various argument, including + the name a the emulation-speciic *.sh file that it + "sources" to set variables to emulation-specifc parameters. + * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME + to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.) + * config/mh-foo: Rename LDEMULATION names as appropriate + (usually 'gldfoo' -> plain 'foo'). + * ldwrite.c: Fixed a typo in a comment. + * Makefile.in: Major changes. Removed some the sed + magic to converts scripts, since that is now handled + by genscripts.sh and the *.sc-sh scipt generators. + * config.h: Remove a bunch of macros defining emulations + and targets. This becomes one less file to edit when + adding emulations or targets. + * ldemul.h (struct ld_emulation_xfer_struct): Add + emulation_name and target_name fields. + * ldemul.c, ldemul.h: Define some default functions used + by most emulations (and remove from the *.em scripts). + * ldemul.c (ldemul_choose_target): Search the new + ld_emulations array using a loop (instead of a hardwired + nested if statement). + Define the ld_emulation from the automatically-geenrated + ldemul-list.h. This means you no longer have to edit ldemul.c + to add a new emulation. + * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by + their expansions, since the former no longer exist. + * PORTING: A very rough first draft of a porting guide. + + * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment + to be terminated by a new-line (instead of requiring a semicolon). + +Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * ldexp.c, ldlang.c: added new idea "abs_output_section", removes + tests for NULL pointers all over the place. + * ldlang.c (lang_process): remember to relocate global symbols + *after* relaxing has done it stuff. + +Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * config/mt-coff-h8300: use EMUL like everything else + * ldlang.c: (print_padding_statement): print the right address. + * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms + + +Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * ldlex.l: Put pack -noinhibit-exec and -sort-common + * ldlang.c (print_data_statement): print the right address. + +Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com) + + * Makefile.in: The rule for testing ld by re-linking itself + via an intermediate -r link was moved to the ld1 rule + instead of the ld2 rule. This allows ld2 and ld3 to be identical, + which allows the bootstrap rule to work. + * ldctor.c (find_constructors): Don't create a constructor + list if it is already defined (as would happen if ld is + invoked by collect). + +Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * config/mh-sparc.h: now uses libgcc.a + * ldmain.c: quit using exit + * *sc: use *(COMMON) rather than [COMMON] + * ldlex.l, lexsup.c: much thinking moved from .l and put into .c, + to allow preprocessing of .l file. + * Makefile.in: New ldlex.l mangling + * ldexp.c (fold_binary): perform expressions with % and / in + integer. + * ldfile.c (open_a): open archives on VMS in a special way + + +Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * ldgram.y: map -M behave in the same way as -Map (sets file name + 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 + +Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * Makefile.in: added relax, also made three stage go through a + 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 + +Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com) + + * Makefile.in, config/tm-*.h: Clean up make output, only + pass DEFAULT_EMULATION to ldmain.c. + +Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com) + + * ldver.c: Bump to version 1.94. + +Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: infodir belongs in datadir. + +Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Pass -y to bison. (Again; + accidentally deleted by Rich.) + * news.sc, ldgld68k.sc: Define __end as well as _end. + +Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * ldindr.h: added to contain prototypes of ldindr.c + * ldfile.c: include ctype.h + * ldmain.c: include the requried prototype headers + * ldwrite.c: get_reloc_upper_bound has been renamed + bfd_get_reloc_upper_bound + +Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: punt "fundamental" mode because it breaks my emacs + macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove + spaces following hyphens, bsd make can't cope. added + standards.text support and made it look like all the other + makefiles. + + * configure.in: configure now runs entirely in objdir so make file + existence checks against ${srcdir}. Mark this directory as + target dependent. + +Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: idestdir and ddestdir go away. Added copyrights + and shift gpl to v2. Added ChangeLog if it didn't exist. docdir + and mandir now keyed off datadir by default. + +Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com) + + * ldver.c: Bumped version to 1.93. + * Makefile.in: Pass -y to bison. + +Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com) + + * config.h: h8 is now coff, not ieee + * h8300hds.sc: reflect the same + +Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com) + + * ldver.c (ldversion()): Update to 1.92. + * ldctor.c: There are two places constructor sets + can be defined. One of them checked for an existing + duplicate, the other didn't. Unfortunately, the latter + was called after the former ... + So, factor out code for inserting a new element into + constructor_name_list (after checking for a duplicate) + into a new function add_constructor_name, and call + it from both aforementioned places (ldlang_add_constructor + and ldlang_check_for_constructors). + +Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Rename .c files generated from ldtemplate + to have names starting with ld__. This helps 'make clean'. + +Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com) + + * Makefile.in: Take out the version number for install + * m88kbcs.sc: put in contructor blocks. + +Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com) + + * ldmisc.c, ldmisc.h: Re-write info() to take a filename + parameter, a format, and an arg pointer, and rename it to + vfinfo(). Write info() in terms of new vfinfo(). + New einfo() is the same as info(), except it writes to stderr. + * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c, + ldmisc.c: Replace "error" calls to info() by new einfo(). + +Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com) + + * ldlex.l ldgram.y: made -V option do same as -v + * Makefile.in: Added $(MINUS_G) flag so debugging can be + turned off + +Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com) + i386 aout changes from Bob Kukura + * Makefile.in, config.h: added i386aout support + * configure.in: fixed /h-{myhost} typo + * ldgram.y: -MM now gives more boring map. + * ldlang.c: now does D_PAGED flag the right way. + * ldsym.c: -MM flags does the right thing. + +Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com) + + * configure.in: Fixed typo. Also, a fix for hp300bsd. + * ldlang.c (init_os): Compensate for BFD change, + where bfd_make_section now returns NULL for a duplicate + section request, instead of the old section. + +Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com) + + * ldver.c: Bump to version 1.91 (consistent with binutils). + +Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h, + ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h, + ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h, + ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c: + Add or update copyright notices. + +Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com) + + * README: New file. + * Makefile.in: Changed installation directory name scheme + to be consistent with gcc. Also changed 'install'. + +Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: new targets ld.mm, ld.me + +Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in, ldtemplate: Need to use separate scripts + for -n and -N options. Yet more complication. + +Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com) + + * Makefile.in: Avoid using $< in explicit Make rules (it doesn't + work). Add some lines to avoid Sun Make VPATH bugs. + +Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com) + + * news.sc: Add alignment for data segment. + * ldtemplate: Add (yet another) script to get for -n or -N + options. (These need different alignment than ZMAGIC files.) + * Makefile.in: Add stuff for new foo.xn scripts. + These are generated by replacing "ALIGN(0x...00)" by ".". + +Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: new targets ld.ms, ld-index.ms + ld.texinfo: remove tabs, other cleanups for texi2roff + +Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com) + + * ldmain.c (main): Make config.magic_demand_paged be true + by default. Don't set the WP_TEXT and D_PAGED flags of + output_bfd here; it's too late, so set it when output_bfd + is created (in ldlang.c). Also fix setting of EXEC_P flag + * ldlang.c (ldlang_open_output): Set output_bfd->flags here. + * ldlang.c: Remove some duplicate extern declarations. + * ldgram.y: Fixes to -N and -n options. + * Makefile.in: Recognize upper case letters in sed script + to remove assignments from script files. + * ldtemplate: Don't assukme that -N or -n options + imply use of -r script. + * mkscript.c: Tweaking to correctly handle \n and \\ in input. + +Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com) + + * ldtemplate: include bfd.h before sysdep.h. + +Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com) + + Restructure configuration scheme for bfd, binutils, ld. + + * include/sys/h-*.h: Move to bfd/hosts/h-*.h. + * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h. + Change some config names to match other dirs. + * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO() + get defined first. + * config/: Rename some config files to match up h-*.h names. + Remove all the HOST_SYS definitions from the config files. + +Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com) + + * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean. + * ldtemplate: Remove ldfile_add_library_path calls; + just use the SEARCH_DIR commands in the script files. + * Makefile.in: Add LIB_PATH macro, which if set is used to replace + the SEARCH_DIR commands in the scripts (using ugly sed magic). + This is primarily intended for cross-linking, where you would + place libaries in a different place than native libraries. + Also, emulations made from ldtemplate now use $(srcdir). + * ldglda29k.sc: Change SEARCH_DIR commands to a conventional + form; people can use the Makefile's LIB_PATH to override. + +Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: fix target ld.dvi, add target ld.info + ld.texinfo: make info filename ld.info + +Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com) + + * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun + Make). + * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a + few BFD types & enums. + + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/contrib/binutils/ld/ChangeLog-9899 b/contrib/binutils/ld/ChangeLog-9899 new file mode 100644 index 0000000..1f6533a --- /dev/null +++ b/contrib/binutils/ld/ChangeLog-9899 @@ -0,0 +1,2108 @@ +1999-12-02 Nick Clifton <nickc@cygnus.com> + + * Makefile.am: Fix arm-epoc-pe dependencies. + * Makefile.in: Regenerate. + + * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe. + + * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for + EPOC by placing .rdata into .text. + +1999-11-26 Andreas Schwab <schwab@suse.de> + + * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for + STRINGIFY. Use yes/no instead of true/false as value for cache + variable. + * configure: Regenerate. + +1999-11-24 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD + attributes in order to be checked. + +1999-11-22 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_check_section_addresses): Fix test to determine + if a section should be tested. + (IGNORE_SECTION): New macro. + +Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com) + + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + Clean up code to use EXTRA_SHLIB_EXTENSION. + +1999-11-03 Nick Clifton <nickc@cygnus.com> + + * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian. + * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian. + +1999-11-01 Steve Chamberlain <sac@pobox.com> + + * ldlang.c (section_already_linked): Rework to use hash table. + (already_linked_newfunc): New function. + (already_linked_table_init): New function. + (already_linked_table_free): New function. + (lang_process): Initialize and free the already_linked hash table. + +1999-10-27 Andreas Jaeger <aj@suse.de> + + * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for + target "mips*-*-linux-gnu*". + +1999-10-27 Scott Bambrough <scottb@netwinder.org> + + * emultempl/armelf.em: Include ctype.h to prevent compile time + warnings. + +1999-10-26 Nick Clifton <nickc@cygnus.com> + + * emultempl/armcoff.em (gld{}_finish): Remove extraneous + underscore from prototype. + * emultempl/armelf.em (gld{}_finish): Remove extraneous + underscore from prototype. + +1999-10-07 Geoffrey Keating <geoffk@cygnus.com> + + * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs + being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*. + (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*. + (.rel.sbss): Make like .rel.bss. + (.rela.sbss): Make like .rel.bss. + (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when + ld -r. + (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS, + .dynsbss. + +1999-09-29 Andrew Haley <aph@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer + merging sections when not relocating. + +1999-09-28 Mumit Khan <khan@xraylith.wisc.edu> + + * pe-dll.c (process_def_file): Move the offset lookup from here to + (fill_exported_offsets): here. New static function. + (fill_edata): Use. + +1999-09-28 Mumit Khan <khan@xraylith.wisc.edu> + + * deffilep.y (tokens): Add upper and lower case versions of DATA, + CONSTANT, NONAME and PRIVATE tokens. + (command): Use DATAU. + (expline): Allow for drectve syntax as well. + (exp_opt_list): Likewise. + (exp_opt): Likewise. + * pe-dll.c (make_one): Only generate the idata entries for data + symbols. + +1999-09-28 Geoffrey Keating <geoffk@cygnus.com> + + * scripttempl/elf.sc (.sdata): Include .gnu.linkonce.s.* sections + in .sdata too. + +1999-09-26 Nick Clifton <nickc@cygnus.com> + + * scripttempl/elf.sc (.bss): Accept sections named .bss.* + (.sbss): Accept sections names .sbss.* + +1999-09-22 Nick Clifton <nickc@cygnus.com> + + * Makefile.am: Add earm_epoc_pe.c build target. + +Sat Sep 18 07:57:10 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (OTHER_READONLY_SYMBOLS): Remove ".stubs", + they've been renamed to ".stub", which is handled automatically + by elf.sc. + +Fri Sep 17 11:00:33 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Kill completely. + (DATA_START_SYMBOLS): Kill __hp_load_map definition + +Thu Sep 16 10:59:56 1999 Jeffrey A Law (law@cygnus.com) + + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + Use the same filename extension for the bfd_elf_dt_needed_name call + as we did for finding the library. + + * emulparms/elf64hppa.sh (DATA_START_SYMBOLS): Define. + (OTHER_READWRITE_SECTIONS): No longer define __hp_load_map. + + * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Define. + +Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (SHLIB_TEXT_START_ADDR): Define. + (SHLIB_DATA_ADDR): Likewise. + + * emulparms/elf64hppa.sh (TEXT_DYNAMIC): Define. + + * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): No longer combine + the .plt, .dlt, .opd into a single output section. Provide values + for __gp and __hp_load_map. + +1999-09-14 Michael Meissner <meissner@cygnus.com> + + * configure.in (Canonicalization of target names): Remove adding + ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 + generates $ac_config_sub with a ${CONFIG_SHELL} already. + * configure: Regenerate. + +1999-09-14 Donn Terry <donn@interix.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for + terminating null. + +1999-09-14 Ulrich Drepper <drepper@cygnus.com> + + * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target. + * config.in: Add EXTRA_SHLIB_EXTENSION. + + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION + is defined. + +1999-09-14 Nick Clifton <nickc@cygnus.com> + + * Makefile.in: Add earm_epoc_pe.c build target. + +Tue Sep 14 05:26:34 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.dlt. + +1999-09-13 Donn Terry <donn@interix.com> + + * emultempl/pe.em: Remove the output file at the start, in case it + is not writable. + +Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com) + + * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): + Search for file with .sl extension if no file with a .so extension + is found. + + * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt + at the start of the .dlt output section. + +1999-09-12 Ian Lance Taylor <ian@zembu.com> + + * pe.em: Don't include "../bfd/libbfd.h". + (gld_${EMULATION_NAME}_after_open): Use xmalloc rather than + bfd_alloc. + + * pe-dll.h: New file. + * pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed + to avoid warnings. + (edata_sz, reloc_sz): Change from int to size_t. + (pe_details_type): Change type of imagebase_reloc from int to + unsigned int. + (pe_detail_list): Fully initialize last entry. + (pe_dll_id_target): Change parameter to const. + (pe_dll_generate_def_file): Likewise. + (pe_dll_generate_implib): Likewise. + (pe_implied_import_dll): Likewise. Change dll_name to const. + * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in + pe-dll.h. + (init): Fully initialize __dll__ entry. + (gld_${EMULATION_NAME}_after_open): Remove unused variables + sequence, elt, and i. + * deffile.h: Add preprocessor guard. + * deffilep.y (def_debug): Remove. + * Makefile.am: Rebuild dependencies. + (HFILES): Add pe-dll.h. + +1999-09-12 Donn Terry <donn@interix.com> + + * ld.h (ld_abort): Declare. + (abort): Define. + * ldmisc.c (ld_abort): Define. + + * scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup. + Move .bss section after .rdata. Move .reloc section after .rsrc. + + * lexsup.c (parse_args): Use strtoul for --split-by-reloc + argument. + + * lexsup.c (parse_args): If we get an unrecognized argument, + mention --help. + + * ldlang.c (section_already_linked): Use comdat information if it + is available. + + * emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If + OVERRIDE_SECTION_ALIGNMENT is defined, change to that. + (gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is + defined, rather than a.exe. + (init): Define __subsystem__ as ${SUBSYSTEM}. + (set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol + name. + +1999-09-12 Ian Lance Taylor <ian@zembu.com> + + * ldlang.c (open_output): Change local variable desired_endian + from int to enum bfd_endian. + + * emulparams/arm_epoc_pe.sh: Define ENTRY, SUBSYSTEM and + INITIAL_SYMBOL_CHAR. + * emulparams/armpe.sh: Likewise. + * emulparams/morepe.sh: Likewise. + * emulparams/ppcpe.sh: Likewise. + * emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup. + (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM. + +Fri Sep 10 00:22:50 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (LIB_PATH): Define. + + * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before + unwinders so that they are closer to the text section. + (OTHER_BSS_SECTIONS): Define. + (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS. + (INIT_START, INIT_END): Define. + (FINI_START, FINI_END): Define. + * scripttempl/elf.sc: Add support for INIT_START, INIT_END, + FINI_START, FINI_END and OTHER_BSS_SECTIONS. + +Thu Sep 9 21:43:58 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page. + (DATA_ADDR): Define. + +1999-09-09 Stan Shebs <shebs@andros.cygnus.com> + + * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004. + +1999-09-09 Andreas Schwab <schwab@suse.de> + + * ld.texinfo: Fix arguments of @var to not contain punctuation. + +Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define. + +1999-09-08 Ulrich Drepper <drepper@cygnus.com> + + * emulparams/elf64hppa.sh (ELFSIZE): New. Set to 64. + +Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com) + + * emulparms/elf64hppa.sh (ENTRY): Define to main. + +1999-09-03 Scott Bambrough <scottb@netwinder.org> + + * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for + target "arm*-*-linux-gnu*" + +1999-09-04 Steve Chamberlain <sac@pobox.com> + + * configure.tgt (pjl-*-*, pj-*-*): New targets. + * emulparams/pjelf.sh: New file. + * emulparams/pjlelf.sh: New file. + * scripttempl/pj.sc: New file. + * Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o. + (epjelf.o, epjlelf.o): New targets. + * Makefile.in: Rebuild. + +Fri Sep 3 20:17:08 1999 Jeffrey A Law (law@cygnus.com) + + * emulparams/elf64hppa.sh (MAXPAGESIZE): Define. + (OTHER_READONLY_SECTIONS, DATA_PLT): Likewise. + +Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com) + + * emulparams/elf64hppa.sh: New file. + * configure.tgt (hppa*w-*-*): Use elf64hppa emulation. + * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o + (eelf64hppa.c): Add dependencies. + * Makefile.in: Rebuilt. + +1999-08-25 Philip Blundell <pb@nexus.co.uk> + + * emulparams/armelf.sh (OTHER_BSS_SYMBOLS): Add __end__. + * emulparams/armelf_linux.sh: Likewise. + * emulparams/armelf_linux26.sh: Likewise. + +1999-08-24 Nick Clifton <nickc@cygnus.com> + + From a patch submitted by Roland McGrath <roland@baalperazim.frob.com> + + * configure.tgt (arm-*-netbsd*): New target. + * Makefile.am (ALL_EMULATIONS): Add earmnbsd.o. + (earmnbsd.c): New rule with deps. + * Makefile.on: Regenerate. + * emulparams/armnbsd.sh: New file. + +1999-08-23 Nick Clifton <nickc@cygnus.com> + + * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Define. + Implement --base-file command line switch. + + * emultempl/elf32.em: Add ability for individual targets to have + their own command line switches by defining PARSE_AND_LIST_ARGS. + +1999-08-19 Andreas Schwab <schwab@suse.de> + + * configure.host: Use ${CC} instead of gcc for finding compiler + related files. + +1999-08-11 Nick Clifton <nickc@cygnus.com> + + * scripttempl/mcorepe.sc (OUTPUT_FORMAT): Fix typo. + +1999-08-09 Mark Elbrecht <snowball3@bigfoot.com> + + * scripttempl/i386go32.sc: Handle g++ exception sections. + +1999-08-09 Ian Lance Taylor <ian@zembu.com> + + From Wally Iimura <iimura@microunity.com>: + * ldlang.c (lang_size_sections): When checking whether an address + is within a region, don't get confused by wrapping around at the + end of the address space. + +1999-08-08 Ian Lance Taylor <ian@zembu.com> + + * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to + SEC_SMALL_DATA. + + * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to + MKDEP. Rebuild dependencies. + * Makefile.in: Rebuild. + +1999-08-08 Jakub Jelinek <jj@ultra.linux.cz> + + * configure.host (sparc-*-linux-gnu*): New host. + (sparc64-*-linux-gnu*): New host. + +1999-08-06 Ian Lance Taylor <ian@zembu.com> + + * lexsup.c (is_num): Reindent. + (parse_args): Mention program name in error message. + + * emultempl/ostring.sed: Rename from stringify.sed. + * emultempl/astring.sed: New file. + * Makefile.am (stringify.sed): New target. + (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to + stringify.sed. + * configure.in: Define and substitute STRINGIFY. + * emultempl/*.em: Use stringify.sed from build directory rather + than source directory. + * emultempl/elf32.em: Use stringify.sed rather than inline sed + script. + * emultempl/gld960.em, emultempl/gld960c.em: Likewise. + * emultempl/hppaelf.em, emultempl/linux.em: Likewise. + * emultempl/lnk960.em, emultempl/sunos.em: Likewise. + * configure, Makefile.in: Rebuild. + +1999-08-05 Donn Terry <donn@interix.com> + + * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and + INITIAL_SYMBOL_CHAR. + * emulparams/i386pe_posix.sh: New file. + * Makefile.am (YACC): If bison is not in the source tree, use + @YACC@ rather than bison -y. + (LEX): If flex is not in the source tree, use @LEX@ rather than + flex. + (ALL_EMULATIONS): Add ei386pe_posix.o. + (ei386pe_posix.c): New target. + * configure.tgt (i[3456]86-*-interix*): New target. + * configure.host (i[3456]86-pc-interix*): New host. + * Makefile.in: Rebuild. + +1999-08-03 Ian Lance Taylor <ian@zembu.com> + + * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000. + * emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise. + +1999-08-03 H.J. Lu <hjl@gnu.org> + + * Makefile.am (ALL_EMULATIONS): Remove ego32.o. + (ego32.c): Remove. + * Makefile.in: Rebuild. + +1999-07-22 Philip Blundell <pb@nexus.co.uk> + + * emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define. + (OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise. + * emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define. + + * configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*, + thumb-*-linux-gnu*): New targets. + +1999-07-21 Mark Elbrecht <snowball3@bigfoot.com> + + * scripttempl/i386go32.sc: Add handling of linkonce sections. + + * configure.bat: Remove; obsolete. + * emulparams/go32.sh: Remove; obsolete. + * scripttempl/go32coff.sc: Remove; obsolete. + +1999-07-21 H.J. Lu <hjl@gnu.org> + + * configure.tgt (mips*el-*-vxworks*): New target. + +1999-07-21 Brad M. Garcia <bgarcia@fore.com> + + * configure.tgt (i[3456]86-*-vxworks*): New target. + +Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com> + + * ldlang.c (lang_gc_sections): Only handle the start symbol + specially if there is one. + +Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com> + + * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add + .MIPS.events and .MIPS.content handling. + * emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise. + +1999-07-17 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (get_target): New function: Return true iff the + given target is the target being sought. + (stricpy): New function: Like strcpy but convert to lower + case as well. + (strcut): New function: Like strstr but remove the located + substring as well. + (name_compare): New function: Compute a compatability rating + for two target names. + (winner): New variable: Best target found by + closest_target_match() so far. + (closest_target_match): New function: Find the target which is + the closest match to the original target. + (get_first_input_target): New function: Find the target format + of the first of the linker's input file. + (open_output): Be more clever about deciding the output target + format. + +1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> + + * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH. + +Thu Jul 15 15:55:15 1999 Mark P. Mitchell <mark@codesourcery.com> + + * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6. + +1999-07-15 Ian Lance Taylor <ian@zembu.com> + + * configure.in: Bump version number to 2.9.5. + * configure: Rebuild. + +1999-07-14 Richard Henderson <rth@cygnus.com> + + * ldlang.c (wild_doit): Copy SEC_SHORT to output section. + + * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the + same order seen for the main sections. Add + OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS. + +1999-07-12 Andreas Schwab <schwab@suse.de> + + * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in + structure initializations. + + * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing + comma in initializer. + +1999-07-11 Ian Lance Taylor <ian@zembu.com> + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Fill in structure initializations. + +1999-07-10 Ian Lance Taylor <ian@zembu.com> + + * ldfile.c: Revert patch of 1999-07-08. + (ldfile_try_open_bfd): If we are searching for the file, skip + files with an incompatible architecture. + +1999-07-09 Nick Clifton <nickc@cygnus.com> + + * scripttempl/armcoff.sc (OUTPUT_FORMAT): Include big endian and + little endian formats. + +1999-07-08 Felix Lee <flee@cygnus.com> + + * scripttempl/mcorepe.sc: fix quoting problem, for bash 2.x + +1999-07-08 Jakub Jelinek <jj@ultra.linux.cz> + + * ldfile.c (ldfile_open_file_search): Skip libraries made for + incompatible architectures in the search path. Let the user know + about any such skips. + +Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * configure.tgt (hppa*-linux-gnu*): New target. + +1999-07-07 Mark Mitchell <mark@codesourcery.com> + + * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip. + (eelf64bmip): New target. + * Makefile.in: Regenerated. + * configure.tgt (mips-sgi-irix6*): Add 64-bit emulation. + * emulparams/elf64bmip.sh: New file. + +1999-07-05 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em (after_open): Abort if input format is ARM and + output format is not. + * emultempl/armcoff.em (after_open): Abort if input format is ARM + and output format is not. + * emultempl/armelf.em (after_open): Abort if input format is ARM + and output format is not. + +1999-07-02 Ian Lance Taylor <ian@zembu.com> + + * ldlang.c: Revert change of 1999-06-23. + +1999-06-30 Mark Mitchell <mark@codesourcery.com> + + * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o. + (eelf32bmipn32.c): New target. + * Makefile.in: Regenerated. + * configure.tgt (mips-sgi-irix6*): Make n32 the default + emulation. + * emulparams/elf32bmipn32.sh: New file. + +1999-06-28 Jim Pick <jim@jimpick.com> + + * emultempl/armelf.em: Added code so that .xs linker scripts are + called so that ARM shared libraries are built correctly. + +1999-06-22 Mark Mitchell <mark@codesourcery.com> + + * ldmain.c (main): Initialize link_info.init_function and + link_info.fini_function. + * lexsup.c (OPTION_INIT): New macro. + (OPTION_FINI): Likewise. + (ld_options): Add descriptions for them. + (parse_args): Handle them. + +1999-06-23 Ian Lance Taylor <ian@zembu.com> + + * ldlang.c (section_already_linked): Only discard link once + sections if we are building constructors. + +1999-06-22 Nick Clifton <nickc@cygnus.com> + + * ld.texinfo (Location Counter): Describe behaviour of + location counter inside section statements. + +1999-06-20 Mark Mitchell <mark@codesourcery.com> + + * scripttempl/elf.sc (WRITABLE_RODATA): New variable for + controlling whether or not .rodata is in the data segment or the + text segment. + +1999-06-18 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em: Add new command line switch --thumb-entry. + * emultempl/armelf.em: Add new command line switch --thumb-entry. + * emultempl/armcoff.em: Add new command line switch --thumb-entry. + * ld.texinfo: Document new ARM command line switch: --thumb-entry. + +1999-06-20 H.J. Lu <hjl@gnu.org> + + * configure.in (all_libpath): Accumulate across all enabled targets. + +Sun Jun 20 14:10:33 1999 Richard Henderson <rth@cygnus.com> + + * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of + DEFAULT_EMULATION. + * emultempl/elf32.em: Likewise. + * emultempl/sunos.em: Likewise. + +Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com> + + * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL. + * configure.in (all_emuls): Add targ_extra_libpath. + (all_libpath, EMULATION_LIBPATH): Define. + * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath. + * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH. + +Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * ld.texinfo: Fix use of @item vs. @itemx. + +1999-06-13 Ian Lance Taylor <ian@zembu.com> + + From Thomas Zenker <thz@lennartz-electronic.de>: + * ldgram.y (attributes_opt): Use attributes_list instead of NAME. + (attributes_list, attributes_string): New nonterminals. + * ldlang.c (lang_set_flags): Add invert parameter. Don't handle + '!'. + * ldlang.c (lang_set_flags): Update declaration. + +1999-06-12 Ian Lance Taylor <ian@zembu.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add + entry_symbol as an undefined symbol when doing a relocateable + link. From <jeffdb@goodnet.com>. + +1999-06-12 David O'Brien <obrien@freebsd.org> + + * configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF. + +1999-06-09 Nick Clifton <nickc@cygnus.com> + + * lexsup.c (help): Restore previous format of output. + +1999-06-04 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em: If compiling for arm_epoc_pe rename + interworking functions to avoid a name space clash. + +1999-06-02 Jason Merrill <jason@yorick.cygnus.com> + + * scripttempl/v850.sc: Add initp support. + +1999-06-02 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em: Rename global arm interworking functions to + avoid name collision when all targets BFD is built. + +1999-05-30 Cort Dougan <cort@attis.cs.nmt.edu> + + * Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o. + * configure.tgt (powerpc-*-linux-gnu): Use it. + * emulparams/elf32ppclinux.sh: New file. + +1999-05-29 Ian Lance Taylor <ian@zembu.com> + + * ld.texinfo (Options): Clarify that options which refer to files + must be properly ordered. + +1999-05-29 Nick Clifton <nickc@cygnus.com> + + * emultempl/armelf.em (..._parse_args): New function: Parse + command line option. Accept arm-elf specific command line option + '-p' or '--no-pipeline-knowledge'. + (..._list_options): New function: Describe the new command line + option. + (..._before_allocation): Pass the value of the new variable + no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation. + + * emultemp/armelf_oabi.em (..._before_allocation): Pass zero as + the third parameter to bfd_elf32_arm_process_before_allocation. + +1999-05-28 Nick Clifton <nickc@cygnus.com> + + * lexsup.c (help): Minor formatting changes. + +1999-05-28 Martin Dorey <mdorey@madge.com> + + * configure.tgt (i960-*-elf*): New target. + * emulparams/elf32_i960.sh: New file. + * Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o. + (eelf32_i960.c): New target. + * Makefile.in: Rebuild. + +1999-05-26 Nick Clifton <nickc@cygnus.com> + + * emulparams/armelf_oabi.sh (TEMPLATE_NAME): Set to armelf_oabi. + +1999-05-24 Philip Blundell <philb@gnu.org> + + * emultempl/armelf.em (before_parse): Set config.dynamic_link and + config.has_shared. + * emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define. + * emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise. + +1999-04-13 Philip Blundell <philb@gnu.org> + + * emultempl/armelf.em: Add definitions related to shared objects + (copied from elf32.em). + +Wed May 19 12:44:26 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and + earm26linux.o, add earmelf_linux.o and earmelf_linux26.o. + * Makefile.in: Regenerated. + +1999-05-16 Nick Clifton <nickc@cygnus.com> + + * emulparams/elf32mcore.sh (GENERATE_SHLIB_SCRIPT): Define. + (TEMPLATE_NAME): Define. + +Thu May 13 09:48:09 1999 Joel Sherrill (joel@OARcorp.com) + + * configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets. + (mips*el-*-rtems*, powerpcle-*-rtems*): New targets. + +1999-05-10 DJ Delorie <dj@cygnus.com> + + * scripttempl/pe.sc: Specify the output arch, which Ian says is + the Right Thing to do. + + * emultempl/pe.em: various changes to parameterize the + target-specific information. + (gld_i386pe_after_open): Detect and fix MS import libraries + by renaming the member objects (which are all named the same). + + * pe-dll.c: various changes to parameterize the target-specific + information. + (generate_reloc): support relocs more generically to allow for + expansion. + (pe_exe_build_sections): new; used to add .relocs to .exes + (pe_exe_fill_sections): ditto + +1999-05-10 Catherine Moore <clm@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): + Check for TARGET_IS_arm_epoc_pe. + (gld_${EMULATION_NAME}_before_allocation): Likewise. + +1999-05-12 Anthony Green <green@cygnus.com> + + * ldlang.c (walk_wild, walk_wild_file, walk_wild_section, + output_section_callback, gc_section_callback): New functions for + generic section walks. + (wild, lang_gc_wild): Use walk_wild. + (wild_file, lang_gc_wild_file): Deleted. Common logic moved to + walk_wild_file. + (wild_section, lang_gc_wild_section): Deleted. Common logic moved + to walk_fild_section. Unique logic moved into callbacks + output_section_callback and gc_section_callback. + +1999-04-26 Tom Tromey <tromey@cygnus.com> + + * aclocal.m4, configure: Updated for new version of libtool. + +1999-04-12 Philip Blundell <pb@nexus.co.uk> + + * emulparams/armelf_linux.sh: New file. Support for ARM + GNU/Linux ELF ABI. + * emulparams/armelf_linux26.sh: New file. APCS-26 version of above. + * configure.tgt: For arm*-*-linux-gnu*, set default emulation to + `armelf_linux', and also include `armelf_linux26' and `armelf'. + * Makefile.am: Add rules to make earmlinux.c and earmlinux26.c. + (ALL_EMULATIONS): Add earmlinux.o and earmlinux26.o. + * Makefile.in: Regenerate. + +1999-04-11 Richard Henderson <rth@cygnus.com> + + * Makefile.am (ALL_EMULATIONS): Add elf_i386_be.o. + * configure.tgt (i[3456]86-*-beos*): Use it. + * emulparams/elf_i386_be.sh: New file. + * Makefile.in: Rebuild. + + * configure.in (environ): Detect declaration. + * ldmain.c (main): Don't declare environ. + * sysdep.h (environ): Declare if needed. + * configure, config.in: Rebuild. + +1999-04-11 Richard Henderson <rth@cygnus.com> + + * ldgram.y (ldgram_vers_current_lang): New. + (vers_defns): Accept `extern "lang" { }' syntax. + * ldlex.l (vers_node_nesting): New. + (V_IDENTIFIER): Accept . and $ in symbols. + (VERS_NODE): Accept `extern "lang" { }' tokens. Nest VERS_NODE states. + * ldlang.c (lang_new_vers_regex): New `lang' argument. Update callers. + (lang_vers_match_lang_c): New function. + (lang_vers_match_lang_cplusplus): New function. + (lang_vers_match_lang_java): New function. + (lang_do_version_exports_section): Fix iteration. Don't free + section contents, as it is still in use by the patterns. + +1999-04-10 Richard Henderson <rth@cygnus.com> + + * ldmain.c (main): Init link_info.no_undefined. + * lexsup.c: Add command-line option --no-undefined. + +1999-04-06 Ian Lance Taylor <ian@zembu.com> + + * ld.h (LC_MESSAGES): Never define. + * ldmain.c (main): Don't pass LC_MESSAGES to setlocale if the + system does not define it. + +1999-04-06 H.J. Lu <hjl@gnu.org> + + * ldmain.h (demangling): Declare. + * ldmain.c (demangling): New global variable. + (main): Initialize demangling. + * ldmisc.c (vfinfo): Don't demangle symbol if ! demangling. + * lexsup.c (ld_options, parse_args): Handle --demangle and + --no-demangle. + * ld.texinfo, ld.1: Document --demangle/--no-demangle. + + * ldlex.l (V_IDENTIFIER): Allow '.' in symbol. + +1999-04-05 Chris Torek <torek@BSDI.COM> + + * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Check that + a shared library really exists, avoiding broken symlinks. + + * ldfile.c (ldfile_open_file): Generate a better error message if + we can't find a -l file. + +1999-04-05 DJ Delorie <dj@cygnus.com> + + * configure.tgt (i386-*-pe): add targ_extra_ofiles for other PE + targets (i386-pe and i386-winnt) + +1999-04-04 Ian Lance Taylor <ian@zembu.com> + + * deffilep.y: Include "sysdep.h" and "ldmisc.h". + (def_file_add_directive): Change return type to void. Remove + unused locals sh_reserve, sh_commit, and j. + (def_ungetc): Always return a value. + (def_lex): Correct parenthesization of || within &&. + * deffile.h (def_file_add_directive): Update declaration. + * pe-dll.c: Include <time.h>, <ctype.h>, and "ldemul.h". + (generate_edata): Remove unused local i. + (quoteput): Add cast to avoid warning. + (pe_dll_generate_def_file): Fix type in format string. + (quick_symbol): Remove unused local blhe. + (pe_dll_generate_implib): Add cast to avoid warning. + (pe_process_import_defs): Remove unused locals ar_head, ar_tail, + and n. + (pe_as16): Comment out. + +1999-04-04 Don Bowman <don@pixsci.com> + + * configure.tgt: Add mips*-*-vxworks* target. + +1999-03-31 Nick Clifton <nickc@cygnus.com> + + * Makefile.in (ALL_EMULATIONS): Add earm_epoc_pe.o + Add build rule and dependencies for earm_epoc_pe.c. + + * emulparams/arm_epoc_pe.sh: New file. + + * configure.tgt: Add 'targ_extra_ofiles' for ARM based PE + targets. + +1999-03-31 Philip Blundell <pb@nexus.co.uk> + + * configure.tgt: Match `arm*-*-linux-gnu*' not + `armv*-*-linux-gnu'. + +1999-03-26 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * scripttempl/elf.sc: Put the .eh_frame and .gcc_except_table + sections in the data segment. + +Fri Mar 26 12:05:51 1999 Catherine Moore <clm@cygnus.com> + + * ld.h (wildcard_spec): Add exclude_name. + * ldgram.y (EXCLUDE_FILE): New token. + (wildcard_spec): Set exclude_name. + (file_NAME_list): Recognize EXCLUDE_FILE. + * ldlang.c (wild_section): Check for excluded files. + (print_wild_statement): Print excluded files. + (lang_add_wild): New argument exclude_filename. + Set exclude_filename. + * ldlang.h (lang_wild_statement_type): Add exclude_filename. + * ldlex.l: New token EXCLUDE_FILE. + * mri.c (mri_draw_tree): Add argument to lang_add_wild. + * scripttempl/elf.sc (CTOR, DTOR): Exclude crtend.o from ctor wildcard. + Reorder sorted and unsorted ctors. + * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise. + * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise. + * scripttempl/elfppc.sc (CTOR, DTOR): Likewise. + +1999-03-26 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_gc_sections): If entry_symbol is not defined, + default to "start". + +1999-03-03 Nick Clifton <nickc@cygnus.com> + + * scripttempl/elf.sc: Add explicit placements for the .eh_frame + and .gcc_except_table sections. + +Wed Mar 3 09:13:34 1999 Catherine Moore <clm@cygnus.clm> + + * scripttempl/elf.sc: Remove .end.ctors and .end.dtors + sections. Reorder .ctors section entries. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/elfd30v.sc: Likewise. + * scripttempl/elfppc.sc: Likewise. + +1999-02-26 Jim Lemke <jlemke@cygnus.com> + + * ldmain.c (main): Wrong error msg for -r and --mpc860c0. + +1999-02-25 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_check_section_addresses): Remove extraneous + backslash. + +Thu Feb 25 15:07:24 1999 Catherine Moore <clm@cygnus.com> + + * scripttempl/elf.sc: Don't gather .ctor and .dtor sections + for relocateable links. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/elfd30v.sc: Likewise. + * scripttempl/elfppc.sc: Likewise. + +1999-02-22 Jim Lemke <jlemke@cygnus.com> + + * ldint.texinfo: remove extraneous right brace. + * ldmain.c (main): initialize and check option "mpc860c0". + * lexsup.c (ld_options, parse_args): add option "mpc860c0". + +Wed Feb 17 12:10:06 1999 Stan Cox <scox@cygnus.com> + + * mpw-elfmips.c (gldelf32ebmip_before_allocation): Remove special + .reginfo section handling. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Likewise. + * emulparams/elf32elmip.sh (INITIAL_READONLY_SECTIONS): Removed + * emulparams/elf32ebmip.sh (INITIAL_READONLY_SECTIONS): Removed + +1999-02-17 Nick Clifton <nickc@cygnus.com> + + Patch from: Scott Bambrough <scottb@corelcomputer.com> + + * configure.tgt: Added armv*-*-linux-gnu to $targ_emul + recognition. + +Wed Feb 17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * emultempl/armelf_oabi.em + (bfd_elf32_arm_allocate_interworking_sections, + bfd_elf32_arm_get_bfd_for_interworking, + bfd_elf32_arm_process_before_allocation): Define them to use the + old ABI versions of the functions. + +Tue Feb 16 16:48:19 1999 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Change AC_PREREQ to 2.13. Change AM_PROG_INSTALL + to AC_PROG_INSTALL. Change AM_EXEEXT to AC_EXEEXT. + * Makefile.am (earmelf_oabi.c): Changes spaces to tab. + * acconfig.h: Remove. + * aclocal.m4: Rebuild. + * configure: Rebuild. + * Makefile.in: Rebuild. + +Mon Feb 15 18:21:48 1999 Vladimir N. Makarov <vmakarov@cygnus.com> + + * ldexp.h (struct etree_value_type): Change valid onto valid_p. + + * ldexp.c (new_abs): Ditto. + (new_rel, new_rel_from_section, fold_binary, invalid, fold_name, + exp_fold_tree, exp_binop, exp_trinop, stat_alloc, + exp_get_abs_int): Ditto + + * ldlang.c (print_assignment, lang_size_sections, + lang_do_assignments): Ditto. + +1999-02-11 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_check_section_addresses): New function: Check + addresses assigned to section for overlaps. + (lang_process): Call lang_check_section_addresses if suitable. + + * ld.h: Add new boolean field to args_type structure: + 'check_section_addresses'. + + * ldmain.c: Initialise check_section_addresses field to true. + + * lexsup.c: Add new command line options '--no-check-sections' and + '--check-sections'. + + * ld.texinfo: Document new command line options '--check-sections' + and '--no-check-sections'. + +1999-02-08 Nick Clifton <nickc@cygnus.com> + + * configure.tgt: Add support for StrongARM target. + +Wed Feb 3 19:41:01 1999 Ian Lance Taylor <ian@cygnus.com> + + * ldctor.c (ldctor_build_sets): Just set SEC_KEEP once. Check for + an owner of a section before using it to look up a reloc type. + Don't set SEC_KEEP for the absolute section. + +Mon Feb 1 11:39:46 1999 Catherine Moore <clm@cygnus.com> + + * Makefile.am (earmelf_oabi.o): New. + * Makefile.in: Regenerate. + * configure.tgt (arm-*-oabi): New. + (thumb-*-oabi): New. + * emulparams/armelf_oabi.sh: New. + * emultempl/armelf_oabi.em: New. + +1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfppc.sc: Add support for -fleading-underscores + switch in all linker generated symbols. + + * configure.tgt (powerpc{,le}*-*-vxworks): Add as aliases for + powerpc{,le}-*-eabi. + +Wed Jan 20 17:01:48 1999 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (i[3456]86-*-solaris2*): New target. From Pavel + Roskin <pavel_roskin@geocities.com>. + +1999-01-19 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_size_sections): Count loadable sections as + contributing to the size of the current segment. + +1999-01-15 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_size_sections): Only update the current + address of a region if the section just placed into it is an + allocated section. + +1999-01-12 Nick Clifton <nickc@cygnus.com> + + * Makefile.am: Replace efr30.o with eelf32fr30.o. + * Makefile.in: Regenerate. + + * configure.tgt: Replace fr30 with elf32fr30. + + * emulparams/elf32fr30.sh: New file: Replaces fr30.sh, and uses + generic elf.sc script. Also replaces the .stack section with a + user definable symbol __stack. + +1999-01-11 Nick Clifton <nickc@cygnus.com> + + * scripttempl/fr30.sc: Fill .init and .fini sections with NOP + pattern. + +1999-01-03 Ken Raeburn <raeburn@cygnus.com> + + * Makefile.am (check-DEJAGNU): No longer provide HOSTING_EMU, + HOSTING_CRT0, HOSTING_LIBS; the test suite can extract them from + configure.host and configure.tgt now. + * Makefile.in: Rebuild. + +1998-12-27 Ulrich Drepper <drepper@cygnus.com> + + * lexsup.c (parse_args, case OPTION_RPATH): Avoid adding duplicate + elements to rpath. + +Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o. + (ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead. + * configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES) + if configuring with all targets. + * configure, Makefile.in, aclocal.m4: Rebuild. + + * emultempl/pe.em (pe_enable_stdcall_fixup): Make static. + (pe_dll_do_default_excludes): Removed, unused. + (pe_def_file, pe_dll_export_everything, pe_dll_kill_ats, + pe_dll_stdcall_aliases): Don't initialize them, this file may be + compiled more than once. + * pe-dll.c (pe_def_file, pe_dll_export_everything, + pe_dll_do_default_excludes, pe_dll_kill_ats, + pe_dll_stdcall_aliases): Define and initialize them here instead. + (generate_reloc): Fix allocation of reloc_addresses array to use + bfd_vma instead of unsigned long. Fix element size in qsort call. + (reloc_sort): Compare pointers to bfd_vma instead of unsigned + long. + +Mon Dec 7 21:10:09 1998 J.J. van der Heijden <j.j.vanderheijden@student.utwente.nl> + + * configure.tgt (i[3456]86-*-mingw32*): Add cygwin target specific + files. + +Sun Dec 6 16:33:33 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (m68*-*-gnu*): New target. From Aymeric Vincent + <aymeric.vincent@emi.u-bordeaux.fr>. + +1998-12-04 Nick Clifton <nickc@cygnus.com> + + * emulparams/fr30.sh (TEXT_START_ADDR): Change TEXT_START_ADDR + from 0x100000 to 0x10000 so that it fits in 20 bits. + +Sat Nov 28 22:32:20 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldemul.h (ldemul_recognized_file): Declare. + +Sat Nov 28 22:30:55 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * ldlang.c (lang_add_wild): Don't pretend that there is an input + file if the filename is a wildcard pattern. + +1998-11-25 DJ Delorie <dj@cygnus.com> + + * ldemul.h (ld_emulation_xfer_struct): new hook "recognized_file" + * ldemul.c (ldemul_recognized_file): new function, new hook + * ldint.texinfo: document new hook. + * ldlang.c (load_symbols): call recognized_hook for all objects we + do recognize, in case the emulation needs to handle them + specially. PE DLLs use this. + * pe-dll.c (pe_dll_generate_def_file): take out hack and debug + printfs + * emultempl/pe.em (gld_i386_recognized_file): new function + (gld_i486_unrecognized_file): take out hack + +1998-11-23 DJ Delorie <dj@cygnus.com> + + * pe-dll.c (fill_edata): fill in timestamp + (make_head): name object files sequentially to ensure + they link in the right order. + (make_tail): same here + (pe_process_import_defs): use sequential names for bfds to ensure + proper link order. + (pe_implied_import_dll): new function; handles linking directly + against DLLs by simulating IMPORTS directives. * emultempl/pe.em + (gld_i386pe_before_parse): hack bfd to not recognize .dll files + via bfd_pe_dll_not_recognized_hack + +1998-11-23 DJ Delorie <dj@cygnus.com> + + * emultempl/pe.em (gld_i386pe_parse_args): Conditionalize call to + pe_dll_add_excludes + +Mon Nov 23 14:36:18 1998 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em (after_parse): Only create an undefined entry + symbol if one has been specified. + +1998-11-23 DJ Delorie <dj@cygnus.com> + + * emultempl/pe.em (gld_i386pe_after_open): call + pe_process_import_defs + * pe-dll.c (pe_dll_generate_def_file): calculate BASE from + pe_data, only print if actually set. Print version only if + set. + (save_relocs): save relocs for both input and output. + (make_one): support internal/external different names. + (pe_dll_generate_implib): support new make_one + (pe_process_import_defs): new function; handles IMPORT + directives in .def files. + +Fri Nov 20 13:06:49 1998 Nick Clifton <nickc@cygnus.com> + + * ldmisc.c (vfinfo): Cope with empty symbol names. + +Thu Nov 19 13:31:15 1998 Nick Clifton <nickc@cygnus.com> + + * scripttempl/pe.sc: Add provision of '_end' symbol. + +Wed Nov 18 18:18:43 1998 Geoffrey Noer <noer@cygnus.com> + + * configure.tgt: change refs from cygwin32* to cygwin*. + * aclocal.m4: regenerate + * configure.in: don't need to call AM_CYGWIN32. + * configure: regenerate + +Mon Nov 16 22:14:07 1998 DJ Delorie <dj@cygnus.com> + + * emultempl/pe.em (gld_i386_finish): generate import library + * deffile.h: add hint member. + * pe-dll.c (pe_dll_generate_implib): New function with helpers; + generates the import library directly from the export table. + (fill_edata): remember the actual hint for the import library. + +Sat Nov 14 14:36:24 1998 Ian Lance Taylor <ian@cygnus.com> + + * ld.1: Some cleanups from NOKUBI Hirotaka <hnokubi@yyy.or.jp>. + +Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com> + + * po/ld.pot: Regenerated. + * po/POTFILES.in: Regenerated. + * configure: Regenerated. + * aclocal.m4: Regenerated. + * Makefile.in: Regenerated. + +Wed Nov 11 18:10:15 1998 DJ Delorie <dj@cygnus.com> + + * pe-dll.c (generate_reloc): don't output PE relocs for sections + that won't be loaded. + +Wed Nov 11 13:44:54 1998 DJ Delorie <dj@cygnus.com> + + * pe-dll.c (fill_edata): don't strip underscores + +Tue Nov 10 21:28:19 1998 DJ Delorie <dj@cygnus.com> + + * ld.texinfo: added i386pe option summary + +Tue Nov 10 17:53:17 1998 DJ Delorie <dj@cygnus.com> + + * pe-dll.c (process_def_file): properly note undefined exported + symbols, clean up old code. + (pe_dll_generate_def_file): don't crash if pe_def_file is NULL + * emultempl/pe.em (gld_i386_parse_args): add + (en/dis)able-stdcall-fixups + (pe_fixup_stdcalls): warn about stdcall fixups + (gld_i386_unrecognized_file): make exported symbols undefs so that + archive members get pulled in + +Tue Nov 10 14:50:51 1998 Catherine Moore <clm@cygnus.com> + + * scripttempl/elfd10v.sc: Add KEEP attribute to .init, + .fini, .dtors and .ctors. Add .data and .text + wildcards to support section garbage collection. + +Mon Nov 9 22:52:50 1998 DJ Delorie <dj@indy.delorie.com> + + * deffilep.y: properly handle relocs with multiple def_files, + cache import module names + +Mon Nov 9 22:44:58 1998 DJ Delorie <dj@cygnus.com> + + * pe-dll.c (process_def_file): don't assume exports won't move + during a realloc + +Mon Nov 9 16:41:30 1998 DJ Delorie <dj@cygnus.com> + + * pe-dll.c: New file; direct support for PE DLLs + * deffile.h: New file; direct support for PE DLLs + * deffilep.y: New file; direct support for PE DLLs + * emultempl/pe.em: add direct support for PE DLLs + * configure.tgt: allow target-specific extra files + * configure.in: allow target-specific extra files + * ldlang.c (lang_add_assignment): return the assignment so that + one can change the value later based on the object files (pe-dll + DEF files do this) + * ldint.texinfo: add section for emulation walkthrough + * Makefile.am: add new files and target-specific extra files + * emultempl/pe.em (gld_i386_list_options): list dll-specific + options. + * pe-dll.c (process_def_file): auto-export everything if + nothing is otherwise exported. + +Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com> + + * Makefile.am: Add support for FR30 target. + * configure.tgt: Add support for FR30 target. + * Makefile.in: Regenerate. + * emulparams/fr30.sh: New file. + * scripttemp/fr30.sc: New file. + +Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com> + + * ldmain.c (main): Don't report error for dynamic links and + --gc-sections. + +1998-10-26 16:05 Ulrich Drepper <drepper@cygnus.com> + + * lexsup.c (ld_options): Change text of -O to Optimize output file". + (parse_args): Set link_info.optimize based on -O argument. + * ldmain.c (main): Initialize link_info.optimze to false. + * ld.texinfo: Describe -O option. + * ld.1: Likewise. + +Mon Oct 12 14:29:56 1998 Nick Clifton <nickc@cygnus.com> + + * scripttempl/v850.sc: Move .sbss and .scommon sections into their + own segment, so that they can be next to the .bss section and so + initialised by the same piece of code. + +Fri Oct 9 15:59:52 1998 Catherine Moore <clm@cygnus.com> + + * scripttempl/elf.sc: Merge .sdata.* etc sections. + * ldctor.c (ldctor_build_sets): Set SEC_KEEP for + ctor sections. + +Mon Oct 5 09:40:43 1998 Catherine Moore <clm@cygnus.com> + + * ldmain.c (main): Error if --gc-sections and + dyanmic linking. + * scripttempl/v850.sc: Add KEEP attribute to .init, + .fini, .dtors and .ctors. Add .data and .text + wildcards to support section garbage collection. + +Wed Sep 30 11:19:15 1998 Nick Clifton <nickc@cygnus.com> + + * scripttempl/v850.sc: Rename .call_table section to + .call_table_data and create a new section called + .call_table_text. + +Sun Sep 20 00:43:26 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Add alignment at the end of the .bss + section, so that it is included in the memsize of the segment. + +Fri Sep 18 13:42:42 1998 Catherine Moore <clm@cygnus.com> + + * emultempl/elf32.em (gld_place_orphan): Don't process for + sections with SEC_EXCLUDE flag. + +Fri Sep 4 09:24:02 1998 Nick Clifton <nickc@cygnus.com> + + * emulparams/d30velf.sh (TEXT_SIZE): Increased to 2000K. + (DATA_SIZE): Increased to 2000K. + +Thu Sep 3 17:30:58 1998 Richard Henderson <rth@cygnus.com> + + * emulparams/d10velf.sh (TEMPLATE_NAME): Use elf32. + +Mon Aug 31 01:06:00 1998 Catherine Moore <clm@cygnus.com> + + * Makefile.am: Change armelf.sc to elf.sc + * Makefile.in: Regenerate. + +Mon Aug 31 11:12:04 1998 Catherine Moore <clm@cygnus.com> + + * emulparams/armelf.sh: Change SCRIPT_NAME to + elf. Change TEXT_START_ADDR to 0x8000. Define + OTHER_TEXT_SECTIONS, OTHER_BSS_SYMBOLS and + OTHER_BSS_END_SYMBOLS. + * scripttempl/elf.sc: Modify to use + OTHER_BSS_END_SYMBOLS. + * scripttempl/elfarm.sc: Remove file. + +Tue Aug 18 12:05:34 1998 Catherine Moore <clm@cygnus.com> + + * emultempl/armelf.em (gld_armelf_before_allocation): + Add bfd_ prefix to elf32_arm_process_before_allocation + and elf32_arm_allocate_interworking_sections. + (gld_armelf_after_open): Add bfd_ prefix to + elf32_arm_get_bfd_for_interworking. + +Fri Aug 14 15:34:29 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * ldgram.y: Include "ldctor.h". + (statement): Accept SORT around CONSTRUCTORS. + * ldctor.c: Include <ctype.h>. + (constructors_sorted): New global variable. + (ctor_prio, ctor_cmp): New static functions. + (ldctor_build_sets): Sort constructors if requested. + * ldctor.h (constructors_sorted): Declare. + * ldlang.c (print_statement): Print sorted CONSTRUCTORS + correctly. + * scripttempl/elf.sc: Add sort around CONSTRUCTORS. + * ld.texinfo (Output Section Keywords): Document SORT + (CONSTRUCTORS). + +Thu Aug 13 12:20:39 1998 Catherine Moore <clm@cygnus.com> + + * emulparams/armelf.sh: Define TEMPLATE_NAME to armelf. + * scripttempl/elfarm.sc: Include .glue_7t and .glue7 + sections. + * emultempl/armelf.em: New file. + +Thu Aug 13 12:52:45 1998 H.J. Lu <hjl@gnu.org> + + * Makefile.am (ld.dvi): Use " instead of ' for MAKEINFO. + * Makefile.in: Rebuild. + +Tue Aug 11 16:17:01 1998 Catherine Moore <clm@cygnus.com> + + * scripttempl/elfarm.sc: Change text start address + back to zero. + +Tue Aug 11 10:01:12 1998 Jeffrey A Law (law@cygnus.com) + + * emulparms/mn10200.sh (MAX_PAGESIZE): Define to 1. + * emulparms/mn10300.sh (MAX_PAGESIZE): Define to 1. + +Sun Aug 9 20:31:27 1998 Catherine Moore <clm@cygnus.com> + + * scripttempl/elfarm.sc: Set text start address to + 0x8000. Add __bss_end definition. + +Sat Aug 1 11:47:37 1998 Catherine Moore <clm@cygnus.com> + + * scripttempl/elfarm.sc: New file. + * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm. + +Fri Jul 31 15:56:16 1998 Catherine Moore <clm@cygnus.com> + + * emulparams/armelf.sh: New file. + * configure.tgt: Recognize thumb-elf and arm-elf. + * Makefile.am (earmelf.o): New. + * Makefile.in: Rebuild. + +Fri Jul 24 12:00:57 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (install-exec-local): Don't remove the file before + checking whether $(bindir) == $(tooldir)/bin. From Maciej + W. Rozycki <macro@ds2.pg.gda.pl>. + * Makefile.in: Rebuild. + + * configure.tgt: Recognize h8[35]00*-coff* as well as -hms*. + +Thu Jul 23 11:15:12 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/aout.sc: If ALIGNMENT is defined, use it to set + alignment of end symbol. + * scripttempl/elf.sc: Likewise. + * emulparams/sun4.sh (ALIGNMENT): Define. + * emulparams/elf32_sparc.sh (ALIGNMENT): Define. + * ldint.texinfo (emulation parameters): Document ALIGNMENT. + + * lexsup.c (parse_args): Add missing break statement. + + * ldlang.c (lang_gc_sections_1): Add default case to switch to + avoid warnings. + +Tue Jul 14 15:42:17 1998 Richard Henderson <rth@cygnus.com> + + * configure.tgt (i?86-*-beos{pe,elf,}*): Recognize. + * Makefile.am (ei386beos.o): New. + * emulparams/i386beos.sh: New file. + * emultempl/beos.em, scripttempl/i386beos.sc: New file. + +Tue Jul 14 15:35:42 1998 Richard Henderson <rth@cygnus.com> + + * lexsup.c: New option --version-exports-section. + * ld.h (struct args_type): Add version_exports_section. + * ldlang.c (lang_do_version_exports_section): New function. + (lang_process): Call it. + +Mon Jul 13 13:20:23 1998 Steve Chamberlain <sac@transmeta.com> + + * ldlex.l: Accept ASSERT. + * ldgram.y (exp): Add ASSERT_K case. + * ldexp.h (node_type): Add etree_assert to node_class enum. + (etree_type): Add assert_s field. + (exp_assert): Declare. + * ldexp.c (exp_fold_tree): Handle etree_assert. + (exp_assert): New function. + (exp_print_tree): Handle etree_assert. + * ld.texinfo (Miscellaneous Commands): Document ASSERT. + +Wed Jul 8 14:03:12 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y: Change MAX to MAX_K and MIN to MIN_K, to avoid + conflicts with system header files. Change all uses. + + * Makefile.am (MAINTAINERCLEANFILES): Define. + * Makefile.in: Rebuild. + +Tue Jul 7 18:03:22 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (ldver.texi): New target. + (ld.info, ld.dvi): Depend upon ldver.texi. + * ld.texinfo: Include ldver.texi. Mention version number on title + page and in top node. + * Makefile.in: Rebuild. + +Mon Jul 6 14:55:13 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.tgt (i[3456]86-*-solaris*): New target. + +Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (wild_section): Don't get an assertion failure if the + section is discarded. + + * scripttempl/pe.sc: Use SORT to sort sections appropriately. + * emultempl/pe.em (sort_by_file_name): Remove. + (sort_by_section_name): Remove. + (sort_sections_1, sort_sections): Remove. + (gld_${EMULATION_NAME}_before_allocation): Don't call + sort_sections. + (hold_section, hold_section_name): New static variables. + (hold_use, hold_text, hold_rdata, hold_data, hold_bss): Likewise. + (gld_${EMULATION_NAME}_place_orphan): Rewrite. Look for a good + place to put the section. Align the section. Sort the input + sections by name. + (gld_${EMULATION_NAME}_place_section): New static function. + + * ldlang.c (wild_sort): When sorting by file name, sort by archive + name first. + + * emultempl/pe.em (set_pe_subsystem): Don't call + ldlang_add_undef. + (gld_${EMULATION_NAME}_after_parse): New static function. + (ld_${EMULATION_NAME}_emulation): Use new after_parse function + rather than after_parse_default. + + * ldgram.y (extern_name_list): Do not require symbols to be + separated by commas. + (ifile_p1): Add EXTERN. + * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI + mode. + * ld.texinfo (Options): Mention that EXTERN is equivalent to -u. + (Miscellaneous Commands): Document EXTERN. + +Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com> + + * ld.h (args_type): Add gc_sections. + * ldgram.y (ldgram_had_keep, KEEP): New. + (input_section_spec_no_keep): Rename from old input_section_spec. + (input_section_spec): New. Recognize KEEP. + * ldlang.c (wild_section): Handle keep sections. + (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New. + (lang_gc_sections_1, lang_gc_sections): New. + (lang_process): Invoke lang_gc_sections. + (lang_add_wild): Add keep argument. Update all callers. + * ldlang.h (lang_wild_statement_struct): Add keep_sections. + * ldlex.l (KEEP): Match it. + * ldmain.c (main): Error on -r and --gc-sections. + * lexsup.c: Add --gc-sections. + + * scripttempl/elf.sc: Merge .text.* etc sections appropriately. + Mark startup sections with KEEP. + * scripttempl/elfppc.sc: Likewise. + + * ld.texinfo: Update for --gc-sections and KEEP. + +Wed Jul 1 15:21:20 1998 Ian Lance Taylor <ian@cygnus.com> + + From Peter Jordan <pjordan@chla.usc.edu>: + * scripttempl/i386go32.sc: Correct constructor handling for -u. + +Tue Jun 23 15:17:27 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (install-data-local): Make ldscripts subdirectory. + * Makefile.in: Rebuild. + +Tue Jun 23 15:17:04 1998 Mike Stump <mrs@wrs.com> + + * Makefile.am (install-exec-local): Don't let EXEEXT interfere + with the program transform name. + * Makefile.in: Rebuild. + +Sun Jun 21 23:55:16 1998 Jeffrey A Law (law@cygnus.com) + + * ld.texinfo: Note that -relax may make symbolic debugging + impossible on some platforms. + +Tue Jun 16 12:51:13 1998 Geoff Keating <geoffk@ozemail.com.au> + + * Makefile.am (Makefile): Remove target. + (config.status): New target. + * Makefile.in: Rebuild. + + * configure.host (powerpc*-*-linux-gnu*): New host. + +Fri Jun 12 17:38:07 1998 Doug Evans <devans@seba.cygnus.com> + + * scripttempl/elf.sc (INPUT_FILES): Optional INPUT spec. + + * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Change top of + stack to 8MB. + +Fri Jun 12 19:33:17 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (HFILES): Remove config.h. + (EMULATION_OFILES, POTFILES): Move patch of May 14 from + Makefile.in to Makefile.am. + (earmcoff.c): Depend upon armcoff.em, not generic.em. + * po/Make-in (all-yes): Correct misspelling in $(PACKAGE). + ($(srcdir)/$(PACKAGE).pot): Pass -C to $(XGETTEXT). + * Makefile.in, po/POTFILES.in, po/ld.pot: Rebuild. + +Fri Jun 12 13:43:17 1998 Tom Tromey <tromey@cygnus.com> + + * po/Make-in (all-yes): If maintainer mode, depend on .pot file. + ($(PACKAGE).pot): Unconditionally depend on POTFILES. + +Tue Jun 9 09:36:48 1998 Nick Clifton <nickc@cygnus.com> + + * ldlang.c (lang_finish): Add CONST type modifier to declaration + of 'send'. + +Fri Jun 5 18:19:59 1998 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set + config.has_shared to true. + * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): + Likewise. + * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): + Likewise. + +Tue Jun 2 12:55:03 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_finish): If the entry symbol is not found, try + parsing it as a number. + * ld.texinfo (Options): Document this. + +Mon Jun 1 14:01:20 1998 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Input Section Wildcards): Document SORT keyword. + +Mon May 18 12:42:53 1998 Doug Evans <devans@canuck.cygnus.com> + + * ld.h (ld_config_type): New member has_shared. + * ldmain.c (main): Initialize it. + * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it. + * lexsup.c (parse_args): Treat -shared as error if not supported. + +Mon May 18 13:14:43 1998 Ian Lance Taylor <ian@cygnus.com> + + From Jason Merrill <jason@cygnus.com>: + * ldlang.c (wild_sort): Correct order of sort. + * scripttempl/elf.sc: Put *crtbegin.o before other .ctors and + .dtors. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/elfd30v.sc: Likewise. + * scripttempl/elfppc.sc: Likewise. + +Fri May 15 00:22:35 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldlex.l: Recognize keyword SORT. + * ldgram.y (current_file): Change to struct wildcard_spec. + (%union): Add new fields cname and wildcard. + (wildcard_name, wildcard_spec): New nonterminals. + (file_NAME_list): Use wildcard_spec. + (input_section_spec): Change current_file usage. + * ld.h (struct wildcard_spec): Define. + * ldlang.h (lang_wild_statement_struct): Add new fields + sections_sorted and filenames_sorted. + (lang_add_wild): Update declaration. + * ldlang.c (wild_sort): New static function. + (wild_section): Use wild_sort. + (print_wild_statement): Print sorting information. + (lang_add_wild): Add new parameters sections_sorted and + filenames_sorted. Change all callers. + * mri.c (mri_draw_tree): Update calls to lang_add_wild. + * scripttempl/elf.sc: Sort .ctors.* and .dtors.* by section name. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/elfd30v.sc: Likewise. + * scripttempl/elfppc.sc: Likewise. + +Thu May 14 18:39:16 1998 Richard Henderson <rth@cygnus.com> + + * emulparams/m32relf.sh (TEMPLATE_NAME): Define. + +Thu May 14 14:51:24 1998 Nick Clifton <nickc@cygnus.com> + + * ldemul.h: Add new prototype: ldemul_list_emulation_options. + (ld_emulation_xfer_struct): Add new field: list_options. + * ldemul.c (ldemul_list_options): New function. Call the + list_options field of the ld_emulation_xfer_struct for each + supported emulation, if such a function is present. + * lexsup.c (help): Call ldemul_list_emulation_options. + * emultempl/pe.em (gld_<>_list_options): New function. Describe + the pe emulation specific command line options. + * emultempl/armcoff.em (gld<>_list_options): New function. + Describe the armcoff emulation specific command line options. + + * emultempl/pe.em: Add a new command line option: + --support-old-code. + * emultempl/armcoff.em: Ditto. + * ld.texinfo: Document the --support-old-code option. + + * Makefile.in: Add emulation files for POTFILES.in target. + * emultempl/pe.em: Internationalise suitable strings. + * emultempl/armcoff.em: Internationalise suitable strings. + * po/POTFILES.in: Rebuilt. + +Sun May 10 22:36:30 1998 Jeffrey A Law (law@cygnus.com) + + * po/Make-in (install-info): New target. + +Tue Apr 28 19:18:30 1998 Tom Tromey <tromey@cygnus.com> + + * ldmain.c (main): Conditionally call setlocale. + * ld.h: Include <locale.h> if HAVE_LOCALE_H. + (LC_MESSAGES): Now can be defined even when ENABLE_NLS. + +Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Change version number to 2.9.4 + * configure: Rebuild. + + * ld.texinfo (Options) [-rpath-link]: Mention ld.so.conf. + + Based on patch from H.J. Lu <hjl@gnu.org>: + * emultempl/elf32.em (global_vercheck_needed): New file static + variable. + (global_vercheck_failed): New file static variable. + (gld${EMULATION_NAME}_after_open): Check for shared libraries + twice, once with force set to 0 and once with it set to 1. + (gld${EMULATION_NAME}_check_ld_so_conf): Add force parameter. + Change all callers. + (gld${EMULATION_NAME}_search_needed): Likewise. + (gld${EMULATION_NAME}_try_needed): Likewise. If not force, check + whether the libraries needs any incompatible versions. + (gld${EMULATION_NAME}_vercheck): New static function. + +Wed Apr 22 16:01:35 1998 Tom Tromey <tromey@cygnus.com> + + * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + +Wed Apr 22 12:40:56 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (check-DEJAGNU): Add $(INTLLIBS) to LIBIBERTY when + invoking runtest. + * Makefile.in: Rebuild. + + * lexsup.c (parse_args): Change -l options into --library options + to avoid confusion between -li and -library. + + * ld.texinfo (MEMORY): Clarify use of >REGION. + +Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com> + + * Many files: Added gettext invocations around user-visible + strings. + * ld.h: Added gettext-related includes and defines. + * ldmain.c: Call setlocale, bindtextdomain, textdomain. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and + po/Makefile. Use AM_PROG_LEX. + (TDIRS): AC_SUBST early on, to avoid having value split when it + happens to cross line 90 of the generated sed script. + * Makefile.am (SUBDIRS): New macro. + (POTFILES): Likewise. + (po/POTFILES.in): New target. + (ld_new_LDADD): Added INTLLIBS. + (ld_new_DEPENDENCIES): Added INTLDEPS. + * po/Make-in, po/POTFILES.in, po/gas.pot: New files. + +Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Simple Example): Rewrite a few things as suggested + by Nick Clifton <nickc@cygnus.com>. + (PROVIDE): Likewise. + +Tue Apr 21 09:55:06 1998 Nick Clifton <nickc@cygnus.com> + + * emultempl/pe.em: Rename external arm interworking functions + to conform to BFD naming conventions. Add code to _after_open() + function to obtain a bfd for use by the interworking code. + + * emultempl/armcoff.em: Rename external arm interworking functions + to conform to BFD naming conventions. Add new _after_open() + function to obtain a bfd for use by the interworking code. + +Sun Apr 19 19:23:09 1998 Richard Henderson <rth@cygnus.com> + + * ldlang.c (lang_size_sections) [case lang_assignment_statement_enum]: + Update dot and the default memory section even when relaxing. + +Sat Apr 18 18:41:12 1998 Richard Henderson <rth@cygnus.com> + + * ldlang.c (lang_one_common): Manipulate the section's cooked size + rather than its raw size. + +Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org> + + * configure.in (TESTBFDLIB): New. Defined and substituted. + * Makefile.am (TESTBFDLIB): Changed to @TESTBFDLIB@. + * configure, Makefile.in: Rebuild. + +Mon Apr 6 15:33:39 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (ld.info): Invoke makeinfo with -I options directly + rather than relying on default rule. Don't depend upon + bfdsumm.texi. + (ld.dvi): Likewise. + (bfdsumm.texi): Remove target. + (CLEANFILES): Take bfdsumm.texi out of value. + * Makefile.in: Rebuild. + +Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Use shell variables to avoid depending upon + how $ is handled when expanding a shell substitution. + +Fri Apr 3 00:56:50 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum. + (DISTCLEANFILES): Add site.exp and site.bak. + * Makefile.in: Rebuild. + + * configure.in: Put the tdirs in a file and use AC_SUBST_FILE, + rather than in a shell variable and using AC_SUBST. + * Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs. + (distclean-local): New target. + * configure, Makefile.in: Rebuild. + + * ld.texinfo: Completely rewrite linker script documentation. + +Mon Mar 30 12:47:33 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Set version to 2.9.1. + * configure: Rebuild. + + * Branched binutils 2.9. + +Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (MOSTLYCLEANFILES): Remove tmpdir. + (mostlyclean-local): New target to remove tmpdir. + * Makefile.in: Rebuild. + + Fix some gcc -Wall warnings: + * ldcref.c (output_cref): Add casts to avoid warnings. + * ldfile.c (ldfile_add_arch): Likewise. + * ldlang.c (lang_leave_overlay_section): Likewise. + * lexsup.c (OPTION_COUNT): Likewise. + (parse_args): Likewise. + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): + Likewise. + * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Likewise. + * ldlang.c (lang_check): Initialize variables to avoid warnings. + * ldwrite.c (build_link_order): Likewise. + * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Likewise. + * emultempl/armcoff.em (gld${EMULATION_NAME}_before_allocation): + Remove unused variables. + + * Makefile.am (MOSTLYCLEANFILES): Correct name (was + MOSTCLEANFILES). + * Makefile.in: Rebuild. + +Fri Mar 27 16:39:25 1998 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Put + ARM code inside ifdef TARGET_IS_armpe. + +Wed Mar 25 11:34:13 1998 Ian Lance Taylor <ian@cygnus.com> + + Based on patch from H.J. Lu <hjl@gnu.org>: + * Makefile.am (LDDISTSTUFF): New variable. + (diststuff): New target. + * Makefile.in: Rebuild. + + * scripttempl/pe.sc: Only include .idata\$[0-7] in .idata when + relocating. + +Tue Mar 24 15:59:29 1998 Nick Clifton <nickc@cygnus.com> + + * scripttempl/pe.sc (.text): Add .glue_7 and .glue_7t sections to + hold Arm/Thumb stubs. + + * emultempl/pe.em (gld_pe_before_allocation): Call + arm_process_before_allocation (for ARM/Thumb targets) in order to + gather interworking stb information. + +Mon Mar 23 18:54:15 1998 Joel Sherrill <joel@OARcorp.com> + + * configure.tgt: (sh*-*-rtems*): Switched from ELF to COFF. + +Fri Mar 20 19:17:13 1998 Ian Lance Taylor <ian@cygnus.com> + + * aclocal.m4, configure: Rebuild with libtool 1.2. + +Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com> + + * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy + section to avoid copying certain data on fork. The linker used to + include this between __data_start__ and __data_end__, but that + breaks building the cygwin32 dll. The fix is to rename the + section ".data_cygwin_nocopy" and explictly include it after + __data_end__. + +Wed Mar 18 09:42:24 1998 Nick Clifton <nickc@cygnus.com> + + * configure.tgt (targ_extra_emuls): Add thumb-pe target. + +Sun Mar 8 23:34:14 1998 Stan Cox <scox@equinox.cygnus.com> + + * configure.tgt (sparclite*-*-elf): Added. + +Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com> + + * ldlang.c (lang_size_sections): If the default memory region is + *default*, see if there is a memory region that could be used. + +Thu Feb 26 17:09:53 1998 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfd30v.sc: Add support for .eit_v section and put + it at 0xfffff020. + * emulparams/d30v{elf,_o,_e}.sh: Ditto. + +Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (sort_sections): Permit the wildcard to include + a trailing '*' when sorting grouped sections. + * scripttempl/pe.sc: Include grouped sections using NAME\$*. Only + include them when relocating. + +Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com> + + * Makefile.am (install-exec-local): Install properly when ln + fails or tooldir == prefix. + +Fri Feb 13 15:24:06 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Define. + * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + +Thu Feb 12 14:10:44 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Align the _end symbol according to the ELF + format size. From Gordon W. Ross <gwr@mc.com>. + + NetBSD patches from Gordon W. Ross <gwr@mc.com>: + * configure.host (alpha*-*-netbsd*): New host. + * configure.tgt (alpha*-*-netbsd*, powerpc-*-netbsd*): New + targets. + + * lexsup.c (help): Update bug-gnu-utils address. + * ld.texinfo (Bug Reporting): Likewise. + +Tue Feb 10 18:05:56 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldlang.c (lang_size_sections): Warn if some memory regions were + defined, but a loadable section is going into the default memory + region. + +Tue Feb 10 16:17:20 1998 H.J. Lu <hjl@gnu.org> + + * ldlex.l (V_IDENTIFIER): Allow '.' as symbol prefix. + +Tue Feb 10 15:09:45 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (Makefile): Add target, for dependencies on + configure.host and configure.tgt. + * configure.host, configure.tgt: Change -linux* to -linux-gnu*. + * Makefile.in: Rebuild. + +Mon Feb 9 13:44:40 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * scripttempl/elfd10v.sc (.stack): Move stack to 0x00..7FFE. + + * emulparams/d10velf.sh (READONLY_START_ADDR): Read only section + moved to 0x00.....4. + +Sat Feb 7 15:41:26 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure, aclocal.m4: Rebuild with new libtool. + +Thu Feb 5 12:16:11 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/pe.sc: Remove ${RELOCATING-0} from all sections. + From Thomas de Lellis <tdel@wrs.com>. + + * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. + +Wed Feb 4 13:02:32 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (ld_new_LDADD): Remove @LEXLIB@. + * Makefile.in: Rebuild. + +Mon Feb 2 19:34:54 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU> + + Add tms320c30 support: + * configure.tgt (tic30-*-*aout*, tic30-*-*coff*): New targets. + * emulparams/tic30aout.sh: New file. + * emulparams/tic30coff.sh: New file. + * scripttempl/tic30aout.sc: New file. + * scripttempl/tic30coff.sc: New file. + * Makefile.am (ALL_EMULATIONS): Add etic30aout.o and + etic30coff.o. + (etic30aout.c, etic30coff.c): New targets. + * Makefile.in: Rebuild. + +Mon Feb 2 14:10:59 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.host: Correct HOSTING_CRT0 in alpha*-*-linux* case to + accept either ld.so or ld-linux.so. + +Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com> + + * Makefile.am ({CC,CXX}_FOR_TARGET): Change program_transform_name + to transform. + * Makefile.in: Regenerate. + +Fri Jan 30 19:15:17 1998 Geoff Keating <geoffk@ozemail.com.au> + + * scripttempl/elfppc.sc: Put .dynsbss in .sbss. + +Fri Jan 30 11:43:49 1998 H.J. Lu <hjl@gnu.ai.mit.edu> + + * Makefile.am (eelf32bsmip.c, eelf32lsmip.c): New targets. + * Makefile.in: Rebuild. + +Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu> + + * ldfile.c (slash): Set to backslash if _WIN32 but not + __CYGWIN32__. + (ldfile_open_file_search): If __MSDOS__ or _WIN32, accept a + leading backslash or a leading x: as an absolute path. + (ldfile_find_command_file): Use slash rather than / when + generating name to try. + * lexsup.c (PATH_SEPARATOR): Define. + (set_default_dirlist): Use PATH_SEPARATOR rather than ':'. + +Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com> + + * emulparams/elf64_sparc.sh (ELFSIZE): 64 + (TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later. + (DATA_PLT): Needed by v9 abi. + +Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> + + * configure.tgt (i[3456]86-*-mingw32*): New entry. + +Wed Jan 28 15:51:58 1998 Ian Lance Taylor <ian@cygnus.com> + + * scripttempl/elf.sc: Only include linkonce sections in final + sections when relocating. + +Wed Jan 28 14:10:01 1998 Ian Lance Taylor <ian@cygnus.com> + + * ld.texinfo (Options): Add a brief description of the types of + information included in a link map. + + * ld.texinfo (Options): Mention LDEMULATION in description of -m. + (Environment): Mention LDEMULATION. + + * ld.texinfo (Options): Clarify --export-dynamic a bit. + +Thu Jan 22 16:07:23 1998 Richard Henderson <rth@cygnus.com> + + * ldlex.l (<SCRIPT>{WILDCHAR}*): Take care for the comments this + pattern could match. + +Wed Jan 21 22:26:46 1998 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): When doing + a relocateable link, set the image base to 0, and don't define the + various symbols. + * emulparams/i386pe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define. + * scripttempl/pe.sc: Swap the .data and .bss sections so that + .data comes first. If doing a relocateable link, use + RELOCATEABLE_OUTPUT_FORMAT if it is defined, and start the + sections at 0, and don't define any symbols. + + * ldlang.c (lang_memory_default): Correct parenthisization of + expression. + +Wed Jan 21 21:20:32 1998 Manfred Hollstein <manfred@s-direktnet.de> + + * emultempl/sunos.em: Don't include sys/types.h and sys/stat.h + here; they are included already via sysdep.h. + +Tue Jan 6 13:40:02 1998 Richard Henderson <rth@cygnus.com> + + * scripttempl/i960.sc: Don't explicitly set .data and .bss start. + +Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com> + + * ldgram.y (attributes_opt): Pass region pointer to + lang_set_flags, not ®ion->flags. + + * ldlang.c (lang_memory_default): New function to figure out a + default memory region for a section if it was not specified. + (lang_memory_region_lookup): Zero flags, not_flags field. + (lang_map{,_flags}): Print attribute flags in memory map. + (lang_size_sections): Call lang_memory_default to get default + memory region. + (lang_set_flags): Implement attribute flags for real. Take new + argument to give the flags we are to skip for this region. + + * ldlang.h (memory_region_struct): Add not_flags field, make both + flags fields flagword type. + (lang_output_section_state): Make flags field flagword type. + (lang_set_flags): Update prototype to match new calling sequence. + (lang_memory_region_default): Add prototype. + + * emulparams/d30v{_e,_o,elf}.sh ({TEXT,DATA,EMEM}_DEF_SECTION): + Define whether or not the region gets default sections, and if so, + what sections. + + * scripttempl/elfd30v.sc (MEMORY): Set up which of the regions get + default sections. + +Thu Jan 1 22:58:04 1998 Michael Meissner <meissner@cygnus.com> + + * scripttempl/elfd30v.sc (.eh_frame): Link into the data section. + +Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com) + + * scripttempl/h8300h.sc: Fix typo. + * scripttempl/h8300s.sc: Likewise. + +For older changes see ChangeLog-9197 + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/contrib/binutils/ld/MAINTAINERS b/contrib/binutils/ld/MAINTAINERS new file mode 100644 index 0000000..d59a3bd --- /dev/null +++ b/contrib/binutils/ld/MAINTAINERS @@ -0,0 +1 @@ +See ../binutils/MAINTAINERS diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am index 0abc9b5..1a72278 100644 --- a/contrib/binutils/ld/Makefile.am +++ b/contrib/binutils/ld/Makefile.am @@ -13,6 +13,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. @@ -101,50 +104,57 @@ ALL_EMULATIONS = \ eaixrs6.o \ ealpha.o \ earcelf.o \ - earmelf.o \ - earmelf_oabi.o \ - earmelf_linux.o \ - earmelf_linux26.o \ + earm_epoc_pe.o \ earmaoutb.o \ earmaoutl.o \ earmcoff.o \ + earmelf.o \ + earmelf_linux.o \ + earmelf_oabi.o \ earmnbsd.o \ earmpe.o \ - earm_epoc_pe.o \ eavr1200.o \ eavr23xx.o \ - eavr44x4.o \ eavr4433.o \ + eavr44x4.o \ eavr85xx.o \ - eavrmega603.o \ eavrmega103.o \ eavrmega161.o \ + eavrmega603.o \ ecoff_sparc.o \ + ecrisaout.o \ + ecriself.o \ + ecrislinux.o \ ed10velf.o \ - ed30velf.o \ ed30v_e.o \ ed30v_o.o \ + ed30velf.o \ edelta68.o \ eebmon29k.o \ - eelf32_sparc.o \ eelf32_i960.o \ + eelf32_i860.o \ + eelf32_sparc.o \ eelf32b4300.o \ eelf32bmip.o \ + eelf32bmipn32.o \ + eelf32btsmip.o \ eelf32ebmip.o \ eelf32elmip.o \ - eelf32bmipn32.o \ + eelf32fr30.o \ eelf32i370.o \ eelf32l4300.o \ eelf32lmip.o \ eelf32lppc.o \ + eelf32lppcsim.o \ + eelf32mcore.o \ eelf32ppc.o \ eelf32ppclinux.o \ + eelf32ppcsim.o \ eelf_i386.o \ eelf_i386_be.o \ + eelf_i386_chaos.o \ egld960.o \ egld960coff.o \ - eelf32fr30.o \ - eelf32mcore.o \ eh8300.o \ eh8300h.o \ eh8300s.o \ @@ -155,6 +165,8 @@ ALL_EMULATIONS = \ eh8500s.o \ ehp300bsd.o \ ehp3hpux.o \ + ehppaelf.o \ + ehppalinux.o \ ei386aout.o \ ei386beos.o \ ei386bsd.o \ @@ -170,6 +182,10 @@ ALL_EMULATIONS = \ ei386pe.o \ ei386pe_posix.o \ elnk960.o \ + em68hc11elf.o \ + em68hc11elfb.o \ + em68hc12elf.o \ + em68hc12elfb.o \ em68k4knbsd.o \ em68kaout.o \ em68kaux.o \ @@ -189,10 +205,10 @@ ALL_EMULATIONS = \ emipslnews.o \ emipspe.o \ enews.o \ - epjelf.o \ - epjlelf.o \ ens32knbsd.o \ epc532macha.o \ + epjelf.o \ + epjlelf.o \ eppcmacos.o \ eppcnw.o \ eppcpe.o \ @@ -200,8 +216,10 @@ ALL_EMULATIONS = \ esa29200.o \ esh.o \ eshelf.o \ - eshlelf.o \ + eshelf_linux.o \ + eshlelf_linux.o \ eshl.o \ + eshlelf.o \ eshpe.o \ esparcaout.o \ esparclinux.o \ @@ -212,6 +230,7 @@ ALL_EMULATIONS = \ esun4.o \ etic30aout.o \ etic30coff.o \ + etic54xcoff.o \ etic80coff.o \ evanilla.o \ evax.o \ @@ -221,13 +240,16 @@ ALL_EMULATIONS = \ ez8002.o ALL_64_EMULATIONS = \ + eelf64_ia64.o \ + eelf_x86_64.o \ eelf64_sparc.o \ eelf64alpha.o \ - eelf64bmip.o + eelf64bmip.o \ + eelf64hppa.o ALL_EMUL_EXTRA_OFILES = \ - pe-dll.o \ - deffilep.o + deffilep.o \ + pe-dll.o CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \ ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \ @@ -279,7 +301,7 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY) # These all start with e so 'make clean' can find them. -GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" +GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed @TDIRS@ @@ -299,17 +321,16 @@ earcelf.c: $(srcdir)/emulparams/arcelf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} arcelf "$(tdir_arcelf)" earmelf.c: $(srcdir)/emulparams/armelf.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf "$(tdir_armelf)" earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \ $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)" earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)" -earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)" earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS} ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)" @@ -363,6 +384,15 @@ eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \ ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)" +ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} crisaout "$(tdir_cris)" +ecriself.c: $(srcdir)/emulparams/criself.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} criself "$(tdir_cris)" +ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} crislinux "$(tdir_cris)" ed10velf.c: $(srcdir)/emulparams/d10velf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS} ${GENSCRIPTS} d10velf "$(tdir_d10v)" @@ -393,6 +423,9 @@ em32relf.c: $(srcdir)/emulparams/m32relf.sh \ eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)" +eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)" eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)" @@ -405,6 +438,9 @@ eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)" +eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)" eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)" @@ -421,16 +457,22 @@ eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)" eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)" +eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)" eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)" eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)" +eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)" eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} @@ -438,6 +480,12 @@ eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)" +eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)" +eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)" eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)" @@ -447,9 +495,15 @@ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)" +eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)" eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)" +eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)" egld960.c: $(srcdir)/emulparams/gld960.sh \ $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} ${GENSCRIPTS} gld960 "$(tdir_gld960)" @@ -486,6 +540,14 @@ ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \ ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)" +ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)" +ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" @@ -531,6 +593,18 @@ ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \ elnk960.c: $(srcdir)/emulparams/lnk960.sh \ $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} ${GENSCRIPTS} lnk960 "$(tdir_lnk960)" +em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)" +em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)" +em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)" +em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)" em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)" @@ -541,10 +615,11 @@ em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)" em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)" em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)" em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} @@ -627,6 +702,12 @@ esh.c: $(srcdir)/emulparams/sh.sh \ eshelf.c: $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shelf "$(tdir_shelf)" +eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)" +eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)" eshlelf.c: $(srcdir)/emulparams/shlelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shlelf "$(tdir_shlelf)" @@ -663,6 +744,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \ etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)" +etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \ + $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS} + ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)" etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)" @@ -688,6 +772,9 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS} ${GENSCRIPTS} z8002 "$(tdir_z8002)" +# We need this for automake to use YLWRAP. +EXTRA_ld_new_SOURCES = deffilep.y + ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS) @@ -807,7 +894,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.o crtend.o ld.log ld.sum mostlyclean-local: -rm -rf tmpdir -CLEANFILES = dep.sed DEP DEP1 DEP2 +CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 .PHONY: install-exec-local install-data-local @@ -846,8 +933,13 @@ distclean-local: DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(GENERATED_CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -887,7 +979,7 @@ ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldgram.h ldmain.h ldctor.h ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ - ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \ + ldmisc.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h \ ldemul-list.h ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ @@ -900,29 +992,30 @@ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \ - ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h + ldmain.h ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h \ + ldctor.h ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \ - ldemul.h ldlex.h ldfile.h ldctor.h + $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \ + ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldwrite.h \ + ldgram.h ldexp.h ldlang.h ldlex.h ldfile.h ldemul.h \ + ldctor.h ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ - ldver.h ldemul.h ldmain.h + ldver.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \ - ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \ - ldver.h ldemul.h + $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ + ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \ + ldfile.h ldver.h ldemul.h $(INCDIR)/demangle.h mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h @@ -933,13 +1026,13 @@ ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ - ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \ - $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \ - pe-dll.h + ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldfile.h \ + ldemul.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \ + deffile.h pe-dll.h ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \ - ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \ + ldfile.h ldemul.h ldmisc.h ldmain.h mri.h ldctor.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in index 0fa39ae..862cad6 100644 --- a/contrib/binutils/ld/Makefile.in +++ b/contrib/binutils/ld/Makefile.in @@ -68,11 +68,14 @@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CC_FOR_BUILD = @CC_FOR_BUILD@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EMULATION_LIBPATH = @EMULATION_LIBPATH@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ @@ -90,11 +93,13 @@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ STRINGIFY = @STRINGIFY@ +STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -112,6 +117,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. @@ -204,50 +212,57 @@ ALL_EMULATIONS = \ eaixrs6.o \ ealpha.o \ earcelf.o \ - earmelf.o \ - earmelf_oabi.o \ - earmelf_linux.o \ - earmelf_linux26.o \ + earm_epoc_pe.o \ earmaoutb.o \ earmaoutl.o \ earmcoff.o \ + earmelf.o \ + earmelf_linux.o \ + earmelf_oabi.o \ earmnbsd.o \ earmpe.o \ - earm_epoc_pe.o \ eavr1200.o \ eavr23xx.o \ - eavr44x4.o \ eavr4433.o \ + eavr44x4.o \ eavr85xx.o \ - eavrmega603.o \ eavrmega103.o \ eavrmega161.o \ + eavrmega603.o \ ecoff_sparc.o \ + ecrisaout.o \ + ecriself.o \ + ecrislinux.o \ ed10velf.o \ - ed30velf.o \ ed30v_e.o \ ed30v_o.o \ + ed30velf.o \ edelta68.o \ eebmon29k.o \ - eelf32_sparc.o \ eelf32_i960.o \ + eelf32_i860.o \ + eelf32_sparc.o \ eelf32b4300.o \ eelf32bmip.o \ + eelf32bmipn32.o \ + eelf32btsmip.o \ eelf32ebmip.o \ eelf32elmip.o \ - eelf32bmipn32.o \ + eelf32fr30.o \ eelf32i370.o \ eelf32l4300.o \ eelf32lmip.o \ eelf32lppc.o \ + eelf32lppcsim.o \ + eelf32mcore.o \ eelf32ppc.o \ eelf32ppclinux.o \ + eelf32ppcsim.o \ eelf_i386.o \ eelf_i386_be.o \ + eelf_i386_chaos.o \ egld960.o \ egld960coff.o \ - eelf32fr30.o \ - eelf32mcore.o \ eh8300.o \ eh8300h.o \ eh8300s.o \ @@ -258,6 +273,8 @@ ALL_EMULATIONS = \ eh8500s.o \ ehp300bsd.o \ ehp3hpux.o \ + ehppaelf.o \ + ehppalinux.o \ ei386aout.o \ ei386beos.o \ ei386bsd.o \ @@ -273,6 +290,10 @@ ALL_EMULATIONS = \ ei386pe.o \ ei386pe_posix.o \ elnk960.o \ + em68hc11elf.o \ + em68hc11elfb.o \ + em68hc12elf.o \ + em68hc12elfb.o \ em68k4knbsd.o \ em68kaout.o \ em68kaux.o \ @@ -292,10 +313,10 @@ ALL_EMULATIONS = \ emipslnews.o \ emipspe.o \ enews.o \ - epjelf.o \ - epjlelf.o \ ens32knbsd.o \ epc532macha.o \ + epjelf.o \ + epjlelf.o \ eppcmacos.o \ eppcnw.o \ eppcpe.o \ @@ -303,8 +324,10 @@ ALL_EMULATIONS = \ esa29200.o \ esh.o \ eshelf.o \ - eshlelf.o \ + eshelf_linux.o \ + eshlelf_linux.o \ eshl.o \ + eshlelf.o \ eshpe.o \ esparcaout.o \ esparclinux.o \ @@ -315,6 +338,7 @@ ALL_EMULATIONS = \ esun4.o \ etic30aout.o \ etic30coff.o \ + etic54xcoff.o \ etic80coff.o \ evanilla.o \ evax.o \ @@ -325,14 +349,17 @@ ALL_EMULATIONS = \ ALL_64_EMULATIONS = \ + eelf64_ia64.o \ + eelf_x86_64.o \ eelf64_sparc.o \ eelf64alpha.o \ - eelf64bmip.o + eelf64bmip.o \ + eelf64hppa.o ALL_EMUL_EXTRA_OFILES = \ - pe-dll.o \ - deffilep.o + deffilep.o \ + pe-dll.o CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \ @@ -363,9 +390,12 @@ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES) # These all start with e so 'make clean' can find them. -GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" +GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed +# We need this for automake to use YLWRAP. +EXTRA_ld_new_SOURCES = deffilep.y + ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c @@ -380,7 +410,7 @@ MAINTAINERCLEANFILES = ldver.texi MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.o crtend.o ld.log ld.sum -CLEANFILES = dep.sed DEP DEP1 DEP2 +CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 # Stuff that should be included in a distribution. The diststuff # target is run by the taz target in ../Makefile.in. @@ -399,11 +429,14 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -ld_new_OBJECTS = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o \ -ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o +ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \ +ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) ldmain.$(OBJEXT) \ +ldwrite.$(OBJEXT) ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \ +ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT) ld_new_LDFLAGS = LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LEXLIB = @LEXLIB@ +YLWRAP = $(top_srcdir)/../ylwrap CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -420,19 +453,19 @@ MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \ NEWS TODO acinclude.m4 aclocal.m4 config.in configure configure.in \ -ldgram.c ldlex.c +deffilep.c ldgram.c ldlex.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best -SOURCES = $(ld_new_SOURCES) +SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) OBJECTS = $(ld_new_OBJECTS) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y +.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile @@ -485,6 +518,11 @@ maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + .s.o: $(COMPILE) -c $< @@ -493,6 +531,7 @@ maintainer-clean-noinstPROGRAMS: mostlyclean-compile: -rm -f *.o core *.core + -rm -f *.$(OBJEXT) clean-compile: @@ -526,10 +565,8 @@ ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) .l.c: $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ .y.c: - $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c - if test -f y.tab.h; then \ - if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ - else :; fi + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS) +deffilep.h: deffilep.c ldgram.h: ldgram.c @@ -900,7 +937,7 @@ distclean-generic: -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: - -test -z "ldlexlldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl ldgramh ldgramc $(MAINTAINERCLEANFILES) + -test -z "ldlexldeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES) mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ mostlyclean-compile mostlyclean-libtool \ mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \ @@ -998,17 +1035,16 @@ earcelf.c: $(srcdir)/emulparams/arcelf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} arcelf "$(tdir_arcelf)" earmelf.c: $(srcdir)/emulparams/armelf.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf "$(tdir_armelf)" earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \ $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)" earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)" -earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)" earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS} ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)" @@ -1062,6 +1098,15 @@ eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \ ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)" +ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} crisaout "$(tdir_cris)" +ecriself.c: $(srcdir)/emulparams/criself.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} criself "$(tdir_cris)" +ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} crislinux "$(tdir_cris)" ed10velf.c: $(srcdir)/emulparams/d10velf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS} ${GENSCRIPTS} d10velf "$(tdir_d10v)" @@ -1092,6 +1137,9 @@ em32relf.c: $(srcdir)/emulparams/m32relf.sh \ eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)" +eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)" eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)" @@ -1104,6 +1152,9 @@ eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)" +eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)" eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)" @@ -1120,16 +1171,22 @@ eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)" eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)" +eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)" eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)" eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)" +eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)" eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} @@ -1137,6 +1194,12 @@ eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)" +eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)" +eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)" eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)" @@ -1146,9 +1209,15 @@ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)" +eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)" eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)" +eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)" egld960.c: $(srcdir)/emulparams/gld960.sh \ $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} ${GENSCRIPTS} gld960 "$(tdir_gld960)" @@ -1185,6 +1254,14 @@ ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \ ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)" +ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)" +ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" @@ -1230,6 +1307,18 @@ ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \ elnk960.c: $(srcdir)/emulparams/lnk960.sh \ $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} ${GENSCRIPTS} lnk960 "$(tdir_lnk960)" +em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)" +em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)" +em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)" +em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS} + ${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)" em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)" @@ -1240,10 +1329,11 @@ em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)" em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)" em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)" em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} @@ -1326,6 +1416,12 @@ esh.c: $(srcdir)/emulparams/sh.sh \ eshelf.c: $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shelf "$(tdir_shelf)" +eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)" +eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)" eshlelf.c: $(srcdir)/emulparams/shlelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shlelf "$(tdir_shlelf)" @@ -1362,6 +1458,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \ etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)" +etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \ + $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS} + ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)" etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)" @@ -1525,8 +1624,13 @@ distclean-local: DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(GENERATED_CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -1566,7 +1670,7 @@ ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldgram.h ldmain.h ldctor.h ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ - ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \ + ldmisc.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h \ ldemul-list.h ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ @@ -1579,29 +1683,30 @@ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \ - ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h + ldmain.h ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h \ + ldctor.h ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \ - ldemul.h ldlex.h ldfile.h ldctor.h + $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \ + ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldwrite.h \ + ldgram.h ldexp.h ldlang.h ldlex.h ldfile.h ldemul.h \ + ldctor.h ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ - ldver.h ldemul.h ldmain.h + ldver.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \ - ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \ - ldver.h ldemul.h + $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ + ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \ + ldfile.h ldver.h ldemul.h $(INCDIR)/demangle.h mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h @@ -1612,13 +1717,13 @@ ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ - ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \ - $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \ - pe-dll.h + ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldfile.h \ + ldemul.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \ + deffile.h pe-dll.h ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \ - ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \ + ldfile.h ldemul.h ldmisc.h ldmain.h mri.h ldctor.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS index 9506201..f1e7ece 100644 --- a/contrib/binutils/ld/NEWS +++ b/contrib/binutils/ld/NEWS @@ -1,5 +1,31 @@ -*- text -*- +* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs. + +* Support added for eliminating duplicate DWARF2 debug information by + having the compiler generate the information in sections called + .gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents. The + linker then merges these sections together into the normal .debug_info + section. + +* The native ELF linker now searches the directories in DT_RUNPATH or + DT_RPATH of a shared library for shared libraries needed by it. + +* TI C54x support, by Timothy Wall. + +* Added command line switch --section-start to set the start address of any + specified section. + +* Added ability to emit full relocation information in linked executables, + enabled by --emit-relocs. Some post-linkage optimization tools need + this information in order to be able to correctly identify and perform + symbol relative addressing in the event of changes in section contents + (instructions being added or deleted, extending data sections, etc.) + +* Support for i860, by Jason Eckhardt (preliminary, alpha quality). + +* Support for CRIS (Axis Communications ETRAX series). + Changes in version 2.10: * Added AT> to the linker script language to allow load-time allocation of @@ -7,8 +33,8 @@ Changes in version 2.10: * Added garbage collection of unused sections, enabled by --gc-sections. It does require a bit of backend support; currently implemented are - avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf, mcore-elf, - mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf. + arm-elf, avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf, + mcore-elf, mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf. Others will ignore the option. * Added SORT to the linker script language to permit sorting sections by file diff --git a/contrib/binutils/ld/acinclude.m4 b/contrib/binutils/ld/acinclude.m4 index 71b09b9..403aa0e 100644 --- a/contrib/binutils/ld/acinclude.m4 +++ b/contrib/binutils/ld/acinclude.m4 @@ -1 +1,16 @@ sinclude(../bfd/acinclude.m4) + +dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4 +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_SUBST(LIBTOOL) +]) + +dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4 +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4 index 8bebfa0..b468950 100644 --- a/contrib/binutils/ld/aclocal.m4 +++ b/contrib/binutils/ld/aclocal.m4 @@ -12,6 +12,21 @@ dnl PARTICULAR PURPOSE. sinclude(../bfd/acinclude.m4) +dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4 +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_SUBST(LIBTOOL) +]) + +dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4 +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. @@ -104,415 +119,6 @@ else fi AC_SUBST($1)]) - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, @@ -536,351 +142,6 @@ for am_file in <<$1>>; do done<<>>dnl>>) changequote([,]))]) -# This file is derived from `gettext.m4'. The difference is that the -# included macros assume Cygnus-style source and build trees. - -# Macro to add for using GNU gettext. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 3 - -AC_DEFUN(CY_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT, 1, - [Define as 1 if you have gettext and don't want to use GNU gettext.]) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - dnl In the standard gettext, we would now check for catgets. - dnl However, we never want to use catgets for our releases. - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/../intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(CY_GNU_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h values.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -__argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) - fi - - AM_LC_MESSAGES - CY_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to <locale.h> in the installed <libintl.h> file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include <locale.h>" - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header <locale.h>. Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - if test -f $srcdir/po2tbl.sed.in; then - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/po2tbl.sed.in > po2tbl.sed - fi - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. But only do this if the po directory - dnl exists in srcdir. - if test -d $srcdir/po; then - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - fi - ]) - -# Search path for a program which passes the given test. -# Ulrich Drepper <drepper@cygnus.com>, 1996. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# Check whether LC_MESSAGES is available in <locale.h>. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -AC_DEFUN(AM_LC_MESSAGES, - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your locale.h file contains LC_MESSAGES.]) - fi - fi]) - dnl AM_PROG_LEX dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT diff --git a/contrib/binutils/ld/configdoc.texi b/contrib/binutils/ld/configdoc.texi index 3a36727..8d1acad 100644 --- a/contrib/binutils/ld/configdoc.texi +++ b/contrib/binutils/ld/configdoc.texi @@ -5,6 +5,7 @@ @c 2. Specific target machines @set H8300 @set I960 +@set TICOFF @c 3. Properties of this configuration @clear SingleFormat diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure index 92d00d6..ee0e296 100755 --- a/contrib/binutils/ld/configure +++ b/contrib/binutils/ld/configure @@ -22,10 +22,14 @@ ac_help="$ac_help ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help --enable-targets alternative target configurations" ac_help="$ac_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" ac_help="$ac_help + --enable-build-warnings Enable build-time compiler warnings if gcc is used" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -49,6 +53,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -163,6 +168,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -333,6 +339,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -498,12 +509,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -541,6 +556,68 @@ else ac_n= ac_c='\c' ac_t= fi +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:561: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 566 "configure" +#include "confdefs.h" + +int main() { + +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__; +; return 0; } +EOF +if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:594: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 599 "configure" +#include "confdefs.h" + +int main() { +return __MINGW32__; +; return 0; } +EOF +if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes ac_aux_dir= @@ -590,7 +667,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:594: checking host system type" >&5 +echo "configure:671: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -611,7 +688,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:615: checking target system type" >&5 +echo "configure:692: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -629,7 +706,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:633: checking build system type" >&5 +echo "configure:710: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -651,6 +728,249 @@ test "$host_alias" != "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:735: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:765: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:816: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 859 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:895: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:923: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:955: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -664,7 +984,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:668: checking for a BSD compatible install" >&5 +echo "configure:988: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -717,7 +1037,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:721: checking whether build environment is sane" >&5 +echo "configure:1041: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -774,7 +1094,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1098: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -803,7 +1123,7 @@ fi PACKAGE=ld -VERSION=2.10.1 +VERSION=2.11 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -820,7 +1140,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:824: checking for working aclocal" >&5 +echo "configure:1144: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -833,7 +1153,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:837: checking for working autoconf" >&5 +echo "configure:1157: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -846,7 +1166,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:850: checking for working automake" >&5 +echo "configure:1170: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -859,7 +1179,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:863: checking for working autoheader" >&5 +echo "configure:1183: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -872,7 +1192,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:876: checking for working makeinfo" >&5 +echo "configure:1196: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -955,258 +1275,6 @@ else enable_fast_install=yes fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:962: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:992: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1022: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1073: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1116 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1147: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1152: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1180: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1219,8 +1287,14 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1223: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` +echo "configure:1291: checking for ld used by GCC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) @@ -1243,10 +1317,10 @@ echo "configure:1223: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1247: checking for GNU ld" >&5 +echo "configure:1321: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1250: checking for non-GNU ld" >&5 +echo "configure:1324: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1281,7 +1355,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1285: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1359: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1294,10 +1368,23 @@ fi fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +with_gnu_ld=$ac_cv_prog_gnu_ld +echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +echo "configure:1376: checking for $LD option to reload object files" >&5 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi + +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +reload_flag=$lt_cv_ld_reload_flag +test -n "$reload_flag" && reload_flag=" $reload_flag" + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1301: checking for BSD-compatible nm" >&5 +echo "configure:1388: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1308,18 +1395,20 @@ else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" + # Tru64's nm complains that /dev/null is an invalid object file + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + ac_cv_path_NM="$tmp_nm -B" break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" break else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi @@ -1333,7 +1422,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1337: checking whether ln -s works" >&5 +echo "configure:1426: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1353,11 +1442,483 @@ else echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +echo "configure:1447: checking how to recognise dependant libraries" >&5 +if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case "$host_os" in +aix4*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* |pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +freebsd* ) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case "$host_cpu" in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*) + # TODO: Does this work for hpux-11 too? + lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case "$host_os" in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case "$host_cpu" in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : + else + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case "$host_vendor" in + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; +esac + +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method + +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:1590: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1616: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# Only perform the check for file, if the check method requires it +case "$deplibs_check_method" in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +echo "configure:1659: checking for ${ac_tool_prefix}file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +echo "configure:1721: checking for file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&2 -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1792: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_RANLIB"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1824: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + RANLIB=":" +fi +fi + +# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1859: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_STRIP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1891: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + STRIP=":" +fi +fi + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" @@ -1377,13 +1938,24 @@ fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" + # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$lt_target" in +case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1386 "configure"' > conftest.$ac_ext - if { (eval echo configure:1387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1958 "configure"' > conftest.$ac_ext + if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1404,19 +1976,27 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1408: checking whether the C compiler needs -belf" >&5 +echo "configure:1980: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 1413 "configure" + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <<EOF +#line 1993 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1426,6 +2006,13 @@ else lt_cv_cc_needs_belf=no fi rm -f conftest* + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 @@ -1489,12 +2076,14 @@ rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1508,7 +2097,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1518,6 +2107,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log + + + + + + # Check whether --enable-targets or --disable-targets was given. if test "${enable_targets+set}" = set; then enableval="$enable_targets" @@ -1540,6 +2135,29 @@ else want64=false fi +build_warnings="-W -Wall" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi + + @@ -1556,7 +2174,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1560: checking for $ac_word" >&5 +echo "configure:2178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1586,7 +2204,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1590: checking for $ac_word" >&5 +echo "configure:2208: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1637,7 +2255,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1641: checking for $ac_word" >&5 +echo "configure:2259: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1669,7 +2287,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2291: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1680,12 +2298,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1684 "configure" +#line 2302 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1711,12 +2329,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2333: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1720: checking whether we are using GNU C" >&5 +echo "configure:2338: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1725,7 +2343,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1744,7 +2362,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1748: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2366: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1787,7 +2405,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1791: checking for a BSD compatible install" >&5 +echo "configure:2409: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1842,7 +2460,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1846: checking how to run the C preprocessor" >&5 +echo "configure:2464: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1857,13 +2475,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1861 "configure" +#line 2479 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1874,13 +2492,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1878 "configure" +#line 2496 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1891,13 +2509,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1895 "configure" +#line 2513 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1921,34 +2539,43 @@ else fi echo "$ac_t""$CPP" 1>&6 -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1926: checking for POSIXized ISC" >&5 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2546: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 - ISC= fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1947: checking for ANSI C header files" >&5 +echo "configure:2574: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1952 "configure" +#line 2579 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1956,7 +2583,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1973,7 +2600,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1977 "configure" +#line 2604 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1991,7 +2618,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1995 "configure" +#line 2622 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2012,7 +2639,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2016 "configure" +#line 2643 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2023,7 +2650,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2047,18 +2674,18 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2051: checking for working const" >&5 +echo "configure:2678: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2056 "configure" +#line 2683 "configure" #include "confdefs.h" int main() { /* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x = {0,0}; +typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; @@ -2101,7 +2728,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2122,21 +2749,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2126: checking for inline" >&5 +echo "configure:2753: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2133 "configure" +#line 2760 "configure" #include "confdefs.h" int main() { -} int $ac_kw foo() { +} $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2162,12 +2789,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2166: checking for off_t" >&5 +echo "configure:2793: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2171 "configure" +#line 2798 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2195,12 +2822,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2199: checking for size_t" >&5 +echo "configure:2826: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2204 "configure" +#line 2831 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2230,19 +2857,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2234: checking for working alloca.h" >&5 +echo "configure:2861: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2239 "configure" +#line 2866 "configure" #include "confdefs.h" #include <alloca.h> int main() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2263,12 +2890,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2267: checking for alloca" >&5 +echo "configure:2894: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2272 "configure" +#line 2899 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2296,7 +2923,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2328,12 +2955,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2332: checking whether alloca needs Cray hooks" >&5 +echo "configure:2959: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2337 "configure" +#line 2964 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2358,12 +2985,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2362: checking for $ac_func" >&5 +echo "configure:2989: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2367 "configure" +#line 2994 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2386,7 +3013,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2413,7 +3040,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2417: checking stack direction for C alloca" >&5 +echo "configure:3044: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2421,7 +3048,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2425 "configure" +#line 3052 "configure" #include "confdefs.h" find_stack_direction () { @@ -2440,7 +3067,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2465,17 +3092,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2469: checking for $ac_hdr" >&5 +echo "configure:3096: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2474 "configure" +#line 3101 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2504,12 +3131,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2508: checking for $ac_func" >&5 +echo "configure:3135: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2513 "configure" +#line 3140 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2532,7 +3159,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2557,7 +3184,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2561: checking for working mmap" >&5 +echo "configure:3188: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2565,7 +3192,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2569 "configure" +#line 3196 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -2592,15 +3219,12 @@ else #include <sys/types.h> #include <fcntl.h> #include <sys/mman.h> -#include <stdlib.h> -#include <sys/stat.h> - -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include <unistd.h> +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -2655,7 +3279,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -2676,7 +3300,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -2694,7 +3318,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -2708,7 +3332,7 @@ main() } EOF -if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2736,17 +3360,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2740: checking for $ac_hdr" >&5 +echo "configure:3364: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2745 "configure" +#line 3369 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2776,12 +3400,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2780: checking for $ac_func" >&5 +echo "configure:3404: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2785 "configure" +#line 3409 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2804,7 +3428,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2833,12 +3457,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2837: checking for $ac_func" >&5 +echo "configure:3461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2842 "configure" +#line 3466 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2861,7 +3485,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2895,19 +3519,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2899: checking for LC_MESSAGES" >&5 +echo "configure:3523: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2904 "configure" +#line 3528 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2928,7 +3552,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2932: checking whether NLS is requested" >&5 +echo "configure:3556: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -2948,7 +3572,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2952: checking whether included gettext is requested" >&5 +echo "configure:3576: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -2967,17 +3591,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2971: checking for libintl.h" >&5 +echo "configure:3595: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2976 "configure" +#line 3600 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2994,19 +3618,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:2998: checking for gettext in libc" >&5 +echo "configure:3622: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3003 "configure" +#line 3627 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3022,7 +3646,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3026: checking for bindtextdomain in -lintl" >&5 +echo "configure:3650: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3030,7 +3654,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3034 "configure" +#line 3658 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3041,7 +3665,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3057,19 +3681,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3061: checking for gettext in libintl" >&5 +echo "configure:3685: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3066 "configure" +#line 3690 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3097,7 +3721,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3101: checking for $ac_word" >&5 +echo "configure:3725: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3131,12 +3755,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3135: checking for $ac_func" >&5 +echo "configure:3759: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3140 "configure" +#line 3764 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3159,7 +3783,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3186,7 +3810,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3190: checking for $ac_word" >&5 +echo "configure:3814: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3222,7 +3846,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3226: checking for $ac_word" >&5 +echo "configure:3850: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3254,7 +3878,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3258 "configure" +#line 3882 "configure" #include "confdefs.h" int main() { @@ -3262,7 +3886,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3294,7 +3918,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3298: checking for $ac_word" >&5 +echo "configure:3922: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3328,7 +3952,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3332: checking for $ac_word" >&5 +echo "configure:3956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3364,7 +3988,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3368: checking for $ac_word" >&5 +echo "configure:3992: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3454,7 +4078,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3458: checking for catalogs to be installed" >&5 +echo "configure:4082: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3482,17 +4106,17 @@ echo "configure:3458: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:3486: checking for linux/version.h" >&5 +echo "configure:4110: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3491 "configure" +#line 4115 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3554,72 +4178,10 @@ fi fi -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3559: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3564 "configure" -#include "confdefs.h" - -int main() { - -#ifndef __CYGWIN__ -#define __CYGWIN__ __CYGWIN32__ -#endif -return __CYGWIN__; -; return 0; } -EOF -if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:3592: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3597 "configure" -#include "confdefs.h" - -int main() { -return __MINGW32__; -; return 0; } -EOF -if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3623: checking for executable suffix" >&5 +echo "configure:4185: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3629,10 +4191,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -3655,7 +4217,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3659: checking for $ac_word" >&5 +echo "configure:4221: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3691,7 +4253,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3695: checking for $ac_word" >&5 +echo "configure:4257: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3724,7 +4286,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3728: checking for $ac_word" >&5 +echo "configure:4290: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3758,7 +4320,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3762: checking for yywrap in -l$ac_lib" >&5 +echo "configure:4324: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3766,7 +4328,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 3770 "configure" +#line 4332 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3777,7 +4339,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3800,7 +4362,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3804: checking lex output file root" >&5 +echo "configure:4366: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3821,7 +4383,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3825: checking whether yytext is a pointer" >&5 +echo "configure:4387: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3833,14 +4395,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 3837 "configure" +#line 4399 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -3863,7 +4425,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:3867: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4429: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -3897,17 +4459,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3901: checking for $ac_hdr" >&5 +echo "configure:4463: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3906 "configure" +#line 4468 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3936,12 +4498,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3940: checking for $ac_func" >&5 +echo "configure:4502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3945 "configure" +#line 4507 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3964,7 +4526,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3993,12 +4555,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3997: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4559: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4002 "configure" +#line 4564 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4006,7 +4568,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4031,7 +4593,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4035: checking for opendir in -ldir" >&5 +echo "configure:4597: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4039,7 +4601,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4043 "configure" +#line 4605 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4050,7 +4612,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4072,7 +4634,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4076: checking for opendir in -lx" >&5 +echo "configure:4638: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4080,7 +4642,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4084 "configure" +#line 4646 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4091,7 +4653,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4124,12 +4686,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4128: checking whether strstr must be declared" >&5 +echo "configure:4690: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4133 "configure" +#line 4695 "configure" #include "confdefs.h" #include <stdio.h> @@ -4150,7 +4712,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4171,12 +4733,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4175: checking whether free must be declared" >&5 +echo "configure:4737: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4180 "configure" +#line 4742 "configure" #include "confdefs.h" #include <stdio.h> @@ -4197,7 +4759,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4218,12 +4780,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:4222: checking whether sbrk must be declared" >&5 +echo "configure:4784: checking whether sbrk must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4227 "configure" +#line 4789 "configure" #include "confdefs.h" #include <stdio.h> @@ -4244,7 +4806,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -4265,12 +4827,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4269: checking whether getenv must be declared" >&5 +echo "configure:4831: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4274 "configure" +#line 4836 "configure" #include "confdefs.h" #include <stdio.h> @@ -4291,7 +4853,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4312,12 +4874,12 @@ EOF fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:4316: checking whether environ must be declared" >&5 +echo "configure:4878: checking whether environ must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4321 "configure" +#line 4883 "configure" #include "confdefs.h" #include <stdio.h> @@ -4338,7 +4900,7 @@ int main() { char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:4342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -4366,19 +4928,19 @@ fi # constants, while still supporting pre-ANSI compilers which do not # support string concatenation. echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6 -echo "configure:4370: checking whether ANSI C string concatenation works" >&5 +echo "configure:4932: checking whether ANSI C string concatenation works" >&5 if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4375 "configure" +#line 4937 "configure" #include "confdefs.h" int main() { char *a = "a" "a"; ; return 0; } EOF -if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ld_cv_string_concatenation=yes else @@ -4652,6 +5214,7 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -4663,10 +5226,13 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@RANLIB@%$RANLIB%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g +s%@OBJEXT@%$OBJEXT%g +s%@EXEEXT@%$EXEEXT%g +s%@RANLIB@%$RANLIB%g +s%@STRIP@%$STRIP%g s%@LIBTOOL@%$LIBTOOL%g +s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@CPP@%$CPP%g s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g @@ -4689,7 +5255,6 @@ s%@GT_NO@%$GT_NO%g s%@GT_YES@%$GT_YES%g s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g s%@l@%$l%g -s%@EXEEXT@%$EXEEXT%g s%@YACC@%$YACC%g s%@LEX@%$LEX%g s%@LEXLIB@%$LEXLIB%g diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host index 38ad347..7917e36 100644 --- a/contrib/binutils/ld/configure.host +++ b/contrib/binutils/ld/configure.host @@ -30,31 +30,12 @@ alpha*-*-netbsd*) HOSTING_CRT0=/usr/lib/crt0.o ;; -alpha*-*-*) - HOSTING_CRT0=/usr/ccs/lib/crt0.o - NATIVE_LIB_DIRS=/usr/ccs/lib - ;; - arm*-*-linux-gnu*) HOSTING_CRT0='-p -dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' ;; -i[3456]86-*-freebsdelf*) - # The new BSD `make' has a bug: it doesn't pass empty arguments in - # shell commands. So we need to make this value non-empty in order - # for the genscripts.sh call to work. There's nothing magic about - # the value `/lib'; it's just a dummy. - NATIVE_LIB_DIRS=/lib - # Older versions of gcc do not use a specs file. In those cases, - # gcc -print-file-name=specs will simply print specs. We create a - # dummy specs files to handle this. - echo "-dynamic-linker /usr/libexec/ld-elf.so.1" > specs - HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' - ;; - -i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*) +i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*) # The new BSD `make' has a bug: it doesn't pass empty arguments in # shell commands. So we need to make this value non-empty in order # for the genscripts.sh call to work. There's nothing magic about @@ -125,6 +106,15 @@ i[3456]86-pc-interix*) HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a' ;; +i[3456]86-*-cygwin*) + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`' + ;; + +ia64-*-linux-gnu*) + HOSTING_CRT0='-dynamic-linker `egrep "ld-linux-ia64.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux-ia64.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + ;; + mips*-dec-bsd*) HOSTING_CRT0=/usr/lib/crt0.o ;; @@ -193,10 +183,6 @@ powerpc*-*-linux-gnu*) HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' ;; -romp-*-*) - HDEFINES=-DNO_VARARGS - ;; - sparc*-*-solaris2*) HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' @@ -213,4 +199,27 @@ sparc64-*-linux-gnu*) HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' ;; +# +# Generic configurations: +# + +*-*-freebsd*) + NATIVE_LIB_DIRS=/usr/lib + # Older versions of gcc do not use a specs file. In those cases, + # gcc -print-file-name=specs will simply print specs. We create a + # dummy specs files to handle this. + echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs + HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`' + HOSTING_LIBS='`${CC} -print-libgcc-file-name` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `${CC} -print-libgcc-file-name` `${CC} --print-file-name=crtend.o` `${CC} --print-file-name=crtn.o`' + ;; + +alpha*-*-*) + HOSTING_CRT0=/usr/ccs/lib/crt0.o + NATIVE_LIB_DIRS=/usr/ccs/lib + ;; + +romp-*-*) + HDEFINES=-DNO_VARARGS + ;; + esac diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in index d4b67ac..06831d2 100644 --- a/contrib/binutils/ld/configure.in +++ b/contrib/binutils/ld/configure.in @@ -4,8 +4,9 @@ AC_PREREG(2.13) AC_INIT(ldmain.c) AC_CANONICAL_SYSTEM +AC_ISC_POSIX -AM_INIT_AUTOMAKE(ld, 2.10.1) +AM_INIT_AUTOMAKE(ld, 2.11) AM_PROG_LIBTOOL @@ -25,6 +26,27 @@ AC_ARG_ENABLE(64-bit-bfd, *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; esac],[want64=false])dnl +build_warnings="-W -Wall" +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi])dnl +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi +AC_SUBST(WARN_CFLAGS) + AM_CONFIG_HEADER(config.h:config.in) if test -z "$target" ; then diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt index c22eee7..e274cad 100644 --- a/contrib/binutils/ld/configure.tgt +++ b/contrib/binutils/ld/configure.tgt @@ -23,6 +23,12 @@ arm-*-pe) targ_emul=armpe ; arc-*-elf*) targ_emul=arcelf ;; avr-*-*) targ_emul=avr85xx targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;; +cris-*-*aout*) targ_emul=crisaout + targ_extra_emuls="criself crislinux" + targ_extra_libpath=$targ_extra_emuls ;; +cris-*-*) targ_emul=criself + targ_extra_emuls="crisaout crislinux" + targ_extra_libpath=$targ_extra_emuls ;; d10v-*-*) targ_emul=d10velf ;; d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;; d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;; @@ -37,6 +43,12 @@ sparc*-*-aout) targ_emul=sparcaout ;; sparc*-*-coff) targ_emul=coff_sparc ;; sparc*-*-elf) targ_emul=elf32_sparc ;; sparc*-*-sysv4*) targ_emul=elf32_sparc ;; +sparc64-*-freebsd* | sparcv9-*-freebsd*) + targ_emul=elf64_sparc + targ_extra_emuls="elf32_sparc" + targ_extra_libpath=$targ_extra_emuls + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` + ;; sparc*-*-linux*aout*) targ_emul=sparclinux targ_extra_emuls="elf32_sparc sun4" tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'` @@ -73,19 +85,26 @@ sparcv9-*-solaris2* | sparc64-*-solaris2*) ;; sparc*-*-solaris2*) targ_emul=elf32_sparc ;; sparc*-wrs-vxworks*) targ_emul=sparcaout ;; -sparc*-*-rtemsaout*) targ_emul=sparcaout ;; -sparc*-*-rtemself*) targ_emul=elf32_sparc ;; -sparc*-*-rtems*) targ_emul=elf32_sparc ;; +sparc*-*-rtemsaout*) targ_emul=sparcaout ;; +sparc*-*-rtemself*) targ_emul=elf32_sparc ;; +sparc*-*-rtems*) targ_emul=elf32_sparc ;; +i860-stardent-sysv4* | i860-stardent-elf*) + targ_emul=elf32_i860 ;; i960-wrs-vxworks5.0*) targ_emul=gld960 ;; i960-wrs-vxworks5*) targ_emul=gld960coff ;; i960-wrs-vxworks*) targ_emul=gld960 ;; i960-*-coff) targ_emul=gld960coff ;; i960-intel-nindy) targ_emul=gld960 ;; -i960-*-rtemscoff*) targ_emul=gld960coff ;; -i960-*-rtemself*) targ_emul=elf32_i960 ;; i960-*-rtems*) targ_emul=gld960coff ;; i960-*-elf*) targ_emul=elf32_i960 ;; +ia64-*-elf*) targ_emul=elf64_ia64 ;; +ia64-*-freebsd*) targ_emul=elf64_ia64 ;; +ia64-*-linux*) targ_emul=elf64_ia64 ;; m32r-*-*) targ_emul=m32relf ;; +m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf + targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;; +m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf + targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;; m68*-sun-sunos[34]*) targ_emul=sun3 ;; m68*-wrs-vxworks*) targ_emul=sun3 ;; m68*-ericsson-ose) targ_emul=sun3 ;; @@ -102,9 +121,8 @@ i[3456]86-*-sco*) targ_emul=i386coff ;; i[3456]86-*-isc*) targ_emul=i386coff ;; i[3456]86-*-lynxos*) targ_emul=i386lynx ;; i[3456]86-*-coff) targ_emul=i386coff ;; -i[3456]86-*-rtemscoff*) targ_emul=i386coff ;; i[3456]86-*-rtemself*) targ_emul=elf_i386 ;; -i[3456]86-*-rtems*) targ_emul=elf_i386 ;; +i[3456]86-*-rtems*) targ_emul=i386coff ;; i[3456]86-*-bsd) targ_emul=i386bsd ;; i[3456]86-*-bsd386) targ_emul=i386bsd ;; i[3456]86-*-bsdi*) targ_emul=i386bsd ;; @@ -118,6 +136,10 @@ i[3456]86-*-linux-gnu*) targ_emul=elf_i386 targ_extra_emuls=i386linux tdir_i386linux=${targ_alias}aout ;; +x86_64-*-linux-gnu*) targ_emul=elf_x86_64 + targ_extra_emuls="elf_i386 i386linux" + tdir_i386linux=${targ_alias}aout + ;; i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;; i[3456]86-*-solaris2*) targ_emul=elf_i386 ;; i[3456]86-*-unixware) targ_emul=elf_i386 ;; @@ -128,6 +150,10 @@ i[3456]86-*-elf*) targ_emul=elf_i386 ;; i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12]) targ_emul=i386bsd ;; i[3456]86-*-freebsd*) targ_emul=elf_i386 ;; +x86_64-*-freebsd*) targ_emul=elf_x86_64 + targ_extra_emuls=elf_i386 + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` + ;; i[3456]86-*-sysv*) targ_emul=i386coff ;; i[3456]86-*-ptx*) targ_emul=i386coff ;; i[3456]86-*-mach*) targ_emul=i386mach ;; @@ -147,6 +173,7 @@ i[3456]86-*-interix*) targ_emul=i386pe_posix; i[3456]86-*-beospe*) targ_emul=i386beos ;; i[3456]86-*-beos*) targ_emul=elf_i386_be ;; i[3456]86-*-vxworks*) targ_emul=i386aout ;; +i[3456]86-*-chaos) targ_emul=elf_i386_chaos ;; m8*-*-*) targ_emul=m88kbcs ;; a29k-*-udi) targ_emul=sa29200 ;; a29k-*-ebmon) targ_emul=ebmon29k ;; @@ -155,10 +182,12 @@ a29k-*-*) targ_emul=a29k ;; arm-*-aout | armel-*-aout) targ_emul=armaoutl ;; armeb-*-aout) targ_emul=armaoutb ;; arm-*-coff) targ_emul=armcoff ;; +arm-*-freebsd*) targ_emul=armelf ;; arm-*-netbsd*) targ_emul=armnbsd ;; +arm-*-rtems*) targ_emul=armelf ;; arm-*-elf) targ_emul=armelf ;; arm-*-oabi) targ_emul=armelf_oabi ;; -arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;; +arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; arm*-*-conix*) targ_emul=armelf ;; thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; @@ -171,21 +200,26 @@ thumb-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; thumb-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; -h8300-*-hms* | h8300-*-coff*) +xscale-*-coff) targ_emul=armcoff ;; +xscale-*-elf) targ_emul=armelf ;; +h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*) targ_emul=h8300; targ_extra_emuls="h8300h h8300s" ;; h8500-*-hms* | h8500-*-coff*) targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" ;; +sh-*-linux*) + targ_emul=shelf_linux + targ_extra_emuls=shlelf_linux + ;; sh-*-elf* | sh-*-rtemself*) targ_emul=shelf targ_extra_emuls="shlelf sh shl" ;; sh-*-pe) targ_emul=shpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; -sh-*-rtemscoff* | sh-*-* | sh-*-rtems*) - targ_emul=sh; targ_extra_emuls=shl ;; +sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;; m68k-sony-*) targ_emul=news ;; m68k-hp-bsd*) targ_emul=hp300bsd ;; m68*-motorola-sysv*) targ_emul=delta68 ;; @@ -206,12 +240,10 @@ m68*-*-lynxos*) targ_emul=m68klynx ;; m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;; m68*-*-netbsd*) targ_emul=m68knbsd ;; m68*-*-psos*) targ_emul=m68kpsos ;; -m68*-*-rtemscoff*) targ_emul=m68kcoff ;; -m68*-*-rtemself) targ_emul=m68kelf ;; -m68*-*-rtems*) targ_emul=m68kelf ;; -hppa*w*-*) targ_emul=elf64hppa ;; +m68*-*-rtems*) targ_emul=m68kcoff ;; +hppa*64*-*) targ_emul=elf64hppa ;; +hppa*-*-linux-gnu*) targ_emul=hppalinux ;; hppa*-*-*elf*) targ_emul=hppaelf ;; -hppa*-*-linux-gnu*) targ_emul=hppaelf ;; hppa*-*-lites*) targ_emul=hppaelf ;; hppa*-*-rtems*) targ_emul=hppaelf ;; vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;; @@ -248,9 +280,13 @@ mips*-*-linux-gnu*) targ_emul=elf32bsmip targ_extra_emuls="elf32lsmip mipsbig mipslit" ;; mips*-*-lnews*) targ_emul=mipslnews ;; +mips*-*-sysv4*) targ_emul=elf32btsmip ;; mn10200-*-*) targ_emul=mn10200 ;; mn10300-*-*) targ_emul=mn10300 ;; -alpha-*-freebsd*) targ_emul=elf64alpha ;; +alpha*-*-freebsd*) targ_emul=elf64alpha + targ_extra_emuls=alpha + tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` + ;; alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;; @@ -264,16 +300,22 @@ alpha*-*-netbsd*) targ_emul=elf64alpha ;; z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;; ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;; -powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc; +powerpc-*-freebsd*) targ_emul=elf32ppc; + targ_extra_emuls=elf32ppcsim; + targ_extra_libpath=elf32ppc; + tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` + ;; +powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; + targ_extra_emuls="elf32ppc elf32ppcsim"; targ_extra_libpath=elf32ppc ;; pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;; pj*-*-*) targ_emul=pjelf ;; powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \ | powerpc-*-netbsd* | powerpc-*-vxworks*) - targ_emul=elf32ppc ;; + targ_emul=elf32ppc targ_extra_emuls="elf32ppclinux elf32ppcsim";; powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* \ | powerpcle-*-sysv* | powerpcle-*-vxworks*) - targ_emul=elf32lppc ;; + targ_emul=elf32lppc targ_extra_emuls="elf32ppcsim";; powerpcle-*-rtems*) targ_emul=elf32leppc ;; powerpc-*-rtems*) targ_emul=elf32ppc ;; powerpc-*-macos*) targ_emul=ppcmacos ;; @@ -286,6 +328,7 @@ powerpc-*-beos*) targ_emul=aixppc ;; rs6000-*-aix*) targ_emul=aixrs6 ;; tic30-*-*aout*) targ_emul=tic30aout ;; tic30-*-*coff*) targ_emul=tic30coff ;; +tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;; tic80-*-*) targ_emul=tic80coff ;; v850-*-*) targ_emul=v850 ;; v850e-*-*) targ_emul=v850 ;; diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h index e2c710d..be6f486 100644 --- a/contrib/binutils/ld/deffile.h +++ b/contrib/binutils/ld/deffile.h @@ -1,5 +1,5 @@ /* deffile.h - header for .DEF file parser - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Written by DJ Delorie dj@cygnus.com This file is part of GLD, the Gnu Linker. @@ -25,77 +25,66 @@ #include "ansidecl.h" /* DEF storage definitions. Note that any ordinal may be zero, and - any pointer may be NULL, if not defined by the DEF file. */ - -typedef struct def_file_section - { - char *name; /* always set */ - char *class; /* may be NULL */ - char flag_read, flag_write, flag_execute, flag_shared; - } -def_file_section; - -typedef struct def_file_export - { - char *name; /* always set */ - char *internal_name; /* always set, may == name */ - int ordinal; /* -1 if not specified */ - int hint; - char flag_private, flag_constant, flag_noname, flag_data; - } -def_file_export; - -typedef struct def_file_module - { - struct def_file_module *next; - void *user_data; - char name[1]; /* extended via malloc */ - } -def_file_module; - -typedef struct def_file_import - { - char *internal_name; /* always set */ - def_file_module *module; /* always set */ - char *name; /* may be NULL; either this or ordinal will be set */ - int ordinal; /* may be -1 */ - } -def_file_import; - -typedef struct def_file - { - - /* from the NAME or LIBRARY command */ - char *name; - int is_dll; /* -1 if NAME/LIBRARY not given */ - bfd_vma base_address; /* (bfd_vma)(-1) if unspecified */ - - /* from the DESCRIPTION command */ - char *description; - - /* from the STACK/HEAP command, -1 if unspecified */ - int stack_reserve, stack_commit; - int heap_reserve, heap_commit; - - /* from the SECTION/SEGMENT commands */ - int num_section_defs; - def_file_section *section_defs; - - /* from the EXPORTS commands */ - int num_exports; - def_file_export *exports; - - /* used by imports for module names */ - def_file_module *modules; - - /* from the IMPORTS commands */ - int num_imports; - def_file_import *imports; - - /* from the VERSION command, -1 if not specified */ - int version_major, version_minor; - } -def_file; + any pointer may be NULL, if not defined by the DEF file. */ + +typedef struct def_file_section { + char *name; /* always set */ + char *class; /* may be NULL */ + char flag_read, flag_write, flag_execute, flag_shared; +} def_file_section; + +typedef struct def_file_export { + char *name; /* always set */ + char *internal_name; /* always set, may == name */ + int ordinal; /* -1 if not specified */ + int hint; + char flag_private, flag_constant, flag_noname, flag_data; +} def_file_export; + +typedef struct def_file_module { + struct def_file_module *next; + void *user_data; + char name[1]; /* extended via malloc */ +} def_file_module; + +typedef struct def_file_import { + char *internal_name; /* always set */ + def_file_module *module; /* always set */ + char *name; /* may be NULL; either this or ordinal will be set */ + int ordinal; /* may be -1 */ +} def_file_import; + +typedef struct def_file { + /* from the NAME or LIBRARY command */ + char *name; + int is_dll; /* -1 if NAME/LIBRARY not given */ + bfd_vma base_address; /* (bfd_vma)(-1) if unspecified */ + + /* from the DESCRIPTION command */ + char *description; + + /* from the STACK/HEAP command, -1 if unspecified */ + int stack_reserve, stack_commit; + int heap_reserve, heap_commit; + + /* from the SECTION/SEGMENT commands */ + int num_section_defs; + def_file_section *section_defs; + + /* from the EXPORTS commands */ + int num_exports; + def_file_export *exports; + + /* used by imports for module names */ + def_file_module *modules; + + /* from the IMPORTS commands */ + int num_imports; + def_file_import *imports; + + /* from the VERSION command, -1 if not specified */ + int version_major, version_minor; +} def_file; extern def_file *def_file_empty PARAMS ((void)); @@ -121,8 +110,7 @@ extern void def_file_add_directive PARAMS ((def_file * _def, int len)); #ifdef DEF_FILE_PRINT -extern void def_file_print PARAMS ((FILE * _file, - def_file * _def)); +extern void def_file_print PARAMS ((FILE * _file, def_file * _def)); #endif #endif /* DEFFILE_H */ diff --git a/contrib/binutils/ld/dep-in.sed b/contrib/binutils/ld/dep-in.sed index 8c80eb0..89b1201 100644 --- a/contrib/binutils/ld/dep-in.sed +++ b/contrib/binutils/ld/dep-in.sed @@ -4,7 +4,7 @@ s!@INCDIR@!$(INCDIR)!g s!@SRCDIR@/!!g -s!\.\./bfd/hosts/[^ ]*\.h ! !g +s! \.\./bfd/hosts/[^ ]*\.h! !g s/\\\n */ /g diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh index 8c79b64..338b9ce 100644 --- a/contrib/binutils/ld/emulparams/armelf.sh +++ b/contrib/binutils/ld/emulparams/armelf.sh @@ -4,7 +4,8 @@ OUTPUT_FORMAT="elf32-littlearm" BIG_OUTPUT_FORMAT="elf32-bigarm" LITTLE_OUTPUT_FORMAT="elf32-littlearm" TEXT_START_ADDR=0x8000 -TEMPLATE_NAME=armelf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)' OTHER_BSS_SYMBOLS='__bss_start__ = .;' OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;' diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh index a85e8bd..d04d967 100644 --- a/contrib/binutils/ld/emulparams/armelf_linux.sh +++ b/contrib/binutils/ld/emulparams/armelf_linux.sh @@ -4,7 +4,8 @@ OUTPUT_FORMAT="elf32-littlearm" BIG_OUTPUT_FORMAT="elf32-bigarm" LITTLE_OUTPUT_FORMAT="elf32-littlearm" MAXPAGESIZE=0x8000 -TEMPLATE_NAME=armelf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf GENERATE_SHLIB_SCRIPT=yes DATA_START_SYMBOLS='__data_start = . ;'; @@ -12,8 +13,4 @@ OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)' OTHER_BSS_SYMBOLS='__bss_start__ = .;' OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;' -# This needs to be high enough so that we can load ld.so below it, -# yet low enough to stay away from the mmap area at 0x40000000. -# Also, it is small enough so that relocs which are pointing -# at absolute 0 will still be fixed up. -TEXT_START_ADDR=0x02000000 +TEXT_START_ADDR=0x00008000 diff --git a/contrib/binutils/ld/emulparams/elf32lppc.sh b/contrib/binutils/ld/emulparams/elf32lppc.sh index edffc61..bc9125d 100644 --- a/contrib/binutils/ld/emulparams/elf32lppc.sh +++ b/contrib/binutils/ld/emulparams/elf32lppc.sh @@ -1,8 +1,18 @@ TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh GENERATE_SHLIB_SCRIPT=yes -SCRIPT_NAME=elfppc +SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-powerpcle" -TEXT_START_ADDR=0x40000 -MAXPAGESIZE=0x40000 +TEXT_START_ADDR=0x01800000 +MAXPAGESIZE=0x10000 ARCH=powerpc MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/contrib/binutils/ld/emulparams/elf32lppcsim.sh b/contrib/binutils/ld/emulparams/elf32lppcsim.sh new file mode 100644 index 0000000..74959f8 --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf32lppcsim.sh @@ -0,0 +1,18 @@ +TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpcle" +TEXT_START_ADDR=0x10000000 +MAXPAGESIZE=0x10000 +ARCH=powerpc +MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh index 3e3880c..2220810 100644 --- a/contrib/binutils/ld/emulparams/elf32ppc.sh +++ b/contrib/binutils/ld/emulparams/elf32ppc.sh @@ -1,8 +1,18 @@ TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh GENERATE_SHLIB_SCRIPT=yes -SCRIPT_NAME=elfppc +SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-powerpc" TEXT_START_ADDR=0x01800000 MAXPAGESIZE=0x10000 ARCH=powerpc MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh index 9996c7b..7c458a2 100644 --- a/contrib/binutils/ld/emulparams/elf32ppclinux.sh +++ b/contrib/binutils/ld/emulparams/elf32ppclinux.sh @@ -1,8 +1,18 @@ TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh GENERATE_SHLIB_SCRIPT=yes -SCRIPT_NAME=elfppc +SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-powerpc" TEXT_START_ADDR=0x10000000 MAXPAGESIZE=0x10000 ARCH=powerpc MACHINE= +BSS_PLT= +OTHER_RELOCATING_SECTIONS=' + /DISCARD/ : { *(.fixup) } +' +OTHER_READWRITE_SECTIONS=' + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/contrib/binutils/ld/emulparams/elf32ppcsim.sh b/contrib/binutils/ld/emulparams/elf32ppcsim.sh new file mode 100644 index 0000000..e25a170 --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf32ppcsim.sh @@ -0,0 +1,18 @@ +TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +TEXT_START_ADDR=0x10000000 +MAXPAGESIZE=0x10000 +ARCH=powerpc +MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh index 2ab2e4f..b0a58ea 100644 --- a/contrib/binutils/ld/emulparams/elf64_sparc.sh +++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh @@ -2,15 +2,24 @@ SCRIPT_NAME=elf ELFSIZE=64 TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-sparc" -TEXT_START_ADDR=0x100000 MAXPAGESIZE=0x100000 -NONPAGED_TEXT_START_ADDR=0x100000 ARCH="sparc:v9" MACHINE= DATA_PLT= GENERATE_SHLIB_SCRIPT=yes NOP=0x01000000 +case "$target" in + sparc*-solaris*) + TEXT_START_ADDR=0x100000000 + NONPAGED_TEXT_START_ADDR=0x100000000 + ;; + *) + TEXT_START_ADDR=0x100000 + NONPAGED_TEXT_START_ADDR=0x100000 + ;; +esac + if [ "x${host}" = "x${target}" ]; then case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) @@ -31,7 +40,7 @@ if [ "x${host}" = "x${target}" ]; then LIB_PATH=/lib${suffix}:/lib LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib if [ -n "${NATIVE_LIB_DIRS}" ]; then - LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s/:/${suffix}:/g`${suffix}:${NATIVE_LIB_DIRS} + LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS} fi if [ "${libdir}" != /usr/lib ]; then LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir} diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh index afa21f2..5c69816 100644 --- a/contrib/binutils/ld/emulparams/elf64alpha.sh +++ b/contrib/binutils/ld/emulparams/elf64alpha.sh @@ -1,10 +1,10 @@ -ENTRY=__start +ENTRY=_start SCRIPT_NAME=elf ELFSIZE=64 TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-alpha" TEXT_START_ADDR="0x120000000" -MAXPAGESIZE=0x100000 +MAXPAGESIZE=0x10000 NONPAGED_TEXT_START_ADDR="0x120000000" ARCH=alpha MACHINE= @@ -13,3 +13,54 @@ DATA_PLT= NOP=0x47ff041f OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' + +# This code gets inserted into the generic elf32.sc linker script +# and allows us to define our own command line switches. +PARSE_AND_LIST_PROLOGUE=' +#define OPTION_TASO 300 +/* Set the start address as in the Tru64 ld */ +#define ALPHA_TEXT_START_32BIT 0x12000000 + +static int elf64alpha_32bit = 0; + +struct ld_emulation_xfer_struct ld_elf64alpha_emulation; +static void gld_elf64alpha_finish (); +' + +PARSE_AND_LIST_LONGOPTS=' + {"taso", no_argument, NULL, OPTION_TASO}, +' + +PARSE_AND_LIST_OPTIONS=' + fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n")); + fprintf (file, _("\t\t\t virtual address range\n")); +' + +PARSE_AND_LIST_ARGS_CASES=' + case EOF: + if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable) + { + lang_section_start (".interp", + exp_binop ('\''+'\'', + exp_intop (ALPHA_TEXT_START_32BIT), + exp_nameop (SIZEOF_HEADERS, NULL))); + ld_elf64alpha_emulation.finish = gld_elf64alpha_finish; + } + return 0; + + case OPTION_TASO: + elf64alpha_32bit = 1; + break; +' + +PARSE_AND_LIST_EPILOGUE=' +#include "elf/internal.h" +#include "elf/alpha.h" +#include "elf-bfd.h" + +static void +gld_elf64alpha_finish() +{ + elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT; +} +' diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh new file mode 100644 index 0000000..32e7719 --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +TEXT_START_ADDR=0x40000000 +MAXPAGESIZE=0x1000 +NONPAGED_TEXT_START_ADDR=0x40000000 +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em index d73b3d1..936da13 100644 --- a/contrib/binutils/ld/emultempl/armcoff.em +++ b/contrib/binutils/ld/emultempl/armcoff.em @@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -32,12 +33,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em index 9abf7f1..3c82bce 100644 --- a/contrib/binutils/ld/emultempl/armelf.em +++ b/contrib/binutils/ld/emultempl/armelf.em @@ -1,137 +1,32 @@ # This shell script emits a C file. -*- C -*- -# It does some substitutions. -ELFSIZE=32 -cat >e${EMULATION_NAME}.c <<EOF -/* This file is is generated by a shell script. DO NOT EDIT! */ - -/* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc. - Written by Steve Chamberlain steve@cygnus.com - -This file is part of GLD, the Gnu Linker. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TARGET_IS_${EMULATION_NAME} - -#include "bfd.h" -#include "sysdep.h" - -#include <ctype.h> - -#include "bfdlink.h" -#include "getopt.h" - -#include "ld.h" -#include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" -#include "ldmisc.h" - -#include "ldexp.h" -#include "ldlang.h" -#include "ldgram.h" - -static boolean gld${EMULATION_NAME}_open_dynamic_archive - PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); -static void gld${EMULATION_NAME}_after_open PARAMS ((void)); -static void gld${EMULATION_NAME}_check_needed - PARAMS ((lang_input_statement_type *)); -static void gld${EMULATION_NAME}_stat_needed - PARAMS ((lang_input_statement_type *)); -static boolean gld${EMULATION_NAME}_search_needed - PARAMS ((const char *, const char *, int)); -static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int)); -static void gld${EMULATION_NAME}_vercheck - PARAMS ((lang_input_statement_type *)); -static void gld${EMULATION_NAME}_find_statement_assignment - PARAMS ((lang_statement_union_type *)); -static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *)); -static boolean gld${EMULATION_NAME}_place_orphan - PARAMS ((lang_input_statement_type *, asection *)); -static void gld${EMULATION_NAME}_place_section - PARAMS ((lang_statement_union_type *)); -static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); -static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); -static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); -static int gld${EMULATION_NAME}_parse_args PARAMS((int, char **)); -static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *)); -static void gld${EMULATION_NAME}_finish PARAMS ((void)); +# Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 +# Free Software Foundation, Inc. +# +# This file is part of GLD, the Gnu Linker. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# This file is sourced from elf32.em, and defines extra arm-elf +# specific routines. +# +cat >>e${EMULATION_NAME}.c <<EOF - static int no_pipeline_knowledge = 0; -static char * thumb_entry_symbol = NULL; - -#define OPTION_THUMB_ENTRY 301 +static char *thumb_entry_symbol = NULL; -static struct option longopts[] = -{ - { "no-pipeline-knowledge", no_argument, NULL, 'p'}, - { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY}, - { NULL, no_argument, NULL, 0 } -}; - -static void -gld${EMULATION_NAME}_list_options (file) - FILE * file; -{ - fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n")); - fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n")); -} - -static int -gld${EMULATION_NAME}_parse_args (argc, argv) - int argc; - char ** argv; -{ - int longind; - int optc; - int prevoptind = optind; - int prevopterr = opterr; - int wanterror; - static int lastoptind = -1; - - if (lastoptind != optind) - opterr = 0; - - wanterror = opterr; - lastoptind = optind; - - optc = getopt_long_only (argc, argv, "-p", longopts, & longind); - opterr = prevopterr; - - switch (optc) - { - default: - if (wanterror) - xexit (1); - optind = prevoptind; - return 0; - - case 'p': - no_pipeline_knowledge = 1; - break; - - case OPTION_THUMB_ENTRY: - thumb_entry_symbol = optarg; - break; - } - - return 1; -} - static void gld${EMULATION_NAME}_before_parse () @@ -143,174 +38,12 @@ gld${EMULATION_NAME}_before_parse () config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; } -/* Try to open a dynamic archive. This is where we know that ELF - dynamic libraries have an extension of .so. */ -static boolean -gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) - const char *arch; - search_dirs_type *search; - lang_input_statement_type *entry; -{ - const char *filename; - char *string; - - if (! entry->is_archive) - return false; - - filename = entry->filename; - - string = (char *) xmalloc (strlen (search->name) - + strlen (filename) - + strlen (arch) - + sizeof "/lib.so"); - - sprintf (string, "%s/lib%s%s.so", search->name, filename, arch); - - if (! ldfile_try_open_bfd (string, entry)) - { - free (string); - return false; - } - - entry->filename = string; - - /* We have found a dynamic object to include in the link. The ELF - backend linker will create a DT_NEEDED entry in the .dynamic - section naming this file. If this file includes a DT_SONAME - entry, it will be used. Otherwise, the ELF linker will just use - the name of the file. For an archive found by searching, like - this one, the DT_NEEDED entry should consist of just the name of - the file, without the path information used to find it. Note - that we only need to do this if we have a dynamic object; an - archive will never be referenced by a DT_NEEDED entry. - - FIXME: This approach--using bfd_elf_set_dt_needed_name--is not - very pretty. I haven't been able to think of anything that is - pretty, though. */ - if (bfd_check_format (entry->the_bfd, bfd_object) - && (entry->the_bfd->flags & DYNAMIC) != 0) - { - char *needed_name; - - ASSERT (entry->is_archive && entry->search_dirs_flag); - needed_name = (char *) xmalloc (strlen (filename) - + strlen (arch) - + sizeof "lib.so"); - sprintf (needed_name, "lib%s%s.so", filename, arch); - bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); - } - - return true; -} - -EOF -if [ "x${host}" = "x${target}" ] ; then - case " ${EMULATION_LIBPATH} " in - *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF - -/* For a native linker, check the file /etc/ld.so.conf for directories - in which we may find shared libraries. /etc/ld.so.conf is really - only meaningful on Linux, but we check it on other systems anyhow. */ - -static boolean gld${EMULATION_NAME}_check_ld_so_conf - PARAMS ((const char *, int)); - -static boolean -gld${EMULATION_NAME}_check_ld_so_conf (name, force) - const char *name; - int force; -{ - static boolean initialized; - static char *ld_so_conf; - - if (! initialized) - { - FILE *f; - - f = fopen ("/etc/ld.so.conf", FOPEN_RT); - if (f != NULL) - { - char *b; - size_t len, alloc; - int c; - - len = 0; - alloc = 100; - b = (char *) xmalloc (alloc); - - while ((c = getc (f)) != EOF) - { - if (len + 1 >= alloc) - { - alloc *= 2; - b = (char *) xrealloc (b, alloc); - } - if (c != ':' - && c != ' ' - && c != '\t' - && c != '\n' - && c != ',') - { - b[len] = c; - ++len; - } - else - { - if (len > 0 && b[len - 1] != ':') - { - b[len] = ':'; - ++len; - } - } - } - - if (len > 0 && b[len - 1] == ':') - --len; - - if (len > 0) - b[len] = '\0'; - else - { - free (b); - b = NULL; - } - - fclose (f); - - ld_so_conf = b; - } - - initialized = true; - } - - if (ld_so_conf == NULL) - return false; - - return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force); -} - -EOF - ;; - esac -fi -cat >>e${EMULATION_NAME}.c <<EOF - -/* These variables are required to pass information back and forth - between after_open and check_needed and stat_needed and vercheck. */ - -static struct bfd_link_needed_list *global_needed; -static struct stat global_stat; -static boolean global_found; -static struct bfd_link_needed_list *global_vercheck_needed; -static boolean global_vercheck_failed; +static void arm_elf_after_open PARAMS((void)); static void -gld${EMULATION_NAME}_after_open () +arm_elf_after_open () { - struct bfd_link_needed_list *needed, *l; - if (strstr (bfd_get_target (output_bfd), "arm") == NULL) { /* The arm backend needs special fields in the output hash structure. @@ -330,819 +63,20 @@ gld${EMULATION_NAME}_after_open () } } - /* We only need to worry about this when doing a final link. */ - if (link_info.relocateable || link_info.shared) - return; - - /* Get the list of files which appear in DT_NEEDED entries in - dynamic objects included in the link (often there will be none). - For each such file, we want to track down the corresponding - library, and include the symbol table in the link. This is what - the runtime dynamic linker will do. Tracking the files down here - permits one dynamic object to include another without requiring - special action by the person doing the link. Note that the - needed list can actually grow while we are stepping through this - loop. */ - needed = bfd_elf_get_needed_list (output_bfd, &link_info); - for (l = needed; l != NULL; l = l->next) - { - struct bfd_link_needed_list *ll; - int force; - - /* If we've already seen this file, skip it. */ - for (ll = needed; ll != l; ll = ll->next) - if (strcmp (ll->name, l->name) == 0) - break; - if (ll != l) - continue; - - /* See if this file was included in the link explicitly. */ - global_needed = l; - global_found = false; - lang_for_each_input_file (gld${EMULATION_NAME}_check_needed); - if (global_found) - continue; - - /* We need to find this file and include the symbol table. We - want to search for the file in the same way that the dynamic - linker will search. That means that we want to use - rpath_link, rpath, then the environment variable - LD_LIBRARY_PATH (native only), then the linker script - LIB_SEARCH_DIRS. We do not search using the -L arguments. - - We search twice. The first time, we skip objects which may - introduce version mismatches. The second time, we force - their use. See gld${EMULATION_NAME}_vercheck comment. */ - for (force = 0; force < 2; force++) - { - const char *lib_path; - size_t len; - search_dirs_type *search; - - if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link, - l->name, force)) - break; - if (gld${EMULATION_NAME}_search_needed (command_line.rpath, - l->name, force)) - break; - if (command_line.rpath_link == NULL - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); - if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, - force)) - break; - } -EOF -if [ "x${host}" = "x${target}" ] ; then - case " ${EMULATION_LIBPATH} " in - *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF - lib_path = (const char *) getenv ("LD_LIBRARY_PATH"); - if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force)) - break; -EOF - ;; - esac -fi -cat >>e${EMULATION_NAME}.c <<EOF - len = strlen (l->name); - for (search = search_head; search != NULL; search = search->next) - { - char *filename; - - if (search->cmdline) - continue; - filename = (char *) xmalloc (strlen (search->name) + len + 2); - sprintf (filename, "%s/%s", search->name, l->name); - if (gld${EMULATION_NAME}_try_needed (filename, force)) - break; - free (filename); - } - if (search != NULL) - break; -EOF -if [ "x${host}" = "x${target}" ] ; then - case " ${EMULATION_LIBPATH} " in - *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF - if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force)) - break; -EOF - ;; - esac -fi -cat >>e${EMULATION_NAME}.c <<EOF - } - - if (force < 2) - continue; - - einfo ("%P: warning: %s, needed by %B, not found (try using --rpath)\n", - l->name, l->by); - } -} - -/* Search for a needed file in a path. */ - -static boolean -gld${EMULATION_NAME}_search_needed (path, name, force) - const char *path; - const char *name; - int force; -{ - const char *s; - size_t len; - - if (path == NULL || *path == '\0') - return false; - len = strlen (name); - while (1) - { - char *filename, *sset; - - s = strchr (path, ':'); - if (s == NULL) - s = path + strlen (path); - - filename = (char *) xmalloc (s - path + len + 2); - if (s == path) - sset = filename; - else - { - memcpy (filename, path, s - path); - filename[s - path] = '/'; - sset = filename + (s - path) + 1; - } - strcpy (sset, name); - - if (gld${EMULATION_NAME}_try_needed (filename, force)) - return true; - - free (filename); - - if (*s == '\0') - break; - path = s + 1; - } - - return false; -} - -/* This function is called for each possible name for a dynamic object - named by a DT_NEEDED entry. The FORCE parameter indicates whether - to skip the check for a conflicting version. */ - -static boolean -gld${EMULATION_NAME}_try_needed (name, force) - const char *name; - int force; -{ - bfd *abfd; - - abfd = bfd_openr (name, bfd_get_target (output_bfd)); - if (abfd == NULL) - return false; - if (! bfd_check_format (abfd, bfd_object)) - { - (void) bfd_close (abfd); - return false; - } - if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) - { - (void) bfd_close (abfd); - return false; - } - - /* Check whether this object would include any conflicting library - versions. If FORCE is set, then we skip this check; we use this - the second time around, if we couldn't find any compatible - instance of the shared library. */ - - if (! force) - { - struct bfd_link_needed_list *needed; - - if (! bfd_elf_get_bfd_needed_list (abfd, &needed)) - einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd); - - if (needed != NULL) - { - global_vercheck_needed = needed; - global_vercheck_failed = false; - lang_for_each_input_file (gld${EMULATION_NAME}_vercheck); - if (global_vercheck_failed) - { - (void) bfd_close (abfd); - /* Return false to force the caller to move on to try - another file on the search path. */ - return false; - } - - /* But wait! It gets much worse. On Linux, if a shared - library does not use libc at all, we are supposed to skip - it the first time around in case we encounter a shared - library later on with the same name which does use the - version of libc that we want. This is much too horrible - to use on any system other than Linux. */ - -EOF -case ${target} in - *-*-linux-gnu*) - cat >>e${EMULATION_NAME}.c <<EOF - { - struct bfd_link_needed_list *l; - - for (l = needed; l != NULL; l = l->next) - if (strncmp (l->name, "libc.so", 7) == 0) - break; - if (l == NULL) - { - (void) bfd_close (abfd); - return false; - } - } - -EOF - ;; -esac -cat >>e${EMULATION_NAME}.c <<EOF - } - } - - /* We've found a dynamic object matching the DT_NEEDED entry. */ - - /* We have already checked that there is no other input file of the - same name. We must now check again that we are not including the - same file twice. We need to do this because on many systems - libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will - reference libc.so.1. If we have already included libc.so, we - don't want to include libc.so.1 if they are the same file, and we - can only check that using stat. */ - - if (bfd_stat (abfd, &global_stat) != 0) - einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); - global_found = false; - lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed); - if (global_found) - { - /* Return true to indicate that we found the file, even though - we aren't going to do anything with it. */ - return true; - } - - /* Tell the ELF backend that don't want the output file to have a - DT_NEEDED entry for this file. */ - bfd_elf_set_dt_needed_name (abfd, ""); - - /* Add this file into the symbol table. */ - if (! bfd_link_add_symbols (abfd, &link_info)) - einfo ("%F%B: could not read symbols: %E\n", abfd); - - return true; -} - -/* See if an input file matches a DT_NEEDED entry by name. */ - -static void -gld${EMULATION_NAME}_check_needed (s) - lang_input_statement_type *s; -{ - if (global_found) - return; - - if (s->filename != NULL - && strcmp (s->filename, global_needed->name) == 0) - { - global_found = true; - return; - } - - if (s->the_bfd != NULL) - { - const char *soname; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname != NULL - && strcmp (soname, global_needed->name) == 0) - { - global_found = true; - return; - } - } - - if (s->search_dirs_flag - && s->filename != NULL - && strchr (global_needed->name, '/') == NULL) - { - const char *f; - - f = strrchr (s->filename, '/'); - if (f != NULL - && strcmp (f + 1, global_needed->name) == 0) - { - global_found = true; - return; - } - } + /* Call the standard elf routine. */ + gld${EMULATION_NAME}_after_open (); } -/* See if an input file matches a DT_NEEDED entry by running stat on - the file. */ -static void -gld${EMULATION_NAME}_stat_needed (s) - lang_input_statement_type *s; -{ - struct stat st; - const char *suffix; - const char *soname; - const char *f; - - if (global_found) - return; - if (s->the_bfd == NULL) - return; - - if (bfd_stat (s->the_bfd, &st) != 0) - { - einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd); - return; - } - - if (st.st_dev == global_stat.st_dev - && st.st_ino == global_stat.st_ino) - { - global_found = true; - return; - } - - /* We issue a warning if it looks like we are including two - different versions of the same shared library. For example, - there may be a problem if -lc picks up libc.so.6 but some other - shared library has a DT_NEEDED entry of libc.so.5. This is a - hueristic test, and it will only work if the name looks like - NAME.so.VERSION. FIXME: Depending on file names is error-prone. - If we really want to issue warnings about mixing version numbers - of shared libraries, we need to find a better way. */ - - if (strchr (global_needed->name, '/') != NULL) - return; - suffix = strstr (global_needed->name, ".so."); - if (suffix == NULL) - return; - suffix += sizeof ".so." - 1; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname == NULL) - soname = s->filename; - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; - - if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) - einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", - global_needed->name, global_needed->by, f); -} - -/* On Linux, it's possible to have different versions of the same - shared library linked against different versions of libc. The - dynamic linker somehow tags which libc version to use in - /etc/ld.so.cache, and, based on the libc that it sees in the - executable, chooses which version of the shared library to use. - - We try to do a similar check here by checking whether this shared - library needs any other shared libraries which may conflict with - libraries we have already included in the link. If it does, we - skip it, and try to find another shared library farther on down the - link path. - - This is called via lang_for_each_input_file. - GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object - which we ar checking. This sets GLOBAL_VERCHECK_FAILED if we find - a conflicting version. */ +static void arm_elf_before_allocation PARAMS ((void)); static void -gld${EMULATION_NAME}_vercheck (s) - lang_input_statement_type *s; +arm_elf_before_allocation () { - const char *soname, *f; - struct bfd_link_needed_list *l; - - if (global_vercheck_failed) - return; - if (s->the_bfd == NULL - || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0) - return; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname == NULL) - soname = bfd_get_filename (s->the_bfd); - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; - - for (l = global_vercheck_needed; l != NULL; l = l->next) - { - const char *suffix; - - if (strcmp (f, l->name) == 0) - { - /* Probably can't happen, but it's an easy check. */ - continue; - } - - if (strchr (l->name, '/') != NULL) - continue; - - suffix = strstr (l->name, ".so."); - if (suffix == NULL) - continue; + /* Call the standard elf routine. */ + gld${EMULATION_NAME}_before_allocation (); - suffix += sizeof ".so." - 1; - - if (strncmp (f, l->name, suffix - l->name) == 0) - { - /* Here we know that S is a dynamic object FOO.SO.VER1, and - the object we are considering needs a dynamic object - FOO.SO.VER2, and VER1 and VER2 are different. This - appears to be a version mismatch, so we tell the caller - to try a different version of this library. */ - global_vercheck_failed = true; - return; - } - } -} - -/* Place an orphan section. We use this to put random SHF_ALLOC - sections in the right segment. */ - -static asection *hold_section; -static lang_output_section_statement_type *hold_use; -static lang_output_section_statement_type *hold_text; -static lang_output_section_statement_type *hold_rodata; -static lang_output_section_statement_type *hold_data; -static lang_output_section_statement_type *hold_bss; -static lang_output_section_statement_type *hold_rel; -static lang_output_section_statement_type *hold_interp; - -/*ARGSUSED*/ -static boolean -gld${EMULATION_NAME}_place_orphan (file, s) - lang_input_statement_type *file; - asection *s; -{ - lang_output_section_statement_type *place; - asection *snew, **pps; - lang_statement_list_type *old; - lang_statement_list_type add; - etree_type *address; - const char *secname, *ps; - const char *outsecname; - lang_output_section_statement_type *os; - - if ((s->flags & SEC_ALLOC) == 0) - return false; - - /* Look through the script to see where to place this section. */ - hold_section = s; - hold_use = NULL; - lang_for_each_statement (gld${EMULATION_NAME}_place_section); - - if (hold_use != NULL) - { - /* We have already placed a section with this name. */ - wild_doit (&hold_use->children, s, hold_use, file); - return true; - } - - secname = bfd_get_section_name (s->owner, s); - - /* If this is a final link, then always put .gnu.warning.SYMBOL - sections into the .text section to get them out of the way. */ - if (! link_info.shared - && ! link_info.relocateable - && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0 - && hold_text != NULL) - { - wild_doit (&hold_text->children, s, hold_text, file); - return true; - } - - /* Decide which segment the section should go in based on the - section name and section flags. We put loadable .note sections - right after the .interp section, so that the PT_NOTE segment is - stored right after the program headers where the OS can read it - in the first page. */ - place = NULL; - if (s->flags & SEC_EXCLUDE) - return false; - else if ((s->flags & SEC_LOAD) != 0 - && strncmp (secname, ".note", 4) == 0 - && hold_interp != NULL) - place = hold_interp; - else if ((s->flags & SEC_HAS_CONTENTS) == 0 - && hold_bss != NULL) - place = hold_bss; - else if ((s->flags & SEC_READONLY) == 0 - && hold_data != NULL) - place = hold_data; - else if (strncmp (secname, ".rel", 4) == 0 - && hold_rel != NULL) - place = hold_rel; - else if ((s->flags & SEC_CODE) == 0 - && (s->flags & SEC_READONLY) != 0 - && hold_rodata != NULL) - place = hold_rodata; - else if ((s->flags & SEC_READONLY) != 0 - && hold_text != NULL) - place = hold_text; - if (place == NULL) - return false; - - /* Choose a unique name for the section. This will be needed if the - same section name appears in the input file with different - loadable or allocateable characteristics. */ - outsecname = secname; - if (bfd_get_section_by_name (output_bfd, outsecname) != NULL) - { - unsigned int len; - char *newname; - unsigned int i; - - len = strlen (outsecname); - newname = xmalloc (len + 5); - strcpy (newname, outsecname); - i = 0; - do - { - sprintf (newname + len, "%d", i); - ++i; - } - while (bfd_get_section_by_name (output_bfd, newname) != NULL); - - outsecname = newname; - } - - /* Create the section in the output file, and put it in the right - place. This shuffling is to make the output file look neater. */ - snew = bfd_make_section (output_bfd, outsecname); - if (snew == NULL) - einfo ("%P%F: output format %s cannot represent section called %s\n", - output_bfd->xvec->name, outsecname); - if (place->bfd_section != NULL) - { - for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) - ; - *pps = snew->next; - snew->next = place->bfd_section->next; - place->bfd_section->next = snew; - } - - /* Start building a list of statements for this section. */ - old = stat_ptr; - stat_ptr = &add; - lang_list_init (stat_ptr); - - /* If the name of the section is representable in C, then create - symbols to mark the start and the end of the section. */ - for (ps = outsecname; *ps != '\0'; ps++) - if (! isalnum ((unsigned char) *ps) && *ps != '_') - break; - if (*ps == '\0' && config.build_constructors) - { - char *symname; - - symname = (char *) xmalloc (ps - outsecname + sizeof "__start_"); - sprintf (symname, "__start_%s", outsecname); - lang_add_assignment (exp_assop ('=', symname, - exp_unop (ALIGN_K, - exp_intop ((bfd_vma) 1 - << s->alignment_power)))); - } - - if (! link_info.relocateable) - address = NULL; - else - address = exp_intop ((bfd_vma) 0); - - lang_enter_output_section_statement (outsecname, address, 0, - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, - (etree_type *) NULL); - - os = lang_output_section_statement_lookup (outsecname); - wild_doit (&os->children, s, os, file); - - lang_leave_output_section_statement - ((bfd_vma) 0, "*default*", (struct lang_output_section_phdr_list *) NULL, - "*default*"); - stat_ptr = &add; - - if (*ps == '\0' && config.build_constructors) - { - char *symname; - - symname = (char *) xmalloc (ps - outsecname + sizeof "__stop_"); - sprintf (symname, "__stop_%s", outsecname); - lang_add_assignment (exp_assop ('=', symname, - exp_nameop (NAME, "."))); - } - - /* Now stick the new statement list right after PLACE. */ - *add.tail = place->header.next; - place->header.next = add.head; - - stat_ptr = old; - - return true; -} - -static void -gld${EMULATION_NAME}_place_section (s) - lang_statement_union_type *s; -{ - lang_output_section_statement_type *os; - - if (s->header.type != lang_output_section_statement_enum) - return; - - os = &s->output_section_statement; - - if (strcmp (os->name, hold_section->name) == 0 - && os->bfd_section != NULL - && ((hold_section->flags & (SEC_LOAD | SEC_ALLOC)) - == (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC)))) - hold_use = os; - - if (strcmp (os->name, ".text") == 0) - hold_text = os; - else if (strcmp (os->name, ".rodata") == 0) - hold_rodata = os; - else if (strcmp (os->name, ".data") == 0) - hold_data = os; - else if (strcmp (os->name, ".bss") == 0) - hold_bss = os; - else if (hold_rel == NULL - && os->bfd_section != NULL - && (os->bfd_section->flags & SEC_ALLOC) != 0 - && strncmp (os->name, ".rel", 4) == 0) - hold_rel = os; - else if (strcmp (os->name, ".interp") == 0) - hold_interp = os; -} - -/* Look through an expression for an assignment statement. */ - -static void -gld${EMULATION_NAME}_find_exp_assignment (exp) - etree_type *exp; -{ - struct bfd_link_hash_entry *h; - - switch (exp->type.node_class) - { - case etree_provide: - h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); - if (h == NULL) - break; - - /* We call record_link_assignment even if the symbol is defined. - This is because if it is defined by a dynamic object, we - actually want to use the value defined by the linker script, - not the value from the dynamic object (because we are setting - symbols like etext). If the symbol is defined by a regular - object, then, as it happens, calling record_link_assignment - will do no harm. */ - - /* Fall through. */ - case etree_assign: - if (strcmp (exp->assign.dst, ".") != 0) - { - if (! (bfd_elf${ELFSIZE}_record_link_assignment - (output_bfd, &link_info, exp->assign.dst, - exp->type.node_class == etree_provide ? true : false))) - einfo ("%P%F: failed to record assignment to %s: %E\n", - exp->assign.dst); - } - gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src); - break; - - case etree_binary: - gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs); - gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs); - break; - - case etree_trinary: - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond); - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs); - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs); - break; - - case etree_unary: - gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child); - break; - - default: - break; - } -} - -/* This is called by the before_allocation routine via - lang_for_each_statement. It locates any assignment statements, and - tells the ELF backend about them, in case they are assignments to - symbols which are referred to by dynamic objects. */ - -static void -gld${EMULATION_NAME}_find_statement_assignment (s) - lang_statement_union_type *s; -{ - if (s->header.type == lang_assignment_statement_enum) - gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp); -} - -/* This is called after the sections have been attached to output - sections, but before any sizes or addresses have been set. */ - -static void -gld${EMULATION_NAME}_before_allocation () -{ - const char *rpath; - asection *sinterp; - - /* If we are going to make any variable assignments, we need to let - the ELF backend know about them in case the variables are - referred to by dynamic objects. */ - lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment); - - /* Let the ELF backend work out the sizes of any sections required - by dynamic linking. */ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); - if (! (bfd_elf${ELFSIZE}_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.export_dynamic, command_line.filter_shlib, - (const char * const *) command_line.auxiliary_filters, - &link_info, &sinterp, lang_elf_version_info))) - einfo ("%P%F: failed to set dynamic section sizes: %E\n"); - - /* Let the user override the dynamic linker we are using. */ - if (command_line.interpreter != NULL - && sinterp != NULL) - { - sinterp->contents = (bfd_byte *) command_line.interpreter; - sinterp->_raw_size = strlen (command_line.interpreter) + 1; - } - - /* Look for any sections named .gnu.warning. As a GNU extensions, - we treat such sections as containing warning messages. We print - out the warning message, and then zero out the section size so - that it does not get copied into the output file. */ - - { - LANG_FOR_EACH_INPUT_STATEMENT (is) - { - asection *s; - bfd_size_type sz; - char *msg; - boolean ret; - - if (is->just_syms_flag) - continue; - - s = bfd_get_section_by_name (is->the_bfd, ".gnu.warning"); - if (s == NULL) - continue; - - sz = bfd_section_size (is->the_bfd, s); - msg = xmalloc ((size_t) sz + 1); - if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz)) - einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n", - is->the_bfd); - msg[sz] = '\0'; - ret = link_info.callbacks->warning (&link_info, msg, - (const char *) NULL, - is->the_bfd, (asection *) NULL, - (bfd_vma) 0); - ASSERT (ret); - free (msg); - - /* Clobber the section size, so that we don't waste copying the - warning into the output file. */ - s->_raw_size = 0; - } - } - - /* we should be able to set the size of the interworking stub section */ + /* We should be able to set the size of the interworking stub section */ /* Here we rummage through the found bfds to collect glue information */ /* FIXME: should this be based on a command line option? krk@cygnus.com */ @@ -1162,6 +96,9 @@ gld${EMULATION_NAME}_before_allocation () bfd_elf32_arm_allocate_interworking_sections (& link_info); } + +static void gld${EMULATION_NAME}_finish PARAMS ((void)); + static void gld${EMULATION_NAME}_finish PARAMS((void)) { @@ -1170,7 +107,8 @@ gld${EMULATION_NAME}_finish PARAMS((void)) if (thumb_entry_symbol == NULL) return; - h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true); + h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, + false, false, true); if (h != (struct bfd_link_hash_entry *) NULL && (h->type == bfd_link_hash_defined @@ -1202,92 +140,48 @@ gld${EMULATION_NAME}_finish PARAMS((void)) entry_symbol = buffer; } else - einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol); + einfo (_("%P: warning: connot find thumb start symbol %s\n"), + thumb_entry_symbol); } -static char * -gld${EMULATION_NAME}_get_script (isfile) - int *isfile; EOF -if test -n "$COMPILE_IN" -then -# Scripts compiled in. +# Define some shell vars to insert bits of code into the standard elf +# parse_args and list_options functions. +# +PARSE_AND_LIST_PROLOGUE=' +#define OPTION_THUMB_ENTRY 301 +' -# sed commands to quote an ld script as a C string. -sc="-f stringify.sed" +PARSE_AND_LIST_SHORTOPTS=p -cat >>e${EMULATION_NAME}.c <<EOF -{ - *isfile = 0; - - if (link_info.relocateable == true && config.build_constructors == true) - return -EOF -sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c -echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -if test -n "$GENERATE_SHLIB_SCRIPT" ; then - echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c - sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c -fi -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c +PARSE_AND_LIST_LONGOPTS=' + { "no-pipeline-knowledge", no_argument, NULL, '\'p\''}, + { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY}, +' -else -# Scripts read from the filesystem. +PARSE_AND_LIST_OPTIONS=' + fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n")); + fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n")); +' -cat >>e${EMULATION_NAME}.c <<EOF -{ - *isfile = 1; +PARSE_AND_LIST_ARGS_CASES=' + case '\'p\'': + no_pipeline_knowledge = 1; + break; - if (link_info.relocateable == true && config.build_constructors == true) - return "ldscripts/${EMULATION_NAME}.xu"; - else if (link_info.relocateable == true) - return "ldscripts/${EMULATION_NAME}.xr"; - else if (!config.text_read_only) - return "ldscripts/${EMULATION_NAME}.xbn"; - else if (!config.magic_demand_paged) - return "ldscripts/${EMULATION_NAME}.xn"; - else if (link_info.shared) - return "ldscripts/${EMULATION_NAME}.xs"; - else - return "ldscripts/${EMULATION_NAME}.x"; -} -EOF + case OPTION_THUMB_ENTRY: + thumb_entry_symbol = optarg; + break; +' -fi +# We have our own after_open and before_allocation functions, but they call +# the standard routines, so give them a different name. +LDEMUL_AFTER_OPEN=arm_elf_after_open +LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation -cat >>e${EMULATION_NAME}.c <<EOF +# Replace the elf before_parse function with our own. +LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse -struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = -{ - gld${EMULATION_NAME}_before_parse, - syslib_default, - hll_default, - after_parse_default, - gld${EMULATION_NAME}_after_open, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - gld${EMULATION_NAME}_before_allocation, - gld${EMULATION_NAME}_get_script, - "${EMULATION_NAME}", - "${OUTPUT_FORMAT}", - gld${EMULATION_NAME}_finish, - NULL, /* create output section statements */ - gld${EMULATION_NAME}_open_dynamic_archive, - gld${EMULATION_NAME}_place_orphan, - NULL, /* set symbols */ - gld${EMULATION_NAME}_parse_args, - NULL, /* unrecognized file */ - gld${EMULATION_NAME}_list_options, - NULL, /* recognized file */ - NULL /* find_potential_libraries */ -}; -EOF +# Call the extra arm-elf function +LDEMUL_FINISH=gld${EMULATION_NAME}_finish diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em index d8ca87a..7936d48 100644 --- a/contrib/binutils/ld/emultempl/armelf_oabi.em +++ b/contrib/binutils/ld/emultempl/armelf_oabi.em @@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -39,12 +40,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index b502d9e..9ac2d41 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -7,7 +7,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> ELF support by Ian Lance Taylor <ian@cygnus.com> @@ -39,134 +39,402 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" #include "ldgram.h" +#include "elf/common.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); -static boolean gld${EMULATION_NAME}_open_dynamic_archive - PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); -static void gld${EMULATION_NAME}_after_open PARAMS ((void)); -static void gld${EMULATION_NAME}_check_needed +static void gld${EMULATION_NAME}_vercheck PARAMS ((lang_input_statement_type *)); static void gld${EMULATION_NAME}_stat_needed PARAMS ((lang_input_statement_type *)); +static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int)); static boolean gld${EMULATION_NAME}_search_needed PARAMS ((const char *, const char *, int)); -static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int)); -static void gld${EMULATION_NAME}_vercheck +static void gld${EMULATION_NAME}_check_needed PARAMS ((lang_input_statement_type *)); -static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); +static void gld${EMULATION_NAME}_after_open PARAMS ((void)); +static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *)); static void gld${EMULATION_NAME}_find_statement_assignment PARAMS ((lang_statement_union_type *)); -static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *)); +static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); +static boolean gld${EMULATION_NAME}_open_dynamic_archive + PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); static lang_output_section_statement_type *output_rel_find PARAMS ((void)); static boolean gld${EMULATION_NAME}_place_orphan PARAMS ((lang_input_statement_type *, asection *)); static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); +EOF + +# Import any needed special functions and/or overrides. +# +if test -n "$EXTRA_EM_FILE" ; then +. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em +fi + +# Functions in this file can be overridden by setting the LDEMUL_* shell +# variables. If the name of the overriding function is the same as is +# defined in this file, then don't output this file's version. +# If a different overriding name is given then output the standard function +# as presumably it is called from the overriding function. +# +if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then +cat >>e${EMULATION_NAME}.c <<EOF + static void -gld${EMULATION_NAME}_before_parse() +gld${EMULATION_NAME}_before_parse () { ldfile_output_architecture = bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`; config.dynamic_link = ${DYNAMIC_LINK-true}; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; } -/* Try to open a dynamic archive. This is where we know that ELF - dynamic libraries have an extension of .so (or .sl on oddball systems - like hpux). */ +EOF +fi + +cat >>e${EMULATION_NAME}.c <<EOF + +/* These variables are required to pass information back and forth + between after_open and check_needed and stat_needed and vercheck. */ + +static struct bfd_link_needed_list *global_needed; +static struct stat global_stat; +static boolean global_found; +static struct bfd_link_needed_list *global_vercheck_needed; +static boolean global_vercheck_failed; + + +/* On Linux, it's possible to have different versions of the same + shared library linked against different versions of libc. The + dynamic linker somehow tags which libc version to use in + /etc/ld.so.cache, and, based on the libc that it sees in the + executable, chooses which version of the shared library to use. + + We try to do a similar check here by checking whether this shared + library needs any other shared libraries which may conflict with + libraries we have already included in the link. If it does, we + skip it, and try to find another shared library farther on down the + link path. + + This is called via lang_for_each_input_file. + GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object + which we are checking. This sets GLOBAL_VERCHECK_FAILED if we find + a conflicting version. */ + +static void +gld${EMULATION_NAME}_vercheck (s) + lang_input_statement_type *s; +{ + const char *soname, *f; + struct bfd_link_needed_list *l; + + if (global_vercheck_failed) + return; + if (s->the_bfd == NULL + || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0) + return; + + soname = bfd_elf_get_dt_soname (s->the_bfd); + if (soname == NULL) + soname = bfd_get_filename (s->the_bfd); + + f = strrchr (soname, '/'); + if (f != NULL) + ++f; + else + f = soname; + + for (l = global_vercheck_needed; l != NULL; l = l->next) + { + const char *suffix; + + if (strcmp (f, l->name) == 0) + { + /* Probably can't happen, but it's an easy check. */ + continue; + } + + if (strchr (l->name, '/') != NULL) + continue; + + suffix = strstr (l->name, ".so."); + if (suffix == NULL) + continue; + + suffix += sizeof ".so." - 1; + + if (strncmp (f, l->name, suffix - l->name) == 0) + { + /* Here we know that S is a dynamic object FOO.SO.VER1, and + the object we are considering needs a dynamic object + FOO.SO.VER2, and VER1 and VER2 are different. This + appears to be a version mismatch, so we tell the caller + to try a different version of this library. */ + global_vercheck_failed = true; + return; + } + } +} + + +/* See if an input file matches a DT_NEEDED entry by running stat on + the file. */ + +static void +gld${EMULATION_NAME}_stat_needed (s) + lang_input_statement_type *s; +{ + struct stat st; + const char *suffix; + const char *soname; + const char *f; + + if (global_found) + return; + if (s->the_bfd == NULL) + return; + + if (bfd_stat (s->the_bfd, &st) != 0) + { + einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd); + return; + } + + if (st.st_dev == global_stat.st_dev + && st.st_ino == global_stat.st_ino) + { + global_found = true; + return; + } + + /* We issue a warning if it looks like we are including two + different versions of the same shared library. For example, + there may be a problem if -lc picks up libc.so.6 but some other + shared library has a DT_NEEDED entry of libc.so.5. This is a + heuristic test, and it will only work if the name looks like + NAME.so.VERSION. FIXME: Depending on file names is error-prone. + If we really want to issue warnings about mixing version numbers + of shared libraries, we need to find a better way. */ + + if (strchr (global_needed->name, '/') != NULL) + return; + suffix = strstr (global_needed->name, ".so."); + if (suffix == NULL) + return; + suffix += sizeof ".so." - 1; + + soname = bfd_elf_get_dt_soname (s->the_bfd); + if (soname == NULL) + soname = s->filename; + + f = strrchr (soname, '/'); + if (f != NULL) + ++f; + else + f = soname; + + if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) + einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", + global_needed->name, global_needed->by, f); +} + + +/* This function is called for each possible name for a dynamic object + named by a DT_NEEDED entry. The FORCE parameter indicates whether + to skip the check for a conflicting version. */ static boolean -gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) - const char *arch; - search_dirs_type *search; - lang_input_statement_type *entry; +gld${EMULATION_NAME}_try_needed (name, force) + const char *name; + int force; { - const char *filename; - char *string; + bfd *abfd; + const char *soname; - if (! entry->is_archive) + abfd = bfd_openr (name, bfd_get_target (output_bfd)); + if (abfd == NULL) return false; + if (! bfd_check_format (abfd, bfd_object)) + { + (void) bfd_close (abfd); + return false; + } + if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) + { + (void) bfd_close (abfd); + return false; + } - filename = entry->filename; + /* Check whether this object would include any conflicting library + versions. If FORCE is set, then we skip this check; we use this + the second time around, if we couldn't find any compatible + instance of the shared library. */ - /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION - is defined, but it does not seem worth the headache to optimize - away those two bytes of space. */ - string = (char *) xmalloc (strlen (search->name) - + strlen (filename) - + strlen (arch) -#ifdef EXTRA_SHLIB_EXTENSION - + strlen (EXTRA_SHLIB_EXTENSION) -#endif - + sizeof "/lib.so"); + if (! force) + { + struct bfd_link_needed_list *needed; - sprintf (string, "%s/lib%s%s.so", search->name, filename, arch); + if (! bfd_elf_get_bfd_needed_list (abfd, &needed)) + einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd); -#ifdef EXTRA_SHLIB_EXTENSION - /* Try the .so extension first. If that fails build a new filename - using EXTRA_SHLIB_EXTENSION. */ - if (! ldfile_try_open_bfd (string, entry)) - sprintf (string, "%s/lib%s%s%s", search->name, - filename, arch, EXTRA_SHLIB_EXTENSION); -#endif + if (needed != NULL) + { + global_vercheck_needed = needed; + global_vercheck_failed = false; + lang_for_each_input_file (gld${EMULATION_NAME}_vercheck); + if (global_vercheck_failed) + { + (void) bfd_close (abfd); + /* Return false to force the caller to move on to try + another file on the search path. */ + return false; + } - if (! ldfile_try_open_bfd (string, entry)) + /* But wait! It gets much worse. On Linux, if a shared + library does not use libc at all, we are supposed to skip + it the first time around in case we encounter a shared + library later on with the same name which does use the + version of libc that we want. This is much too horrible + to use on any system other than Linux. */ + +EOF +case ${target} in + *-*-linux-gnu*) + cat >>e${EMULATION_NAME}.c <<EOF + { + struct bfd_link_needed_list *l; + + for (l = needed; l != NULL; l = l->next) + if (strncmp (l->name, "libc.so", 7) == 0) + break; + if (l == NULL) + { + (void) bfd_close (abfd); + return false; + } + } + +EOF + ;; +esac +cat >>e${EMULATION_NAME}.c <<EOF + } + } + + /* We've found a dynamic object matching the DT_NEEDED entry. */ + + /* We have already checked that there is no other input file of the + same name. We must now check again that we are not including the + same file twice. We need to do this because on many systems + libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will + reference libc.so.1. If we have already included libc.so, we + don't want to include libc.so.1 if they are the same file, and we + can only check that using stat. */ + + if (bfd_stat (abfd, &global_stat) != 0) + einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); + + /* First strip off everything before the last '/'. */ + soname = strrchr (abfd->filename, '/'); + if (soname) + soname++; + else + soname = abfd->filename; + + if (trace_file_tries) + info_msg (_("found %s at %s\n"), soname, name); + + global_found = false; + lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed); + if (global_found) { - free (string); - return false; + /* Return true to indicate that we found the file, even though + we aren't going to do anything with it. */ + return true; } - entry->filename = string; + /* Tell the ELF backend that we don't want the output file to have a + DT_NEEDED entry for this file. */ + bfd_elf_set_dt_needed_name (abfd, ""); - /* We have found a dynamic object to include in the link. The ELF - backend linker will create a DT_NEEDED entry in the .dynamic - section naming this file. If this file includes a DT_SONAME - entry, it will be used. Otherwise, the ELF linker will just use - the name of the file. For an archive found by searching, like - this one, the DT_NEEDED entry should consist of just the name of - the file, without the path information used to find it. Note - that we only need to do this if we have a dynamic object; an - archive will never be referenced by a DT_NEEDED entry. + /* Tell the ELF backend that the output file needs a DT_NEEDED + entry for this file if it is used to resolve the reference in + a regular object. */ + bfd_elf_set_dt_needed_soname (abfd, soname); - FIXME: This approach--using bfd_elf_set_dt_needed_name--is not - very pretty. I haven't been able to think of anything that is - pretty, though. */ - if (bfd_check_format (entry->the_bfd, bfd_object) - && (entry->the_bfd->flags & DYNAMIC) != 0) + /* Add this file into the symbol table. */ + if (! bfd_link_add_symbols (abfd, &link_info)) + einfo ("%F%B: could not read symbols: %E\n", abfd); + + return true; +} + + +/* Search for a needed file in a path. */ + +static boolean +gld${EMULATION_NAME}_search_needed (path, name, force) + const char *path; + const char *name; + int force; +{ + const char *s; + size_t len; + + if (name[0] == '/') + return gld${EMULATION_NAME}_try_needed (name, force); + + if (path == NULL || *path == '\0') + return false; + len = strlen (name); + while (1) { - char *needed_name; + char *filename, *sset; - ASSERT (entry->is_archive && entry->search_dirs_flag); + s = strchr (path, ':'); + if (s == NULL) + s = path + strlen (path); - /* Rather than duplicating the logic above. Just use the - filename we recorded earlier. + filename = (char *) xmalloc (s - path + len + 2); + if (s == path) + sset = filename; + else + { + memcpy (filename, path, s - path); + filename[s - path] = '/'; + sset = filename + (s - path) + 1; + } + strcpy (sset, name); - First strip off everything before the last '/'. */ - filename = strrchr (entry->filename, '/'); - filename++; + if (gld${EMULATION_NAME}_try_needed (filename, force)) + return true; - needed_name = (char *) xmalloc (strlen (filename) + 1); - strcpy (needed_name, filename); - bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); + free (filename); + + if (*s == '\0') + break; + path = s + 1; } - return true; + return false; } EOF if [ "x${host}" = "x${target}" ] ; then case " ${EMULATION_LIBPATH} " in *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF + case ${target} in + *-*-linux-gnu*) + cat >>e${EMULATION_NAME}.c <<EOF /* For a native linker, check the file /etc/ld.so.conf for directories in which we may find shared libraries. /etc/ld.so.conf is really - only meaningful on Linux, but we check it on other systems anyhow. */ + only meaningful on Linux. */ static boolean gld${EMULATION_NAME}_check_ld_so_conf PARAMS ((const char *, int)); @@ -246,19 +514,62 @@ gld${EMULATION_NAME}_check_ld_so_conf (name, force) } EOF - ;; + # Linux + ;; + esac esac fi cat >>e${EMULATION_NAME}.c <<EOF -/* These variables are required to pass information back and forth - between after_open and check_needed and stat_needed and vercheck. */ +/* See if an input file matches a DT_NEEDED entry by name. */ -static struct bfd_link_needed_list *global_needed; -static struct stat global_stat; -static boolean global_found; -static struct bfd_link_needed_list *global_vercheck_needed; -static boolean global_vercheck_failed; +static void +gld${EMULATION_NAME}_check_needed (s) + lang_input_statement_type *s; +{ + if (global_found) + return; + + if (s->filename != NULL) + { + const char *f; + + if (strcmp (s->filename, global_needed->name) == 0) + { + global_found = true; + return; + } + + if (s->search_dirs_flag) + { + f = strrchr (s->filename, '/'); + if (f != NULL + && strcmp (f + 1, global_needed->name) == 0) + { + global_found = true; + return; + } + } + } + + if (s->the_bfd != NULL) + { + const char *soname; + + soname = bfd_elf_get_dt_soname (s->the_bfd); + if (soname != NULL + && strcmp (soname, global_needed->name) == 0) + { + global_found = true; + return; + } + } +} + +EOF + +if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then +cat >>e${EMULATION_NAME}.c <<EOF /* This is called after all the input files have been opened. */ @@ -300,25 +611,46 @@ gld${EMULATION_NAME}_after_open () if (global_found) continue; + if (trace_file_tries) + info_msg (_("%s needed by %B\n"), l->name, l->by); + /* We need to find this file and include the symbol table. We want to search for the file in the same way that the dynamic linker will search. That means that we want to use rpath_link, rpath, then the environment variable - LD_LIBRARY_PATH (native only), then the linker script - LIB_SEARCH_DIRS. We do not search using the -L arguments. + LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH + entries (native only), then the linker script LIB_SEARCH_DIRS. + We do not search using the -L arguments. We search twice. The first time, we skip objects which may introduce version mismatches. The second time, we force their use. See gld${EMULATION_NAME}_vercheck comment. */ for (force = 0; force < 2; force++) { - const char *lib_path; size_t len; search_dirs_type *search; +EOF +if [ "x${host}" = "x${target}" ] ; then + case " ${EMULATION_LIBPATH} " in + *" ${EMULATION_NAME} "*) +cat >>e${EMULATION_NAME}.c <<EOF + const char *lib_path; + struct bfd_link_needed_list *rp; + int found; +EOF + ;; + esac +fi +cat >>e${EMULATION_NAME}.c <<EOF if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link, l->name, force)) break; +EOF +if [ "x${host}" = "x${target}" ] ; then + case " ${EMULATION_LIBPATH} " in + *" ${EMULATION_NAME} "*) +cat >>e${EMULATION_NAME}.c <<EOF if (gld${EMULATION_NAME}_search_needed (command_line.rpath, l->name, force)) break; @@ -330,14 +662,22 @@ gld${EMULATION_NAME}_after_open () force)) break; } -EOF -if [ "x${host}" = "x${target}" ] ; then - case " ${EMULATION_LIBPATH} " in - *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF lib_path = (const char *) getenv ("LD_LIBRARY_PATH"); if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force)) break; + + found = 0; + rp = bfd_elf_get_runpath_list (output_bfd, &link_info); + for (; !found && rp != NULL; rp = rp->next) + { + found = (rp->by == l->by + && gld${EMULATION_NAME}_search_needed (rp->name, + l->name, + force)); + } + if (found) + break; + EOF ;; esac @@ -362,10 +702,15 @@ EOF if [ "x${host}" = "x${target}" ] ; then case " ${EMULATION_LIBPATH} " in *" ${EMULATION_NAME} "*) -cat >>e${EMULATION_NAME}.c <<EOF + case ${target} in + *-*-linux-gnu*) + cat >>e${EMULATION_NAME}.c <<EOF if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force)) break; EOF + # Linux + ;; + esac ;; esac fi @@ -380,342 +725,86 @@ cat >>e${EMULATION_NAME}.c <<EOF } } -/* Search for a needed file in a path. */ - -static boolean -gld${EMULATION_NAME}_search_needed (path, name, force) - const char *path; - const char *name; - int force; -{ - const char *s; - size_t len; - - if (path == NULL || *path == '\0') - return false; - len = strlen (name); - while (1) - { - char *filename, *sset; - - s = strchr (path, ':'); - if (s == NULL) - s = path + strlen (path); - - filename = (char *) xmalloc (s - path + len + 2); - if (s == path) - sset = filename; - else - { - memcpy (filename, path, s - path); - filename[s - path] = '/'; - sset = filename + (s - path) + 1; - } - strcpy (sset, name); - - if (gld${EMULATION_NAME}_try_needed (filename, force)) - return true; - - free (filename); - - if (*s == '\0') - break; - path = s + 1; - } - - return false; -} - -/* This function is called for each possible name for a dynamic object - named by a DT_NEEDED entry. The FORCE parameter indicates whether - to skip the check for a conflicting version. */ - -static boolean -gld${EMULATION_NAME}_try_needed (name, force) - const char *name; - int force; -{ - bfd *abfd; - - abfd = bfd_openr (name, bfd_get_target (output_bfd)); - if (abfd == NULL) - return false; - if (! bfd_check_format (abfd, bfd_object)) - { - (void) bfd_close (abfd); - return false; - } - if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) - { - (void) bfd_close (abfd); - return false; - } - - /* Check whether this object would include any conflicting library - versions. If FORCE is set, then we skip this check; we use this - the second time around, if we couldn't find any compatible - instance of the shared library. */ - - if (! force) - { - struct bfd_link_needed_list *needed; - - if (! bfd_elf_get_bfd_needed_list (abfd, &needed)) - einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd); - - if (needed != NULL) - { - global_vercheck_needed = needed; - global_vercheck_failed = false; - lang_for_each_input_file (gld${EMULATION_NAME}_vercheck); - if (global_vercheck_failed) - { - (void) bfd_close (abfd); - /* Return false to force the caller to move on to try - another file on the search path. */ - return false; - } - - /* But wait! It gets much worse. On Linux, if a shared - library does not use libc at all, we are supposed to skip - it the first time around in case we encounter a shared - library later on with the same name which does use the - version of libc that we want. This is much too horrible - to use on any system other than Linux. */ - EOF -case ${target} in - *-*-linux-gnu*) - cat >>e${EMULATION_NAME}.c <<EOF - { - struct bfd_link_needed_list *l; - - for (l = needed; l != NULL; l = l->next) - if (strncmp (l->name, "libc.so", 7) == 0) - break; - if (l == NULL) - { - (void) bfd_close (abfd); - return false; - } - } +fi -EOF - ;; -esac cat >>e${EMULATION_NAME}.c <<EOF - } - } - - /* We've found a dynamic object matching the DT_NEEDED entry. */ - - /* We have already checked that there is no other input file of the - same name. We must now check again that we are not including the - same file twice. We need to do this because on many systems - libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will - reference libc.so.1. If we have already included libc.so, we - don't want to include libc.so.1 if they are the same file, and we - can only check that using stat. */ - if (bfd_stat (abfd, &global_stat) != 0) - einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); - global_found = false; - lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed); - if (global_found) - { - /* Return true to indicate that we found the file, even though - we aren't going to do anything with it. */ - return true; - } - - /* Tell the ELF backend that don't want the output file to have a - DT_NEEDED entry for this file. */ - bfd_elf_set_dt_needed_name (abfd, ""); - - /* Add this file into the symbol table. */ - if (! bfd_link_add_symbols (abfd, &link_info)) - einfo ("%F%B: could not read symbols: %E\n", abfd); - - return true; -} - -/* See if an input file matches a DT_NEEDED entry by name. */ +/* Look through an expression for an assignment statement. */ static void -gld${EMULATION_NAME}_check_needed (s) - lang_input_statement_type *s; +gld${EMULATION_NAME}_find_exp_assignment (exp) + etree_type *exp; { - if (global_found) - return; - - if (s->filename != NULL - && strcmp (s->filename, global_needed->name) == 0) - { - global_found = true; - return; - } + struct bfd_link_hash_entry *h; - if (s->the_bfd != NULL) + switch (exp->type.node_class) { - const char *soname; + case etree_provide: + h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, + false, false, false); + if (h == NULL) + break; - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname != NULL - && strcmp (soname, global_needed->name) == 0) - { - global_found = true; - return; - } - } - - if (s->search_dirs_flag - && s->filename != NULL - && strchr (global_needed->name, '/') == NULL) - { - const char *f; + /* We call record_link_assignment even if the symbol is defined. + This is because if it is defined by a dynamic object, we + actually want to use the value defined by the linker script, + not the value from the dynamic object (because we are setting + symbols like etext). If the symbol is defined by a regular + object, then, as it happens, calling record_link_assignment + will do no harm. */ - f = strrchr (s->filename, '/'); - if (f != NULL - && strcmp (f + 1, global_needed->name) == 0) + /* Fall through. */ + case etree_assign: + if (strcmp (exp->assign.dst, ".") != 0) { - global_found = true; - return; + if (! (bfd_elf${ELFSIZE}_record_link_assignment + (output_bfd, &link_info, exp->assign.dst, + exp->type.node_class == etree_provide ? true : false))) + einfo ("%P%F: failed to record assignment to %s: %E\n", + exp->assign.dst); } - } -} - -/* See if an input file matches a DT_NEEDED entry by running stat on - the file. */ + gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src); + break; -static void -gld${EMULATION_NAME}_stat_needed (s) - lang_input_statement_type *s; -{ - struct stat st; - const char *suffix; - const char *soname; - const char *f; + case etree_binary: + gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs); + gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs); + break; - if (global_found) - return; - if (s->the_bfd == NULL) - return; + case etree_trinary: + gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond); + gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs); + gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs); + break; - if (bfd_stat (s->the_bfd, &st) != 0) - { - einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd); - return; - } + case etree_unary: + gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child); + break; - if (st.st_dev == global_stat.st_dev - && st.st_ino == global_stat.st_ino) - { - global_found = true; - return; + default: + break; } - - /* We issue a warning if it looks like we are including two - different versions of the same shared library. For example, - there may be a problem if -lc picks up libc.so.6 but some other - shared library has a DT_NEEDED entry of libc.so.5. This is a - hueristic test, and it will only work if the name looks like - NAME.so.VERSION. FIXME: Depending on file names is error-prone. - If we really want to issue warnings about mixing version numbers - of shared libraries, we need to find a better way. */ - - if (strchr (global_needed->name, '/') != NULL) - return; - suffix = strstr (global_needed->name, ".so."); - if (suffix == NULL) - return; - suffix += sizeof ".so." - 1; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname == NULL) - soname = s->filename; - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; - - if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) - einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", - global_needed->name, global_needed->by, f); } -/* On Linux, it's possible to have different versions of the same - shared library linked against different versions of libc. The - dynamic linker somehow tags which libc version to use in - /etc/ld.so.cache, and, based on the libc that it sees in the - executable, chooses which version of the shared library to use. - - We try to do a similar check here by checking whether this shared - library needs any other shared libraries which may conflict with - libraries we have already included in the link. If it does, we - skip it, and try to find another shared library farther on down the - link path. - This is called via lang_for_each_input_file. - GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object - which we ar checking. This sets GLOBAL_VERCHECK_FAILED if we find - a conflicting version. */ +/* This is called by the before_allocation routine via + lang_for_each_statement. It locates any assignment statements, and + tells the ELF backend about them, in case they are assignments to + symbols which are referred to by dynamic objects. */ static void -gld${EMULATION_NAME}_vercheck (s) - lang_input_statement_type *s; +gld${EMULATION_NAME}_find_statement_assignment (s) + lang_statement_union_type *s; { - const char *soname, *f; - struct bfd_link_needed_list *l; - - if (global_vercheck_failed) - return; - if (s->the_bfd == NULL - || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0) - return; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname == NULL) - soname = bfd_get_filename (s->the_bfd); - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; - - for (l = global_vercheck_needed; l != NULL; l = l->next) - { - const char *suffix; - - if (strcmp (f, l->name) == 0) - { - /* Probably can't happen, but it's an easy check. */ - continue; - } - - if (strchr (l->name, '/') != NULL) - continue; - - suffix = strstr (l->name, ".so."); - if (suffix == NULL) - continue; + if (s->header.type == lang_assignment_statement_enum) + gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp); +} - suffix += sizeof ".so." - 1; +EOF - if (strncmp (f, l->name, suffix - l->name) == 0) - { - /* Here we know that S is a dynamic object FOO.SO.VER1, and - the object we are considering needs a dynamic object - FOO.SO.VER2, and VER1 and VER2 are different. This - appears to be a version mismatch, so we tell the caller - to try a different version of this library. */ - global_vercheck_failed = true; - return; - } - } -} +if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then +cat >>e${EMULATION_NAME}.c <<EOF /* This is called after the sections have been attached to output sections, but before any sizes or addresses have been set. */ @@ -791,76 +880,98 @@ gld${EMULATION_NAME}_before_allocation () } } -/* This is called by the before_allocation routine via - lang_for_each_statement. It locates any assignment statements, and - tells the ELF backend about them, in case they are assignments to - symbols which are referred to by dynamic objects. */ +EOF +fi -static void -gld${EMULATION_NAME}_find_statement_assignment (s) - lang_statement_union_type *s; -{ - if (s->header.type == lang_assignment_statement_enum) - gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp); -} +if test x"$LDEMUL_OPEN_DYNAMIC_ARCHIVE" != xgld"$EMULATION_NAME"_open_dynamic_archive; then +cat >>e${EMULATION_NAME}.c <<EOF -/* Look through an expression for an assignment statement. */ +/* Try to open a dynamic archive. This is where we know that ELF + dynamic libraries have an extension of .so (or .sl on oddball systems + like hpux). */ -static void -gld${EMULATION_NAME}_find_exp_assignment (exp) - etree_type *exp; +static boolean +gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) + const char *arch; + search_dirs_type *search; + lang_input_statement_type *entry; { - struct bfd_link_hash_entry *h; + const char *filename; + char *string; - switch (exp->type.node_class) + if (! entry->is_archive) + return false; + + filename = entry->filename; + + /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION + is defined, but it does not seem worth the headache to optimize + away those two bytes of space. */ + string = (char *) xmalloc (strlen (search->name) + + strlen (filename) + + strlen (arch) +#ifdef EXTRA_SHLIB_EXTENSION + + strlen (EXTRA_SHLIB_EXTENSION) +#endif + + sizeof "/lib.so"); + + sprintf (string, "%s/lib%s%s.so", search->name, filename, arch); + +#ifdef EXTRA_SHLIB_EXTENSION + /* Try the .so extension first. If that fails build a new filename + using EXTRA_SHLIB_EXTENSION. */ + if (! ldfile_try_open_bfd (string, entry)) + sprintf (string, "%s/lib%s%s%s", search->name, + filename, arch, EXTRA_SHLIB_EXTENSION); +#endif + + if (! ldfile_try_open_bfd (string, entry)) { - case etree_provide: - h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); - if (h == NULL) - break; + free (string); + return false; + } - /* We call record_link_assignment even if the symbol is defined. - This is because if it is defined by a dynamic object, we - actually want to use the value defined by the linker script, - not the value from the dynamic object (because we are setting - symbols like etext). If the symbol is defined by a regular - object, then, as it happens, calling record_link_assignment - will do no harm. */ + entry->filename = string; - /* Fall through. */ - case etree_assign: - if (strcmp (exp->assign.dst, ".") != 0) - { - if (! (bfd_elf${ELFSIZE}_record_link_assignment - (output_bfd, &link_info, exp->assign.dst, - exp->type.node_class == etree_provide ? true : false))) - einfo ("%P%F: failed to record assignment to %s: %E\n", - exp->assign.dst); - } - gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src); - break; + /* We have found a dynamic object to include in the link. The ELF + backend linker will create a DT_NEEDED entry in the .dynamic + section naming this file. If this file includes a DT_SONAME + entry, it will be used. Otherwise, the ELF linker will just use + the name of the file. For an archive found by searching, like + this one, the DT_NEEDED entry should consist of just the name of + the file, without the path information used to find it. Note + that we only need to do this if we have a dynamic object; an + archive will never be referenced by a DT_NEEDED entry. - case etree_binary: - gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs); - gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs); - break; + FIXME: This approach--using bfd_elf_set_dt_needed_name--is not + very pretty. I haven't been able to think of anything that is + pretty, though. */ + if (bfd_check_format (entry->the_bfd, bfd_object) + && (entry->the_bfd->flags & DYNAMIC) != 0) + { + char *needed_name; - case etree_trinary: - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond); - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs); - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs); - break; + ASSERT (entry->is_archive && entry->search_dirs_flag); - case etree_unary: - gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child); - break; + /* Rather than duplicating the logic above. Just use the + filename we recorded earlier. - default: - break; + First strip off everything before the last '/'. */ + filename = strrchr (entry->filename, '/'); + filename++; + + needed_name = (char *) xmalloc (strlen (filename) + 1); + strcpy (needed_name, filename); + bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); } + + return true; } +EOF +fi +cat >>e${EMULATION_NAME}.c <<EOF + /* A variant of lang_output_section_find. Used by place_orphan. */ static lang_output_section_statement_type * @@ -884,6 +995,11 @@ output_rel_find () return (lang_output_section_statement_type *) NULL; } +EOF + +if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then +cat >>e${EMULATION_NAME}.c <<EOF + /* Place an orphan section. We use this to put random SHF_ALLOC sections in the right segment. */ @@ -904,6 +1020,8 @@ gld${EMULATION_NAME}_place_orphan (file, s) static struct orphan_save hold_bss; static struct orphan_save hold_rel; static struct orphan_save hold_interp; + static struct orphan_save hold_sdata; + static int count = 1; struct orphan_save *place; lang_statement_list_type *old; lang_statement_list_type add; @@ -915,16 +1033,20 @@ gld${EMULATION_NAME}_place_orphan (file, s) secname = bfd_get_section_name (s->owner, s); - /* Look through the script to see where to place this section. */ - os = lang_output_section_find (secname); - - if (os != NULL - && os->bfd_section != NULL - && ((s->flags ^ os->bfd_section->flags) & (SEC_LOAD | SEC_ALLOC)) == 0) + if (! config.unique_orphan_sections && ! unique_section_p (secname)) { - /* We have already placed a section with this name. */ - wild_doit (&os->children, s, os, file); - return true; + /* Look through the script to see where to place this section. */ + os = lang_output_section_find (secname); + + if (os != NULL + && os->bfd_section != NULL + && ((s->flags ^ os->bfd_section->flags) + & (SEC_LOAD | SEC_ALLOC)) == 0) + { + /* We have already placed a section with this name. */ + wild_doit (&os->children, s, os, file); + return true; + } } if (hold_text.os == NULL) @@ -956,12 +1078,15 @@ gld${EMULATION_NAME}_place_orphan (file, s) if ((s->flags & SEC_ALLOC) == 0) ; else if ((s->flags & SEC_LOAD) != 0 - && strncmp (secname, ".note", 4) == 0 + && strncmp (secname, ".note", 5) == 0 && HAVE_SECTION (hold_interp, ".interp")) place = &hold_interp; else if ((s->flags & SEC_HAS_CONTENTS) == 0 && HAVE_SECTION (hold_bss, ".bss")) place = &hold_bss; + else if ((s->flags & SEC_SMALL_DATA) != 0 + && HAVE_SECTION (hold_sdata, ".sdata")) + place = &hold_sdata; else if ((s->flags & SEC_READONLY) == 0 && HAVE_SECTION (hold_data, ".data")) place = &hold_data; @@ -980,26 +1105,15 @@ gld${EMULATION_NAME}_place_orphan (file, s) /* Choose a unique name for the section. This will be needed if the same section name appears in the input file with different - loadable or allocateable characteristics. */ + loadable or allocatable characteristics. */ outsecname = secname; if (bfd_get_section_by_name (output_bfd, outsecname) != NULL) { - unsigned int len; - char *newname; - unsigned int i; - - len = strlen (outsecname); - newname = xmalloc (len + 5); - strcpy (newname, outsecname); - i = 0; - do - { - sprintf (newname + len, "%d", i); - ++i; - } - while (bfd_get_section_by_name (output_bfd, newname) != NULL); - - outsecname = newname; + outsecname = bfd_get_unique_section_name (output_bfd, + outsecname, + &count); + if (outsecname == NULL) + einfo ("%F%P: place_orphan failed: %E\n"); } /* Start building a list of statements for this section. @@ -1140,8 +1254,14 @@ gld${EMULATION_NAME}_place_orphan (file, s) return true; } +EOF +fi + +if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then +cat >>e${EMULATION_NAME}.c <<EOF + static char * -gld${EMULATION_NAME}_get_script(isfile) +gld${EMULATION_NAME}_get_script (isfile) int *isfile; EOF @@ -1153,7 +1273,7 @@ then sc="-f stringify.sed" cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 0; if (link_info.relocateable == true && config.build_constructors == true) @@ -1180,7 +1300,7 @@ else # Scripts read from the filesystem. cat >>e${EMULATION_NAME}.c <<EOF -{ +{ *isfile = 1; if (link_info.relocateable == true && config.build_constructors == true) @@ -1196,51 +1316,226 @@ cat >>e${EMULATION_NAME}.c <<EOF else return "ldscripts/${EMULATION_NAME}.x"; } + EOF +fi +fi + +if test -n "$PARSE_AND_LIST_ARGS_CASES" -o x"$GENERATE_SHLIB_SCRIPT" = xyes; then +if test x"$LDEMUL_PARSE_ARGS" != xgld"$EMULATION_NAME"_parse_args; then + +if test -n "$PARSE_AND_LIST_PROLOGUE" ; then +cat >>e${EMULATION_NAME}.c <<EOF + $PARSE_AND_LIST_PROLOGUE +EOF fi -if test -n "$PARSE_AND_LIST_ARGS" ; then cat >>e${EMULATION_NAME}.c <<EOF -static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); -static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE * file)); - $PARSE_AND_LIST_ARGS +#include "getopt.h" + +#define OPTION_DISABLE_NEW_DTAGS (400) +#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1) + +static struct option longopts[] = +{ +EOF + +if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then +cat >>e${EMULATION_NAME}.c <<EOF + /* getopt allows abbreviations, so we do this to stop it from + treating -d/-e as abbreviations for these options. */ + {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS}, + {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS}, + {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS}, + {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS}, EOF -else +fi +if test -n "$PARSE_AND_LIST_LONGOPTS" ; then cat >>e${EMULATION_NAME}.c <<EOF -#define gld_${EMULATION_NAME}_parse_args NULL -#define gld_${EMULATION_NAME}_list_options NULL + $PARSE_AND_LIST_LONGOPTS EOF +fi + +cat >>e${EMULATION_NAME}.c <<EOF + {NULL, no_argument, NULL, 0} +}; + +static int gld${EMULATION_NAME}_parse_args PARAMS ((int, char **)); + +static int +gld${EMULATION_NAME}_parse_args (argc, argv) + int argc; + char ** argv; +{ + int longind; + int optc; + static int prevoptind = -1; + int prevopterr = opterr; + int wanterror; + + if (prevoptind != optind) + opterr = 0; + + wanterror = opterr; + prevoptind = optind; + + optc = getopt_long_only (argc, argv, + "-${PARSE_AND_LIST_SHORTOPTS}z:", longopts, + &longind); + opterr = prevopterr; + + switch (optc) + { + default: + if (wanterror) + xexit (1); + optind = prevoptind; + return 0; + +EOF + +if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then +cat >>e${EMULATION_NAME}.c <<EOF + case OPTION_DISABLE_NEW_DTAGS: + link_info.new_dtags = false; + break; + + case OPTION_ENABLE_NEW_DTAGS: + link_info.new_dtags = true; + break; + + case 'z': + if (strcmp (optarg, "initfirst") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST; + else if (strcmp (optarg, "interpose") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_INTERPOSE; + else if (strcmp (optarg, "loadfltr") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_LOADFLTR; + else if (strcmp (optarg, "nodefaultlib") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_NODEFLIB; + else if (strcmp (optarg, "nodelete") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_NODELETE; + else if (strcmp (optarg, "nodlopen") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_NOOPEN; + else if (strcmp (optarg, "nodump") == 0) + link_info.flags_1 |= (bfd_vma) DF_1_NODUMP; + else if (strcmp (optarg, "now") == 0) + { + link_info.flags |= (bfd_vma) DF_BIND_NOW; + link_info.flags_1 |= (bfd_vma) DF_1_NOW; + } + else if (strcmp (optarg, "origin") == 0) + { + link_info.flags |= (bfd_vma) DF_ORIGIN; + link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN; + } + /* What about the other Solaris -z options? FIXME. */ + break; +EOF +fi + +if test -n "$PARSE_AND_LIST_ARGS_CASES" ; then +cat >>e${EMULATION_NAME}.c <<EOF + $PARSE_AND_LIST_ARGS_CASES +EOF +fi + +cat >>e${EMULATION_NAME}.c <<EOF + } + + return 1; +} + +EOF +fi + +if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then +cat >>e${EMULATION_NAME}.c <<EOF + +static void gld${EMULATION_NAME}_list_options PARAMS ((FILE * file)); + +static void +gld${EMULATION_NAME}_list_options (file) + FILE * file; +{ +EOF + +if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then +cat >>e${EMULATION_NAME}.c <<EOF + fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n")); + fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n")); + fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n")); + fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n")); + fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n")); + fprintf (file, _(" -z nodefaultlib\tMark object not to use default search paths\n")); + fprintf (file, _(" -z nodelete\t\tMark DSO non-deletable at runtime\n")); + fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n")); + fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n")); + fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n")); + fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n")); + fprintf (file, _("\t\t\t at runtime\n")); + fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n")); +EOF +fi + +if test -n "$PARSE_AND_LIST_OPTIONS" ; then +cat >>e${EMULATION_NAME}.c <<EOF + $PARSE_AND_LIST_OPTIONS +EOF +fi + +cat >>e${EMULATION_NAME}.c <<EOF +} +EOF + +if test -n "$PARSE_AND_LIST_EPILOGUE" ; then +cat >>e${EMULATION_NAME}.c <<EOF + $PARSE_AND_LIST_EPILOGUE +EOF +fi +fi +else +if test x"$LDEMUL_PARSE_ARGS" != xgld"$EMULATION_NAME"_parse_args; then +cat >>e${EMULATION_NAME}.c <<EOF +#define gld${EMULATION_NAME}_parse_args NULL +EOF +fi +if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then +cat >>e${EMULATION_NAME}.c <<EOF +#define gld${EMULATION_NAME}_list_options NULL +EOF +fi fi cat >>e${EMULATION_NAME}.c <<EOF -struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = +struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { - gld${EMULATION_NAME}_before_parse, - syslib_default, - hll_default, - after_parse_default, - gld${EMULATION_NAME}_after_open, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - gld${EMULATION_NAME}_before_allocation, - gld${EMULATION_NAME}_get_script, + ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse}, + ${LDEMUL_SYSLIB-syslib_default}, + ${LDEMUL_HLL-hll_default}, + ${LDEMUL_AFTER_PARSE-after_parse_default}, + ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open}, + ${LDEMUL_AFTER_ALLOCATION-after_allocation_default}, + ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default}, + ${LDEMUL_CHOOSE_TARGET-ldemul_default_target}, + ${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation}, + ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script}, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, /* finish */ - NULL, /* create output section statements */ - gld${EMULATION_NAME}_open_dynamic_archive, - gld${EMULATION_NAME}_place_orphan, - NULL, /* set_symbols */ - gld_${EMULATION_NAME}_parse_args, - NULL, /* unrecognized_file */ - gld_${EMULATION_NAME}_list_options, - NULL, /* recognized_file */ - NULL /* find_potential_libraries */ + ${LDEMUL_FINISH-NULL}, + ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL}, + ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive}, + ${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan}, + ${LDEMUL_SET_SYMBOLS-NULL}, + ${LDEMUL_PARSE_ARGS-gld${EMULATION_NAME}_parse_args}, + ${LDEMUL_UNRECOGNIZED_FILE-NULL}, + ${LDEMUL_LIST_OPTIONS-gld${EMULATION_NAME}_list_options}, + ${LDEMUL_RECOGNIZED_FILE-NULL}, + ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL}, }; EOF diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em index 6635e09..f96323e 100644 --- a/contrib/binutils/ld/emultempl/generic.em +++ b/contrib/binutils/ld/emultempl/generic.em @@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 1999 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 94, 95, 96, 99, 2000 + Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -31,10 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" +#include "ldexp.h" +#include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" + static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em index dfa855e..31d816d 100644 --- a/contrib/binutils/ld/emultempl/linux.em +++ b/contrib/binutils/ld/emultempl/linux.em @@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Linux a.out emulation code for ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 94, 95, 96, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> Linux support by Eric Youngdale <ericy@cais.cais.com> @@ -32,11 +33,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldmain.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static boolean gld${EMULATION_NAME}_open_dynamic_archive diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em index d13bb40..fcbf835 100644 --- a/contrib/binutils/ld/emultempl/pe.em +++ b/contrib/binutils/ld/emultempl/pe.em @@ -37,11 +37,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ldgram.h" #include "ldexp.h" #include "ldlang.h" +#include "ldfile.h" #include "ldemul.h" #include "ldlex.h" #include "ldmisc.h" #include "ldctor.h" -#include "ldfile.h" #include "coff/internal.h" /* FIXME: This is a BFD internal header file, and we should not be @@ -102,11 +102,11 @@ static void gld_${EMULATION_NAME}_after_parse PARAMS ((void)); static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void)); static boolean gld_${EMULATION_NAME}_place_orphan PARAMS ((lang_input_statement_type *, asection *)); -static void gld${EMULATION_NAME}_place_section - PARAMS ((lang_statement_union_type *)); static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *)); static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); static void gld_${EMULATION_NAME}_finish PARAMS ((void)); +static boolean gld_${EMULATION_NAME}_open_dynamic_archive + PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); static struct internal_extra_pe_aouthdr pe; static int dll; @@ -114,10 +114,12 @@ static int support_old_code = 0; static char * thumb_entry_symbol = NULL; static lang_assignment_statement_type *image_base_statement = 0; -static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */ #ifdef DLL_SUPPORT -static char *pe_out_def_filename = 0; -static char *pe_implib_filename = 0; +static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */ +static char *pe_out_def_filename = NULL; +static char *pe_implib_filename = NULL; +static int pe_enable_auto_image_base = 0; +static char *pe_dll_search_prefix = NULL; #endif extern const char *output_filename; @@ -169,9 +171,12 @@ gld_${EMULATION_NAME}_before_parse() #define OPTION_THUMB_ENTRY (OPTION_IMPLIB_FILENAME + 1) #define OPTION_WARN_DUPLICATE_EXPORTS (OPTION_THUMB_ENTRY + 1) #define OPTION_IMP_COMPAT (OPTION_WARN_DUPLICATE_EXPORTS + 1) +#define OPTION_ENABLE_AUTO_IMAGE_BASE (OPTION_IMP_COMPAT + 1) +#define OPTION_DISABLE_AUTO_IMAGE_BASE (OPTION_ENABLE_AUTO_IMAGE_BASE + 1) +#define OPTION_DLL_SEARCH_PREFIX (OPTION_DISABLE_AUTO_IMAGE_BASE + 1) +#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_DLL_SEARCH_PREFIX + 1) -static struct option longopts[] = -{ +static struct option longopts[] = { /* PE options */ {"base-file", required_argument, NULL, OPTION_BASE_FILE}, {"dll", no_argument, NULL, OPTION_DLL}, @@ -203,6 +208,10 @@ static struct option longopts[] = {"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME}, {"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS}, {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT}, + {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE}, + {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE}, + {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX}, + {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES}, #endif {NULL, no_argument, NULL, 0} }; @@ -282,6 +291,12 @@ gld_${EMULATION_NAME}_list_options (file) fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n")); fprintf (file, _(" --compat-implib Create backward compatible import libs;\n")); fprintf (file, _(" create __imp_<SYMBOL> as well.\n")); + fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n")); + fprintf (file, _(" unless user specifies one\n")); + fprintf (file, _(" --disable-auto-image-base Do not auto-choose image base. (default)\n")); + fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll witout an\n")); + fprintf (file, _(" importlib, use <string><basename>.dll \n")); + fprintf (file, _(" in preference to lib<basename>.dll \n")); #endif } @@ -540,11 +555,57 @@ gld_${EMULATION_NAME}_parse_args(argc, argv) case OPTION_IMP_COMPAT: pe_dll_compat_implib = 1; break; + case OPTION_ENABLE_AUTO_IMAGE_BASE: + pe_enable_auto_image_base = 1; + break; + case OPTION_DISABLE_AUTO_IMAGE_BASE: + pe_enable_auto_image_base = 0; + break; + case OPTION_DLL_SEARCH_PREFIX: + pe_dll_search_prefix = xstrdup( optarg ); + break; + case OPTION_NO_DEFAULT_EXCLUDES: + pe_dll_do_default_excludes = 0; + break; #endif } return 1; } + +#ifdef DLL_SUPPORT +static unsigned long +strhash (const char *str) +{ + const unsigned char *s; + unsigned long hash; + unsigned int c; + unsigned int len; + + hash = 0; + len = 0; + s = (const unsigned char *) str; + while ((c = *s++) != '\0') + { + hash += c + (c << 17); + hash ^= hash >> 2; + ++len; + } + hash += len + (len << 17); + hash ^= hash >> 2; + + return hash; +} + +/* Use the output file to create a image base for relocatable DLLs. */ +static unsigned long +compute_dll_image_base (const char *ofile) +{ + unsigned long hash = strhash (ofile); + return 0x60000000 | ((hash << 16) & 0x0FFC0000); +} +#endif + /* Assign values to the special symbols before the linker script is read. */ @@ -561,7 +622,12 @@ gld_${EMULATION_NAME}_set_symbols () if (link_info.relocateable) init[IMAGEBASEOFF].value = 0; else if (init[DLLOFF].value || link_info.shared) +#ifdef DLL_SUPPORT + init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ? + compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE; +#else init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE; +#endif else init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE; } @@ -626,6 +692,7 @@ gld_${EMULATION_NAME}_after_parse () ldlang_add_undef (entry_symbol); } +#ifdef DLL_SUPPORT static struct bfd_link_hash_entry *pe_undef_found_sym; static boolean @@ -644,7 +711,6 @@ pe_undef_cdecl_match (h, string) return true; } -#ifdef DLL_SUPPORT static void pe_fixup_stdcalls () { @@ -761,6 +827,116 @@ gld_${EMULATION_NAME}_after_open () #endif { + /* This next chunk of code tries to detect the case where you have + two import libraries for the same DLL (specifically, + symbolically linking libm.a and libc.a in cygwin to + libcygwin.a). In those cases, it's possible for function + thunks from the second implib to be used but without the + head/tail objects, causing an improper import table. We detect + those cases and rename the "other" import libraries to match + the one the head/tail come from, so that the linker will sort + things nicely and produce a valid import table. */ + + LANG_FOR_EACH_INPUT_STATEMENT (is) + { + if (is->the_bfd->my_archive) + { + int idata2 = 0, reloc_count=0, is_imp = 0; + asection *sec; + + /* See if this is an import library thunk. */ + for (sec = is->the_bfd->sections; sec; sec = sec->next) + { + if (strcmp (sec->name, ".idata\$2") == 0) + idata2 = 1; + if (strncmp (sec->name, ".idata\$", 7) == 0) + is_imp = 1; + reloc_count += sec->reloc_count; + } + + if (is_imp && !idata2 && reloc_count) + { + /* It is, look for the reference to head and see if it's + from our own library. */ + for (sec = is->the_bfd->sections; sec; sec = sec->next) + { + int i; + long symsize; + long relsize; + asymbol **symbols; + arelent **relocs; + int nrelocs; + + symsize = bfd_get_symtab_upper_bound (is->the_bfd); + if (symsize < 1) + break; + relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec); + if (relsize < 1) + break; + + symbols = (asymbol **) xmalloc (symsize); + symsize = bfd_canonicalize_symtab (is->the_bfd, symbols); + if (symsize < 0) + { + einfo ("%X%P: unable to process symbols: %E"); + return; + } + + relocs = (arelent **) xmalloc ((size_t) relsize); + nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec, + relocs, symbols); + if (nrelocs < 0) + { + free (relocs); + einfo ("%X%P: unable to process relocs: %E"); + return; + } + + for (i = 0; i < nrelocs; i++) + { + struct symbol_cache_entry *s; + struct bfd_link_hash_entry * blhe; + bfd *other_bfd; + char *n; + + s = (relocs[i]->sym_ptr_ptr)[0]; + + if (s->flags & BSF_LOCAL) + continue; + + /* Thunk section with reloc to another bfd. */ + blhe = bfd_link_hash_lookup (link_info.hash, + s->name, + false, false, true); + + if (blhe == NULL + || blhe->type != bfd_link_hash_defined) + continue; + + other_bfd = blhe->u.def.section->owner; + + if (strcmp (is->the_bfd->my_archive->filename, + other_bfd->my_archive->filename) == 0) + continue; + + /* Rename this implib to match the other. */ + n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1); + + strcpy (n, other_bfd->my_archive->filename); + + is->the_bfd->my_archive->filename = n; + } + + free (relocs); + /* Note - we do not free the symbols, + they are now cached in the BFD. */ + } + } + } + } + } + + { int is_ms_arch = 0; bfd *cur_arch = 0; lang_input_statement_type *is2; @@ -816,7 +992,7 @@ gld_${EMULATION_NAME}_after_open () sprintf (new_name, "%s.%c", is->the_bfd->filename, seq); is->the_bfd->filename = new_name; - new_name = xmalloc (strlen(is->filename) + 3); + new_name = xmalloc (strlen (is->filename) + 3); sprintf (new_name, "%s.%c", is->filename, seq); is->filename = new_name; } @@ -870,10 +1046,10 @@ gld_${EMULATION_NAME}_before_allocation() #endif /* TARGET_IS_armpe */ } - +#ifdef DLL_SUPPORT /* This is called when an input file isn't recognized as a BFD. We check here for .DEF files and pull them in automatically. */ -#ifdef DLL_SUPPORT + static int saw_option(char *option) { @@ -883,7 +1059,7 @@ saw_option(char *option) return init[i].inited; return 0; } -#endif +#endif /* DLL_SUPPORT */ static boolean gld_${EMULATION_NAME}_unrecognized_file(entry) @@ -1049,6 +1225,7 @@ gld_${EMULATION_NAME}_finish () pe_dll_generate_implib (pe_def_file, pe_implib_filename); } #if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe) + /* ARM doesn't need relocs. */ else { pe_exe_fill_sections (output_bfd, &link_info); @@ -1057,7 +1234,7 @@ gld_${EMULATION_NAME}_finish () if (pe_out_def_filename) pe_dll_generate_def_file (pe_out_def_filename); -#endif +#endif /* DLL_SUPPORT */ } @@ -1074,16 +1251,12 @@ gld_${EMULATION_NAME}_finish () default linker script using wildcards, and are sorted by sort_sections. */ -static asection *hold_section; -static char *hold_section_name; -static lang_output_section_statement_type *hold_use; -static lang_output_section_statement_type *hold_text; -static lang_output_section_statement_type *hold_rdata; -static lang_output_section_statement_type *hold_data; -static lang_output_section_statement_type *hold_bss; - -/* Place an orphan section. We use this to put random SHF_ALLOC - sections in the right segment. */ +struct orphan_save +{ + lang_output_section_statement_type *os; + asection **section; + lang_statement_union_type **stmt; +}; /*ARGSUSED*/ static boolean @@ -1092,17 +1265,16 @@ gld_${EMULATION_NAME}_place_orphan (file, s) asection *s; { const char *secname; + char *hold_section_name; char *dollar = NULL; - - if ((s->flags & SEC_ALLOC) == 0) - return false; + const char *ps = NULL; + lang_output_section_statement_type *os; + lang_statement_list_type add_child; secname = bfd_get_section_name (s->owner, s); /* Look through the script to see where to place this section. */ - hold_section = s; - hold_section_name = xstrdup (secname); if (!link_info.relocateable) { @@ -1111,34 +1283,51 @@ gld_${EMULATION_NAME}_place_orphan (file, s) *dollar = '\0'; } - hold_use = NULL; - lang_for_each_statement (gld${EMULATION_NAME}_place_section); + os = lang_output_section_find (hold_section_name); - if (hold_use == NULL) + lang_list_init (&add_child); + + if (os != NULL + && os->bfd_section != NULL + && ((s->flags ^ os->bfd_section->flags) & (SEC_LOAD | SEC_ALLOC)) == 0) + { + wild_doit (&add_child, s, os, file); + } + else { - lang_output_section_statement_type *place; + struct orphan_save *place; + static struct orphan_save hold_text; + static struct orphan_save hold_rdata; + static struct orphan_save hold_data; + static struct orphan_save hold_bss; char *outsecname; - asection *snew, **pps; lang_statement_list_type *old; lang_statement_list_type add; etree_type *address; /* Try to put the new output section in a reasonable place based on the section name and section flags. */ +#define HAVE_SECTION(hold, name) \ +(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL) + place = NULL; - if ((s->flags & SEC_HAS_CONTENTS) == 0 - && hold_bss != NULL) - place = hold_bss; + if ((s->flags & SEC_ALLOC) == 0) + ; + else if ((s->flags & SEC_HAS_CONTENTS) == 0 + && HAVE_SECTION (hold_bss, ".bss")) + place = &hold_bss; else if ((s->flags & SEC_READONLY) == 0 - && hold_data != NULL) - place = hold_data; + && HAVE_SECTION (hold_data, ".data")) + place = &hold_data; else if ((s->flags & SEC_CODE) == 0 && (s->flags & SEC_READONLY) != 0 - && hold_rdata != NULL) - place = hold_rdata; + && HAVE_SECTION (hold_rdata, ".rdata")) + place = &hold_rdata; else if ((s->flags & SEC_READONLY) != 0 - && hold_text != NULL) - place = hold_text; + && HAVE_SECTION (hold_text, ".text")) + place = &hold_text; + +#undef HAVE_SECTION /* Choose a unique name for the section. This will be needed if the same section name appears in the input file with @@ -1165,32 +1354,33 @@ gld_${EMULATION_NAME}_place_orphan (file, s) outsecname = newname; } - /* We don't want to free OUTSECNAME, as it may get attached to - the output section statement. */ - - /* Create the section in the output file, and put it in the - right place. This shuffling is to make the output file look - neater. */ - snew = bfd_make_section (output_bfd, outsecname); - if (snew == NULL) - einfo ("%P%F: output format %s cannot represent section called %s\n", - output_bfd->xvec->name, outsecname); - if (place != NULL && place->bfd_section != NULL) - { - for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) - ; - *pps = snew->next; - snew->next = place->bfd_section->next; - place->bfd_section->next = snew; - } - /* Start building a list of statements for this section. */ old = stat_ptr; stat_ptr = &add; lang_list_init (stat_ptr); - if (link_info.relocateable) - address = NULL; + if (config.build_constructors) + { + /* If the name of the section is representable in C, then create + symbols to mark the start and the end of the section. */ + for (ps = outsecname; *ps != '\0'; ps++) + if (! isalnum ((unsigned char) *ps) && *ps != '_') + break; + if (*ps == '\0') + { + char *symname; + etree_type *e_align; + + symname = (char *) xmalloc (ps - outsecname + sizeof "___start_"); + sprintf (symname, "___start_%s", outsecname); + e_align = exp_unop (ALIGN_K, + exp_intop ((bfd_vma) 1 << s->alignment_power)); + lang_add_assignment (exp_assop ('=', symname, e_align)); + } + } + + if (link_info.relocateable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0) + address = exp_intop ((bfd_vma) 0); else { /* All sections in an executable must be aligned to a page @@ -1199,105 +1389,226 @@ gld_${EMULATION_NAME}_place_orphan (file, s) exp_nameop (NAME, "__section_alignment__")); } - lang_enter_output_section_statement (outsecname, address, 0, - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, - (etree_type *) NULL); + os = lang_enter_output_section_statement (outsecname, address, 0, + (bfd_vma) 0, + (etree_type *) NULL, + (etree_type *) NULL, + (etree_type *) NULL); - hold_use = lang_output_section_statement_lookup (outsecname); + wild_doit (&add_child, s, os, file); lang_leave_output_section_statement ((bfd_vma) 0, "*default*", - (struct lang_output_section_phdr_list *) NULL, - "*default*"); + (struct lang_output_section_phdr_list *) NULL, "*default*"); - /* Now stick the new statement list right after PLACE. */ - if (place != NULL) - { - *add.tail = place->header.next; - place->header.next = add.head; + if (config.build_constructors && *ps == '\0') + { + char *symname; + + /* lang_leave_ouput_section_statement resets stat_ptr. Put + stat_ptr back where we want it. */ + if (place != NULL) + stat_ptr = &add; + + symname = (char *) xmalloc (ps - outsecname + sizeof "___stop_"); + sprintf (symname, "___stop_%s", outsecname); + lang_add_assignment (exp_assop ('=', symname, + exp_nameop (NAME, "."))); } stat_ptr = old; - } - - if (dollar == NULL) - wild_doit (&hold_use->children, s, hold_use, file); - else - { - lang_statement_union_type **pl; - boolean found_dollar; - lang_statement_list_type list; - - /* The section name has a '$'. Sort it with the other '$' - sections. */ - found_dollar = false; - for (pl = &hold_use->children.head; *pl != NULL; pl = &(*pl)->next) + if (place != NULL) { - lang_input_section_type *ls; - const char *lname; + asection *snew, **pps; + + snew = os->bfd_section; + if (place->os->bfd_section != NULL || place->section != NULL) + { + /* Shuffle the section to make the output file look neater. */ + if (place->section == NULL) + { +#if 0 + /* Finding the end of the list is a little tricky. We + make a wild stab at it by comparing section flags. */ + flagword first_flags = place->os->bfd_section->flags; + for (pps = &place->os->bfd_section->next; + *pps != NULL && (*pps)->flags == first_flags; + pps = &(*pps)->next) + ; + place->section = pps; +#else + /* Put orphans after the first section on the list. */ + place->section = &place->os->bfd_section->next; +#endif + } - if ((*pl)->header.type != lang_input_section_enum) - continue; + /* Unlink the section. */ + for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) + ; + *pps = snew->next; - ls = &(*pl)->input_section; + /* Now tack it on to the "place->os" section list. */ + snew->next = *place->section; + *place->section = snew; + } + place->section = &snew->next; /* Save the end of this list. */ - lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section); - if (strchr (lname, '$') == NULL) + if (place->stmt == NULL) { - if (found_dollar) - break; + /* Put the new statement list right at the head. */ + *add.tail = place->os->header.next; + place->os->header.next = add.head; } else { - found_dollar = true; - if (strcmp (secname, lname) < 0) - break; + /* Put it after the last orphan statement we added. */ + *add.tail = *place->stmt; + *place->stmt = add.head; } - } - - lang_list_init (&list); - wild_doit (&list, s, hold_use, file); - if (list.head != NULL) - { - ASSERT (list.head->next == NULL); - list.head->next = *pl; - *pl = list.head; + place->stmt = add.tail; /* Save the end of this list. */ } } + { + lang_statement_union_type **pl = &os->children.head; + + if (dollar != NULL) + { + boolean found_dollar; + + /* The section name has a '$'. Sort it with the other '$' + sections. */ + + found_dollar = false; + for ( ; *pl != NULL; pl = &(*pl)->next) + { + lang_input_section_type *ls; + const char *lname; + + if ((*pl)->header.type != lang_input_section_enum) + continue; + + ls = &(*pl)->input_section; + + lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section); + if (strchr (lname, '$') == NULL) + { + if (found_dollar) + break; + } + else + { + found_dollar = true; + if (strcmp (secname, lname) < 0) + break; + } + } + } + + if (add_child.head != NULL) + { + add_child.head->next = *pl; + *pl = add_child.head; + } + } + free (hold_section_name); return true; } -static void -gld${EMULATION_NAME}_place_section (s) - lang_statement_union_type *s; +static boolean +gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) + const char * arch ATTRIBUTE_UNUSED; + search_dirs_type * search; + lang_input_statement_type * entry; { - lang_output_section_statement_type *os; + const char * filename; + char * string; - if (s->header.type != lang_output_section_statement_enum) - return; + if (! entry->is_archive) + return false; - os = &s->output_section_statement; + filename = entry->filename; - if (strcmp (os->name, hold_section_name) == 0 - && os->bfd_section != NULL - && ((hold_section->flags & (SEC_LOAD | SEC_ALLOC)) - == (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC)))) - hold_use = os; - - if (strcmp (os->name, ".text") == 0) - hold_text = os; - else if (strcmp (os->name, ".rdata") == 0) - hold_rdata = os; - else if (strcmp (os->name, ".data") == 0) - hold_data = os; - else if (strcmp (os->name, ".bss") == 0) - hold_bss = os; + string = (char *) xmalloc (strlen (search->name) + + strlen (filename) + + sizeof "/lib.a.dll" +#ifdef DLL_SUPPORT + + (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0) +#endif + + 1); + + /* Try "libfoo.dll.a" first (preferred explicit import library for dll's */ + sprintf (string, "%s/lib%s.dll.a", search->name, filename); + + if (! ldfile_try_open_bfd (string, entry)) + { + /* Try "foo.dll.a" next (alternate explicit import library for dll's */ + sprintf (string, "%s/%s.dll.a", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { +/* + Try libfoo.a next. Normally, this would be interpreted as a static + library, but it *could* be an import library. For backwards compatibility, + libfoo.a needs to ==precede== libfoo.dll and foo.dll in the search, + or sometimes errors occur when building legacy packages. + + Putting libfoo.a here means that in a failure case (i.e. the library + -lfoo is not found) we will search for libfoo.a twice before + giving up -- once here, and once when searching for a "static" lib. + for a "static" lib. +*/ + /* Try "libfoo.a" (import lib, or static lib, but must + take precedence over dll's) */ + sprintf (string, "%s/lib%s.a", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { +#ifdef DLL_SUPPORT + if (pe_dll_search_prefix) + { + /* Try "<prefix>foo.dll" (preferred dll name, if specified) */ + sprintf (string, "%s/%s%s.dll", search->name, pe_dll_search_prefix, filename); + if (! ldfile_try_open_bfd (string, entry)) + { + /* Try "libfoo.dll" (default preferred dll name) */ + sprintf (string, "%s/lib%s.dll", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { + /* Finally, try "foo.dll" (alternate dll name) */ + sprintf (string, "%s/%s.dll", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { + free (string); + return false; + } + } + } + } + else /* pe_dll_search_prefix not specified */ +#endif + { + /* Try "libfoo.dll" (preferred dll name) */ + sprintf (string, "%s/lib%s.dll", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { + /* Finally, try "foo.dll" (alternate dll name) */ + sprintf (string, "%s/%s.dll", search->name, filename); + if (! ldfile_try_open_bfd (string, entry)) + { + free (string); + return false; + } + } + } + } + } + } + + entry->filename = string; + + return true; } static int @@ -1353,7 +1664,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = "${OUTPUT_FORMAT}", gld_${EMULATION_NAME}_finish, /* finish */ NULL, /* create output section statements */ - NULL, /* open dynamic archive */ + gld_${EMULATION_NAME}_open_dynamic_archive, gld_${EMULATION_NAME}_place_orphan, gld_${EMULATION_NAME}_set_symbols, gld_${EMULATION_NAME}_parse_args, diff --git a/contrib/binutils/ld/emultempl/ticoff.em b/contrib/binutils/ld/emultempl/ticoff.em new file mode 100644 index 0000000..a2ab4db --- /dev/null +++ b/contrib/binutils/ld/emultempl/ticoff.em @@ -0,0 +1,202 @@ +# This shell script emits a C file. -*- C -*- +# It does some substitutions. +(echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) +cat >>e${EMULATION_NAME}.c <<EOF +/* This file is part of GLD, the Gnu Linker. + Copyright 1999, 2000 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* For TI COFF */ +/* Need to determine load and run pages for output sections */ + +#define TARGET_IS_${EMULATION_NAME} + +#include "bfd.h" +#include "sysdep.h" +#include "bfdlink.h" + +#include "ld.h" +#include "ldmain.h" +#include "ldmisc.h" + +#include "ldexp.h" +#include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" + +#include "getopt.h" + +static int coff_version; + +static void gld_${EMULATION_NAME}_before_parse PARAMS ((void)); +static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *)); +static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); +static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE *)); + +/* TI COFF extra command line options */ +#define OPTION_COFF_FORMAT (300 + 1) + +static struct option longopts[] = +{ + /* TI COFF options */ + {"format", required_argument, NULL, OPTION_COFF_FORMAT }, + {NULL, no_argument, NULL, 0} +}; + +static void +gld_${EMULATION_NAME}_list_options (file) + FILE * file; +{ + fprintf (file, _(" --format 0|1|2 Specify which COFF version to use")); +} + +static int +gld_${EMULATION_NAME}_parse_args(argc, argv) + int argc; + char **argv; +{ + int longind; + int optc; + int prevoptind = optind; + int prevopterr = opterr; + int wanterror; + static int lastoptind = -1; + + if (lastoptind != optind) + opterr = 0; + wanterror = opterr; + + lastoptind = optind; + + optc = getopt_long_only (argc, argv, "-", longopts, &longind); + opterr = prevopterr; + + switch (optc) + { + default: + if (wanterror) + xexit (1); + optind = prevoptind; + return 0; + + case OPTION_COFF_FORMAT: + if ((*optarg == '0' || *optarg == '1' || *optarg == '2') + && optarg[1] == '\0') + { + extern void lang_add_output_format + PARAMS ((const char *, const char *, const char *, int)); + static char buf[] = "coffX-${OUTPUT_FORMAT_TEMPLATE}"; + coff_version = *optarg - '0'; + buf[4] = *optarg; + lang_add_output_format (buf, NULL, NULL, 0); + } + else + { + einfo (_("%P%F: invalid COFF format version %s\n"), optarg); + + } + break; + } + return 1; +} + +static void +gld_${EMULATION_NAME}_before_parse() +{ +#ifndef TARGET_ /* I.e., if not generic. */ + ldfile_set_output_arch ("`echo ${ARCH}`"); +#endif /* not TARGET_ */ +} + +static char * +gld_${EMULATION_NAME}_get_script (isfile) + int *isfile; +EOF +if test -n "$COMPILE_IN" +then +# Scripts compiled in. + +# sed commands to quote an ld script as a C string. +sc='s/["\\]/\\&/g +s/$/\\n\\/ +1s/^/"/ +$s/$/n"/ +' +cat >>e${EMULATION_NAME}.c <<EOF +{ + *isfile = 0; + if (link_info.relocateable == true && config.build_constructors == true) + return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`; + else if (link_info.relocateable == true) + return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`; + else if (!config.text_read_only) + return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`; + else if (!config.magic_demand_paged) + return `sed "$sc" ldscripts/${EMULATION_NAME}.xn`; + else + return `sed "$sc" ldscripts/${EMULATION_NAME}.x`; +} +EOF + +else +# Scripts read from the filesystem. + +cat >>e${EMULATION_NAME}.c <<EOF +{ + *isfile = 1; + + if (link_info.relocateable == true && config.build_constructors == true) + return "ldscripts/${EMULATION_NAME}.xu"; + else if (link_info.relocateable == true) + return "ldscripts/${EMULATION_NAME}.xr"; + else if (!config.text_read_only) + return "ldscripts/${EMULATION_NAME}.xbn"; + else if (!config.magic_demand_paged) + return "ldscripts/${EMULATION_NAME}.xn"; + else + return "ldscripts/${EMULATION_NAME}.x"; +} +EOF + +fi + +cat >>e${EMULATION_NAME}.c <<EOF +struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = +{ + gld_${EMULATION_NAME}_before_parse, + syslib_default, + hll_default, + after_parse_default, + after_open_default, + after_allocation_default, + set_output_arch_default, + ldemul_default_target, + before_allocation_default, + gld_${EMULATION_NAME}_get_script, + "${EMULATION_NAME}", + "${OUTPUT_FORMAT}", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set_symbols */ + gld_${EMULATION_NAME}_parse_args, + NULL, /* unrecognized_file */ + gld_${EMULATION_NAME}_list_options, + NULL, /* recognized file */ + NULL /* find_potential_libraries */ +}; +EOF diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em index 0a74abd..c91d6ca 100644 --- a/contrib/binutils/ld/emultempl/vanilla.em +++ b/contrib/binutils/ld/emultempl/vanilla.em @@ -2,7 +2,7 @@ # It does some substitutions. cat >e${EMULATION_NAME}.c <<EOF /* A vanilla emulation with no defaults - Copyright (C) 1991, 1993 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -26,11 +26,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" -#include "ldemul.h" -#include "ldfile.h" #include "ldmisc.h" #include "ldmain.h" +#include "ldexp.h" +#include "ldlang.h" +#include "ldfile.h" +#include "ldemul.h" + static void vanilla_before_parse() { } diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi index 3a36727..8d1acad 100644 --- a/contrib/binutils/ld/gen-doc.texi +++ b/contrib/binutils/ld/gen-doc.texi @@ -5,6 +5,7 @@ @c 2. Specific target machines @set H8300 @set I960 +@set TICOFF @c 3. Properties of this configuration @clear SingleFormat diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh index 8294af7..f6a2970 100755 --- a/contrib/binutils/ld/genscripts.sh +++ b/contrib/binutils/ld/genscripts.sh @@ -1,23 +1,32 @@ #!/bin/sh # genscripts.sh - generate the ld-emulation-target specific files # -# Usage: genscripts.sh srcdir libdir host target target_alias \ -# default_emulation native_lib_dirs this_emulation tool_dir +# Usage: genscripts.sh srcdir libdir exec_prefix \ +# host target target_alias default_emulation \ +# native_lib_dirs this_emulation tool_dir # # Sample usage: -# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib sparc-sun-sunos4.1.3 \ -# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 "" sun3 sparc-sun-sunos4.1.3 +# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib /usr/local \ +# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 \ +# "" sun3 sparc-sun-sunos4.1.3 # produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c srcdir=$1 libdir=$2 -host=$3 -target=$4 -target_alias=$5 -EMULATION_LIBPATH=$6 -NATIVE_LIB_DIRS=$7 -EMULATION_NAME=$8 -tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib +exec_prefix=$3 +host=$4 +target=$5 +target_alias=$6 +EMULATION_LIBPATH=$7 +NATIVE_LIB_DIRS=$8 +EMULATION_NAME=$9 +shift 9 +# Can't use ${1:-$target_alias} here due to an Ultrix shell bug. +if [ "x$1" = "x" ] ; then + tool_lib=${exec_prefix}/${target_alias}/lib +else + tool_lib=${exec_prefix}/$1/lib +fi # Include the emulation-specific parameters: . ${srcdir}/emulparams/${EMULATION_NAME}.sh diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1 index 58516b9..5ebaea8 100644 --- a/contrib/binutils/ld/ld.1 +++ b/contrib/binutils/ld/ld.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation +.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools" +.TH ld 1 "" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -39,7 +39,7 @@ ld \- the GNU linker .br .RB "[\|" "\-defsym\ "\c .I symbol\c -\& = \c +\&=\c .I expression\c \&\|] .RB "[\|" \-\-demangle "\|]" @@ -122,6 +122,11 @@ ld \- the GNU linker .RB "[\|" "\-T\ "\c .I commandfile\c \&\|] +.RB "[\|" "\-\-section\-start\ "\c +.I sectionname\c +\&=\c +.I sectionorg\c +\&\|] .RB "[\|" "\-Ttext\ "\c .I textorg\c \&\|] @@ -253,8 +258,9 @@ The exceptions\(em\&which may meaningfully be used more than once\(em\&are .B \-format\c \&), \c .B \-defsym\c -\&, -\c +\&, \c +.B \-\-section\-start\c +\&, \c .B \-L\c \&, \c .B \-l\c @@ -454,7 +460,7 @@ specified (\c \& has the same effect. .TP -.BI "-defsym " "symbol" "\fR = \fP" expression +.BI "-defsym " "symbol" "\fR=\fP" expression Create a global symbol in the output file, containing the absolute address given by \c .I expression\c @@ -890,6 +896,20 @@ Similar to but creates a new output section for each input file. .TP +.BI "--section-start " "sectionname" "\fR=\fP"org +Locate a section in the output file at the absolute +address given by \c +.I org\c +\&. \c +\c +.I org\c +\& must be a hexadecimal integer. +You may use this option as many +times as necessary to locate multiple sections in the command +line. If you need more elaborate expressions, consider +using the linker command language from a script. + +.TP .BI "\-Tbss " "org"\c .TP .BI "\-Tdata " "org"\c @@ -1097,19 +1117,377 @@ The GNU Binary Utilities\c , Roland H. Pesch. .SH COPYING -Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -.PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. +Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. .PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +This document is distributed under the terms of the GNU Free +Documentation License, version 1.1. That license is described in the +sources for this manual page, but it is not displayed here in order to +make this manual more consise. Copies of this license can also be +obtained from: http://www.gnu.org/copyleft/. + +\" .SH GNU Free Documentation License +\" Version 1.1, March 2000 + +\" Copyright (C) 2000 Free Software Foundation, Inc. +\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +\" Everyone is permitted to copy and distribute verbatim +\" copies of this license document, but changing it is +\" not allowed. +\" .PP +\" 0. PREAMBLE +\" .PP +\" The purpose of this License is to make a manual, textbook, or other +\" written document "free" in the sense of freedom: to assure everyone +\" the effective freedom to copy and redistribute it, with or without +\" modifying it, either commercially or noncommercially. Secondarily, +\" this License preserves for the author and publisher a way to get +\" credit for their work, while not being considered responsible for +\" modifications made by others. +\" .PP +\" This License is a kind of "copyleft", which means that derivative +\" works of the document must themselves be free in the same sense. It +\" complements the GNU General Public License, which is a copyleft +\" license designed for free software. +\" .PP +\" We have designed this License in order to use it for manuals for free +\" software, because free software needs free documentation: a free +\" program should come with manuals providing the same freedoms that the +\" software does. But this License is not limited to software manuals; +\" it can be used for any textual work, regardless of subject matter or +\" whether it is published as a printed book. We recommend this License +\" principally for works whose purpose is instruction or reference. +\" .PP +\" 1. APPLICABILITY AND DEFINITIONS +\" .PP +\" This License applies to any manual or other work that contains a +\" notice placed by the copyright holder saying it can be distributed +\" under the terms of this License. The "Document", below, refers to any +\" such manual or work. Any member of the public is a licensee, and is +\" addressed as "you". +\" .PP +\" A "Modified Version" of the Document means any work containing the +\" Document or a portion of it, either copied verbatim, or with +\" modifications and/or translated into another language. +\" .PP +\" A "Secondary Section" is a named appendix or a front-matter section of +\" the Document that deals exclusively with the relationship of the +\" publishers or authors of the Document to the Document's overall subject +\" (or to related matters) and contains nothing that could fall directly +\" within that overall subject. (For example, if the Document is in part a +\" textbook of mathematics, a Secondary Section may not explain any +\" mathematics.) The relationship could be a matter of historical +\" connection with the subject or with related matters, or of legal, +\" commercial, philosophical, ethical or political position regarding +\" them. +\" .PP +\" The "Invariant Sections" are certain Secondary Sections whose titles +\" are designated, as being those of Invariant Sections, in the notice +\" that says that the Document is released under this License. +\" .PP +\" The "Cover Texts" are certain short passages of text that are listed, +\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that +\" the Document is released under this License. +\" .PP +\" A "Transparent" copy of the Document means a machine-readable copy, +\" represented in a format whose specification is available to the +\" general public, whose contents can be viewed and edited directly and +\" straightforwardly with generic text editors or (for images composed of +\" pixels) generic paint programs or (for drawings) some widely available +\" drawing editor, and that is suitable for input to text formatters or +\" for automatic translation to a variety of formats suitable for input +\" to text formatters. A copy made in an otherwise Transparent file +\" format whose markup has been designed to thwart or discourage +\" subsequent modification by readers is not Transparent. A copy that is +\" not "Transparent" is called "Opaque". +\" .PP +\" Examples of suitable formats for Transparent copies include plain +\" ASCII without markup, Texinfo input format, LaTeX input format, SGML +\" or XML using a publicly available DTD, and standard-conforming simple +\" HTML designed for human modification. Opaque formats include +\" PostScript, PDF, proprietary formats that can be read and edited only +\" by proprietary word processors, SGML or XML for which the DTD and/or +\" processing tools are not generally available, and the +\" machine-generated HTML produced by some word processors for output +\" purposes only. +\" .PP +\" The "Title Page" means, for a printed book, the title page itself, +\" plus such following pages as are needed to hold, legibly, the material +\" this License requires to appear in the title page. For works in +\" formats which do not have any title page as such, "Title Page" means +\" the text near the most prominent appearance of the work's title, +\" preceding the beginning of the body of the text. +\" .PP +\" 2. VERBATIM COPYING +\" .PP +\" You may copy and distribute the Document in any medium, either +\" commercially or noncommercially, provided that this License, the +\" copyright notices, and the license notice saying this License applies +\" to the Document are reproduced in all copies, and that you add no other +\" conditions whatsoever to those of this License. You may not use +\" technical measures to obstruct or control the reading or further +\" copying of the copies you make or distribute. However, you may accept +\" compensation in exchange for copies. If you distribute a large enough +\" number of copies you must also follow the conditions in section 3. +\" .PP +\" You may also lend copies, under the same conditions stated above, and +\" you may publicly display copies. +\" .PP +\" 3. COPYING IN QUANTITY +\" .PP +\" If you publish printed copies of the Document numbering more than 100, +\" and the Document's license notice requires Cover Texts, you must enclose +\" the copies in covers that carry, clearly and legibly, all these Cover +\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +\" the back cover. Both covers must also clearly and legibly identify +\" you as the publisher of these copies. The front cover must present +\" the full title with all words of the title equally prominent and +\" visible. You may add other material on the covers in addition. +\" Copying with changes limited to the covers, as long as they preserve +\" the title of the Document and satisfy these conditions, can be treated +\" as verbatim copying in other respects. +\" .PP +\" If the required texts for either cover are too voluminous to fit +\" legibly, you should put the first ones listed (as many as fit +\" reasonably) on the actual cover, and continue the rest onto adjacent +\" pages. +\" .PP +\" If you publish or distribute Opaque copies of the Document numbering +\" more than 100, you must either include a machine-readable Transparent +\" copy along with each Opaque copy, or state in or with each Opaque copy +\" a publicly-accessible computer-network location containing a complete +\" Transparent copy of the Document, free of added material, which the +\" general network-using public has access to download anonymously at no +\" charge using public-standard network protocols. If you use the latter +\" option, you must take reasonably prudent steps, when you begin +\" distribution of Opaque copies in quantity, to ensure that this +\" Transparent copy will remain thus accessible at the stated location +\" until at least one year after the last time you distribute an Opaque +\" copy (directly or through your agents or retailers) of that edition to +\" the public. +\" .PP +\" It is requested, but not required, that you contact the authors of the +\" Document well before redistributing any large number of copies, to give +\" them a chance to provide you with an updated version of the Document. +\" .PP +\" 4. MODIFICATIONS +\" .PP +\" You may copy and distribute a Modified Version of the Document under +\" the conditions of sections 2 and 3 above, provided that you release +\" the Modified Version under precisely this License, with the Modified +\" Version filling the role of the Document, thus licensing distribution +\" and modification of the Modified Version to whoever possesses a copy +\" of it. In addition, you must do these things in the Modified Version: +\" .PP +\" A. Use in the Title Page (and on the covers, if any) a title distinct +\" from that of the Document, and from those of previous versions +\" (which should, if there were any, be listed in the History section +\" of the Document). You may use the same title as a previous version +\" if the original publisher of that version gives permission. +\" .PP +\" B. List on the Title Page, as authors, one or more persons or entities +\" responsible for authorship of the modifications in the Modified +\" Version, together with at least five of the principal authors of the +\" Document (all of its principal authors, if it has less than five). +\" .PP +\" C. State on the Title page the name of the publisher of the +\" Modified Version, as the publisher. +\" .PP +\" D. Preserve all the copyright notices of the Document. +\" .PP +\" E. Add an appropriate copyright notice for your modifications +\" adjacent to the other copyright notices. +\" .PP +\" F. Include, immediately after the copyright notices, a license notice +\" giving the public permission to use the Modified Version under the +\" terms of this License, in the form shown in the Addendum below. +\" Preserve in that license notice the full lists of Invariant Sections +\" and required Cover Texts given in the Document's license notice. +\" .PP +\" H. Include an unaltered copy of this License. +\" .PP +\" I. Preserve the section entitled "History", and its title, and add to +\" it an item stating at least the title, year, new authors, and +\" publisher of the Modified Version as given on the Title Page. If +\" there is no section entitled "History" in the Document, create one +\" stating the title, year, authors, and publisher of the Document as +\" given on its Title Page, then add an item describing the Modified +\" Version as stated in the previous sentence. +\" .PP +\" J. Preserve the network location, if any, given in the Document for +\" public access to a Transparent copy of the Document, and likewise +\" the network locations given in the Document for previous versions +\" it was based on. These may be placed in the "History" section. +\" You may omit a network location for a work that was published at +\" least four years before the Document itself, or if the original +\" publisher of the version it refers to gives permission. +\" .PP +\" K. In any section entitled "Acknowledgements" or "Dedications", +\" preserve the section's title, and preserve in the section all the +\" substance and tone of each of the contributor acknowledgements +\" and/or dedications given therein. +\" .PP +\" L. Preserve all the Invariant Sections of the Document, +\" unaltered in their text and in their titles. Section numbers +\" or the equivalent are not considered part of the section titles. +\" .PP +\" M. Delete any section entitled "Endorsements". Such a section +\" may not be included in the Modified Version. +\" .PP +\" N. Do not retitle any existing section as "Endorsements" +\" or to conflict in title with any Invariant Section. +\" .PP +\" If the Modified Version includes new front-matter sections or +\" appendices that qualify as Secondary Sections and contain no material +\" copied from the Document, you may at your option designate some or all +\" of these sections as invariant. To do this, add their titles to the +\" list of Invariant Sections in the Modified Version's license notice. +\" These titles must be distinct from any other section titles. +\" .PP +\" You may add a section entitled "Endorsements", provided it contains +\" nothing but endorsements of your Modified Version by various +\" parties--for example, statements of peer review or that the text has +\" been approved by an organization as the authoritative definition of a +\" standard. +\" .PP +\" You may add a passage of up to five words as a Front-Cover Text, and a +\" passage of up to 25 words as a Back-Cover Text, to the end of the list +\" of Cover Texts in the Modified Version. Only one passage of +\" Front-Cover Text and one of Back-Cover Text may be added by (or +\" through arrangements made by) any one entity. If the Document already +\" includes a cover text for the same cover, previously added by you or +\" by arrangement made by the same entity you are acting on behalf of, +\" you may not add another; but you may replace the old one, on explicit +\" permission from the previous publisher that added the old one. +\" .PP +\" The author(s) and publisher(s) of the Document do not by this License +\" give permission to use their names for publicity for or to assert or +\" imply endorsement of any Modified Version. +\" .PP + +\" 5. COMBINING DOCUMENTS +\" .PP +\" You may combine the Document with other documents released under this +\" License, under the terms defined in section 4 above for modified +\" versions, provided that you include in the combination all of the +\" Invariant Sections of all of the original documents, unmodified, and +\" list them all as Invariant Sections of your combined work in its +\" license notice. +\" .PP +\" The combined work need only contain one copy of this License, and +\" multiple identical Invariant Sections may be replaced with a single +\" copy. If there are multiple Invariant Sections with the same name but +\" different contents, make the title of each such section unique by +\" adding at the end of it, in parentheses, the name of the original +\" author or publisher of that section if known, or else a unique number. +\" Make the same adjustment to the section titles in the list of +\" Invariant Sections in the license notice of the combined work. +\" .PP +\" In the combination, you must combine any sections entitled "History" +\" in the various original documents, forming one section entitled +\" "History"; likewise combine any sections entitled "Acknowledgements", +\" and any sections entitled "Dedications". You must delete all sections +\" entitled "Endorsements." +\" .PP + +\" 6. COLLECTIONS OF DOCUMENTS +\" .PP +\" You may make a collection consisting of the Document and other documents +\" released under this License, and replace the individual copies of this +\" License in the various documents with a single copy that is included in +\" the collection, provided that you follow the rules of this License for +\" verbatim copying of each of the documents in all other respects. +\" .PP +\" You may extract a single document from such a collection, and distribute +\" it individually under this License, provided you insert a copy of this +\" License into the extracted document, and follow this License in all +\" other respects regarding verbatim copying of that document. +\" .PP + +\" 7. AGGREGATION WITH INDEPENDENT WORKS +\" .PP +\" A compilation of the Document or its derivatives with other separate +\" and independent documents or works, in or on a volume of a storage or +\" distribution medium, does not as a whole count as a Modified Version +\" of the Document, provided no compilation copyright is claimed for the +\" compilation. Such a compilation is called an "aggregate", and this +\" License does not apply to the other self-contained works thus compiled +\" with the Document, on account of their being thus compiled, if they +\" are not themselves derivative works of the Document. +\" .PP +\" If the Cover Text requirement of section 3 is applicable to these +\" copies of the Document, then if the Document is less than one quarter +\" of the entire aggregate, the Document's Cover Texts may be placed on +\" covers that surround only the Document within the aggregate. +\" Otherwise they must appear on covers around the whole aggregate. +\" .PP + +\" 8. TRANSLATION +\" .PP +\" Translation is considered a kind of modification, so you may +\" distribute translations of the Document under the terms of section 4. +\" Replacing Invariant Sections with translations requires special +\" permission from their copyright holders, but you may include +\" translations of some or all Invariant Sections in addition to the +\" original versions of these Invariant Sections. You may include a +\" translation of this License provided that you also include the +\" original English version of this License. In case of a disagreement +\" between the translation and the original English version of this +\" License, the original English version will prevail. +\" .PP + +\" 9. TERMINATION +\" .PP +\" You may not copy, modify, sublicense, or distribute the Document except +\" as expressly provided for under this License. Any other attempt to +\" copy, modify, sublicense or distribute the Document is void, and will +\" automatically terminate your rights under this License. However, +\" parties who have received copies, or rights, from you under this +\" License will not have their licenses terminated so long as such +\" parties remain in full compliance. +\" .PP + +\" 10. FUTURE REVISIONS OF THIS LICENSE +\" .PP +\" The Free Software Foundation may publish new, revised versions +\" of the GNU Free Documentation License from time to time. Such new +\" versions will be similar in spirit to the present version, but may +\" differ in detail to address new problems or concerns. See +\" http://www.gnu.org/copyleft/. +\" .PP +\" Each version of the License is given a distinguishing version number. +\" If the Document specifies that a particular numbered version of this +\" License "or any later version" applies to it, you have the option of +\" following the terms and conditions either of that specified version or +\" of any later version that has been published (not as a draft) by the +\" Free Software Foundation. If the Document does not specify a version +\" number of this License, you may choose any version ever published (not +\" as a draft) by the Free Software Foundation. +\" .PP + +\" ADDENDUM: How to use this License for your documents +\" .PP +\" To use this License in a document you have written, include a copy of +\" the License in the document and put the following copyright and +\" license notices just after the title page: +\" .PP +\" Copyright (c) YEAR YOUR NAME. +\" Permission is granted to copy, distribute and/or +\" modify this document under the terms of the GNU +\" Free Documentation License, Version 1.1 or any later +\" version published by the Free Software Foundation; +\" with the Invariant Sections being LIST THEIR TITLES, +\" with the Front-Cover Texts being LIST, and with the +\" Back-Cover Texts being LIST. A copy of the license +\" is included in the section entitled "GNU Free +\" Documentation License". +\" .PP +\" If you have no Invariant Sections, write "with no Invariant Sections" +\" instead of saying which ones are invariant. If you have no +\" Front-Cover Texts, write "no Front-Cover Texts" instead of +\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. +\" .PP +\" If your document contains nontrivial examples of program code, we +\" recommend releasing these examples in parallel under your choice of +\" free software license, such as the GNU General Public License, +\" to permit their use in free software. diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h index e2052a0..6b7db93 100644 --- a/contrib/binutils/ld/ld.h +++ b/contrib/binutils/ld/ld.h @@ -35,12 +35,11 @@ # define N_(String) (String) # endif #else -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) #endif @@ -59,30 +58,27 @@ #define DISCARD_SECTION_NAME "/DISCARD/" /* A file name list */ -typedef struct name_list -{ - const char *name; - struct name_list *next; -} name_list; +typedef struct name_list { + const char *name; + struct name_list *next; +} +name_list; /* A wildcard specification. This is only used in ldgram.y, but it winds up in ldgram.h, so we need to define it outside. */ -struct wildcard_spec -{ +struct wildcard_spec { const char *name; struct name_list *exclude_name_list; boolean sorted; }; /* Extra information we hold on sections */ -typedef struct user_section_struct -{ +typedef struct user_section_struct { /* Pointer to the section where this data will go */ struct lang_input_statement_struct *file; } section_userdata_type; - #define get_userdata(x) ((x)->userdata) #define BYTE_SIZE (1) @@ -98,8 +94,7 @@ typedef struct user_section_struct #define ALIGN_N(this, boundary) \ ((( (this) + ((boundary) -1)) & (~((boundary)-1)))) -typedef struct -{ +typedef struct { /* 1 => assign space to common symbols even if `relocatable_output'. */ boolean force_common_definition; boolean relax; @@ -128,7 +123,7 @@ typedef struct file. */ boolean embedded_relocs; - /* If true, force generation of a file with a .exe file. */ + /* If true, force generation of a file with a .exe file. */ boolean force_exe_suffix; /* If true, generate a cross reference report. */ @@ -156,15 +151,14 @@ typedef struct /* If true (the default) check section addresses, once compute, fpor overlaps. */ boolean check_section_addresses; - + } args_type; extern args_type command_line; typedef int token_code_type; -typedef struct -{ +typedef struct { bfd_size_type specified_data_size; boolean magic_demand_paged; boolean make_executable; @@ -207,14 +201,17 @@ typedef struct boolean stats; - int split_by_reloc; - boolean split_by_file; + /* If set, orphan input sections will be mapped to separate output + sections. */ + boolean unique_orphan_sections; + + unsigned int split_by_reloc; + bfd_size_type split_by_file; } ld_config_type; extern ld_config_type config; -typedef enum -{ +typedef enum { lang_first_phase_enum, lang_allocating_phase_enum, lang_final_phase_enum diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo index c9d0fc6..e897d44 100644 --- a/contrib/binutils/ld/ld.texinfo +++ b/contrib/binutils/ld/ld.texinfo @@ -20,19 +20,15 @@ This file documents the @sc{gnu} linker LD version @value{VERSION}. Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. +@ignore -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections, with no Front-Cover Texts, and with no +Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". -@ignore Permission is granted to process this file through Tex and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph @@ -52,13 +48,12 @@ notice identical to this one except for the removal of this paragraph @subtitle Version @value{VERSION} @author Steve Chamberlain @author Ian Lance Taylor -@author Cygnus Solutions @page @tex {\parskip=0pt -\hfill Cygnus Solutions\par -\hfill ian\@cygnus.com, doc\@cygnus.com\par +\hfill Red Hat Inc\par +\hfill nickc\@credhat.com, doc\@redhat.com\par \hfill {\it Using LD, the GNU linker}\par \hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par } @@ -66,19 +61,15 @@ notice identical to this one except for the removal of this paragraph @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @end iftex @c FIXME: Talk about importance of *order* of args, cmds to linker! @@ -88,6 +79,10 @@ into another language, under the above conditions for modified versions. @top Using ld This file documents the @sc{gnu} linker ld version @value{VERSION}. +This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the +section entitled "GNU Free Documentation License". + @menu * Overview:: Overview * Invocation:: Invocation @@ -105,6 +100,9 @@ This file documents the @sc{gnu} linker ld version @value{VERSION}. @ifset I960 * i960:: ld and the Intel 960 family @end ifset +@ifset TICOFF +* TI COFF:: ld and the TI COFF +@end ifset @end ifclear @ifclear SingleFormat * BFD:: BFD @@ -113,6 +111,7 @@ This file documents the @sc{gnu} linker ld version @value{VERSION}. * Reporting Bugs:: Reporting Bugs * MRI:: MRI Compatible Script Files +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index @end menu @end ifinfo @@ -220,13 +219,20 @@ whitespace, or be given as separate arguments immediately following the option that requires them. For options whose names are multiple letters, either one dash or two can -precede the option name; for example, @samp{--oformat} and -@samp{--oformat} are equivalent. Arguments to multiple-letter options -must either be separated from the option name by an equals sign, or be -given as separate arguments immediately following the option that -requires them. For example, @samp{--oformat srec} and -@samp{--oformat=srec} are equivalent. Unique abbreviations of the names -of multiple-letter options are accepted. +precede the option name; for example, @samp{-trace-symbol} and +@samp{--trace-symbol} are equivalent. Note - there is one exception to +this rule. Multiple letter options that start with a lower case 'o' can +only be preceeded by two dashes. This is to reduce confusion with the +@samp{-o} option. So for example @samp{-omagic} sets the output file +name to @samp{magic} whereas @samp{--omagic} sets the NMAGIC flag on the +output. + +Arguments to multiple-letter options must either be separated from the +option name by an equals sign, or be given as separate arguments +immediately following the option that requires them. For example, +@samp{--trace-symbol foo} and @samp{--trace-symbol=foo} are equivalent. +Unique abbreviations of the names of multiple-letter options are +accepted. Note - if the linker is being invoked indirectly, via a compiler driver (eg @samp{gcc}) then all the linker command line options should be @@ -588,6 +594,16 @@ If @var{level} is a numeric values greater than zero @code{ld} optimizes the output. This might take significantly longer and therefore probably should only be enabled for the final binary. +@kindex -q +@kindex --emit-relocs +@cindex retain relocations in final executable +@item -q +@itemx --emit-relocs +Leave relocation sections and contents in fully linked exececutables. +Post link analysis and optimization tools may need this information in +order to perform correct modifications of executables. This results +in larger executables. + @cindex partial link @cindex relocatable output @kindex -r @@ -679,6 +695,16 @@ with @samp{-Ur}; once the constructor table has been built, it cannot be added to. Use @samp{-Ur} only for the last partial link, and @samp{-r} for the others. +@kindex --unique[=@var{SECTION}] +@item --unique[=@var{SECTION}] +Creates a separate output section for every input section matching +@var{SECTION}, or if the optional wildcard @var{SECTION} argument is +missing, for every orphan input section. An orphan section is one not +specifically mentioned in a linker script. You may use this option +multiple times on the command line; It prevents the normal merging of +input sections with the same name, overriding output section assignments +in a linker script. + @kindex -v @kindex -V @kindex --version @@ -724,7 +750,21 @@ for Solaris compatibility. @kindex -z @var{keyword} @item -z @var{keyword} -This option is ignored for Solaris compatibility. +The recognized keywords are @code{initfirst}, @code{interpose}, +@code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen}, +@code{nodump}, @code{now} and @code{origin}. The other keywords are +ignored for Solaris compatibility. @code{initfirst} marks the object +to be initialized first at runtime before any other objects. +@code{interpose} marks the object that its symbol table interposes +before all symbols but the primary executable. @code{loadfltr} marks +the object that its filtees be processed immediately at runtime. +@code{nodefaultlib} marks the object that the search for dependencies +of this object will ignore any default library search paths. +@code{nodelete} marks the object shouldn't be unloaded at runtime. +@code{nodlopen} marks the object not available to @code{dlopen}. +@code{nodump} marks the object can not be dumped by @code{dldump}. +@code{now} marks the object with the non-lazy runtime binding. +@code{origin} marks the object may contain $ORIGIN. @kindex -( @cindex groups of archives @@ -825,17 +865,19 @@ space between @var{symbol}, the equals sign (``@key{=}''), and @var{expression}. @cindex demangling, from command line -@kindex --demangle +@kindex --demangle[=@var{style}] @kindex --no-demangle -@item --demangle +@item --demangle[=@var{style}] @itemx --no-demangle These options control whether to demangle symbol names in error messages and other output. When the linker is told to demangle, it tries to present symbol names in a readable fashion: it strips leading underscores if they are used by the object file format, and converts C++ -mangled symbol names into user readable names. The linker will demangle -by default unless the environment variable @samp{COLLECT_NO_DEMANGLE} is -set. These options may be used to override the default. +mangled symbol names into user readable names. Different compilers have +different mangling styles. The optional demangling style argument can be used +to choose an appropriate demangling style for your compiler. The linker will +demangle by default unless the environment variable @samp{COLLECT_NO_DEMANGLE} +is set. These options may be used to override the default. @cindex dynamic linker, from command line @kindex --dynamic-linker @var{file} @@ -882,6 +924,10 @@ specifying @samp{--no-gc-sections} on the command line. @item --help Print a summary of the command-line options on the standard output and exit. +@kindex --target-help +@item --target-help +Print a summary of all target specific options on the standard output and exit. + @kindex -Map @item -Map @var{mapfile} Print a link map to the file @var{mapfile}. See the description of the @@ -902,6 +948,19 @@ Normally when creating a non-symbolic shared library, undefined symbols are allowed and left to be resolved by the runtime loader. This option disallows such undefined symbols. +@kindex --allow-shlib-undefined +@item --allow-shlib-undefined +Allow undefined symbols in shared objects even when --no-undefined is +set. The net result will be that undefined symbols in regular objects +will still trigger an error, but undefined symbols in shared objects +will be ignored. The implementation of no_undefined makes the +assumption that the runtime linker will choke on undefined symbols. +However there is at least one system (BeOS) where undefined symbols in +shared libraries is normal since the kernel patches them at load time to +select which function is most appropriate for the current architecture. +I.E. dynamically select an appropriate memset function. Apparently it +is also normal for HPPA shared libraries to have undefined symbols. + @kindex --no-warn-mismatch @item --no-warn-mismatch Normally @code{ld} will give an error if you try to link together input @@ -1045,6 +1104,11 @@ specifies the first set of directories to search. The either by specifying a list of names separated by colons, or by appearing multiple times. +This option should be used with caution as it overrides the search path +that may have been hard compiled into a shared library. In such a case it +is possible to use unintentionally a different search path than the +runtime linker would do. + The linker uses the following search paths to locate required shared libraries. @enumerate @@ -1055,11 +1119,11 @@ Any directories specified by @code{-rpath} options. The difference between @code{-rpath} and @code{-rpath-link} is that directories specified by @code{-rpath} options are included in the executable and used at runtime, whereas the @code{-rpath-link} option is only effective -at link time. +at link time. It is for the native linker only. @item On an ELF system, if the @code{-rpath} and @code{rpath-link} options were not used, search the contents of the environment variable -@code{LD_RUN_PATH}. +@code{LD_RUN_PATH}. It is for the native linker only. @item On SunOS, if the @code{-rpath} option was not used, search any directories specified using @code{-L} options. @@ -1067,6 +1131,11 @@ directories specified using @code{-L} options. For a native linker, the contents of the environment variable @code{LD_LIBRARY_PATH}. @item +For a native ELF linker, the directories in @code{DT_RUNPATH} or +@code{DT_RPATH} of a shared library are searched for shared +libraries needed by it. The @code{DT_RPATH} entries are ignored if +@code{DT_RUNPATH} entries exist. +@item The default directories, normally @file{/lib} and @file{/usr/lib}. @item For a native linker on an ELF system, if the file @file{/etc/ld.so.conf} @@ -1096,22 +1165,23 @@ everything else. This is to prevent gaps between symbols due to alignment constraints. @kindex --split-by-file -@item --split-by-file +@item --split-by-file [@var{size}] Similar to @code{--split-by-reloc} but creates a new output section for -each input file. +each input file when @var{size} is reached. @var{size} defaults to a +size of 1 if not given. @kindex --split-by-reloc -@item --split-by-reloc @var{count} -Trys to creates extra sections in the output file so that no single +@item --split-by-reloc [@var{count}] +Tries to creates extra sections in the output file so that no single output section in the file contains more than @var{count} relocations. -This is useful when generating huge relocatable for downloading into +This is useful when generating huge relocatable files for downloading into certain real time kernels with the COFF object file format; since COFF cannot represent more than 65535 relocations in a single section. Note that this will fail to work with object file formats which do not support arbitrary sections. The linker will not split up individual input sections for redistribution, so if a single input section contains more than @var{count} relocations one output section will contain that -many relocations. +many relocations. @var{count} defaults to a value of 32768. @kindex --stats @item --stats @@ -1133,6 +1203,18 @@ full debugging information by over 30 percent. Unfortunately, the SunOS trouble). The @samp{--traditional-format} switch tells @code{ld} to not combine duplicate entries. +@kindex --section-start @var{sectionname}=@var{org} +@item --section-start @var{sectionname}=@var{org} +Locate a section in the output file at the absolute +address given by @var{org}. You may use this option as many +times as necessary to locate multiple sections in the command +line. +@var{org} must be a single hexadecimal integer; +for compatibility with other linkers, you may omit the leading +@samp{0x} usually associated with hexadecimal values. @emph{Note:} there +should be no white space between @var{sectionname}, the equals +sign (``@key{=}''), and @var{org}. + @kindex -Tbss @var{org} @kindex -Tdata @var{org} @kindex -Ttext @var{org} @@ -1295,6 +1377,12 @@ files. This is normally used to turn an archive file into a shared library, forcing every object to be included in the resulting shared library. This option may be used more than once. +Two notes when using this option from gcc: First, gcc doesn't know +about this option, so you have to use @code{-Wl,-whole-archive}. +Second, don't forget to use @code{-Wl,-no-whole-archive} after your +list of archives, because gcc will add its own list of archives to +your link and you may not want this flag to affect those as well. + @kindex --wrap @item --wrap @var{symbol} Use a wrapper function for @var{symbol}. Any undefined reference to @@ -1329,6 +1417,17 @@ you should not put the definition of @code{__real_malloc} in the same file as @code{__wrap_malloc}; if you do, the assembler may resolve the call before the linker has a chance to wrap it to @code{malloc}. +@kindex --enable-new-dtags +@kindex --disable-new-dtags +@item --enable-new-dtags +@itemx --disable-new-dtags +This linker can create the new dynamic tags in ELF. But the older ELF +systems may not understand them. If you specify +@code{--enable-new-dtags}, the dynamic tags will be created as needed. +If you specify @code{--disable-new-dtags}, no new dynamic tags will be +created. By default, the new dynamic tags are not created. Note that +those options are only available for ELF systems. + @end table @subsection Options specific to i386 PE targets @@ -2486,6 +2585,16 @@ When the object file format does not have an explicit endianness, as is true of, for example, S-records, the value will be stored in the endianness of the first input object file. +Note - these commands only work inside a section description and not +between them, so the following will produce an error from the linker: +@smallexample +SECTIONS @{@ .text : @{@ *(.text) @}@ LONG(1) .data : @{@ *(.data) @}@ @}@ +@end smallexample +whereas this will work: +@smallexample +SECTIONS @{@ .text : @{@ *(.text) ; LONG(1) @}@ .data : @{@ *(.data) @}@ @}@ +@end smallexample + @kindex FILL(@var{expression}) @cindex holes, filling @cindex unspecified memory @@ -3823,6 +3932,10 @@ functionality are not listed. * H8/300:: @code{ld} and the H8/300 * i960:: @code{ld} and the Intel 960 family * ARM:: @code{ld} and the ARM family +* HPPA ELF32:: @code{ld} and HPPA 32-bit ELF +@ifset TICOFF +* TI COFF:: @code{ld} and TI COFF +@end ifset @end menu @end ifset @@ -3963,6 +4076,50 @@ But it also sets the bottom bit of the address, so that it can be branched to using a BX instruction, and the program will start executing in Thumb mode straight away. +@node HPPA ELF32 +@section @code{ld} and HPPA 32-bit ELF support +@cindex HPPA multiple sub-space stubs +@kindex --multi-subspace +When generating a shared library, @code{ld} will by default generate +import stubs suitable for use with a single sub-space application. +The @samp{--multi-subspace} switch causes @code{ld} to generate export +stubs, and different (larger) import stubs suitable for use with +multiple sub-spaces. + +@cindex HPPA stub grouping +@kindex --stub-group-size=@var{N} +Long branch stubs and import/export stubs are placed by @code{ld} in +stub sections located between groups of input sections. +@samp{--stub-group-size} specifies the maximum size of a group of input +sections handled by one stub section. Since branch offsets are signed, +a stub section may serve two groups of input sections, one group before +the stub section, and one group after it. However, when using +conditional branches that require stubs, it may be better (for branch +prediction) that stub sections only serve one group of input sections. +A negative value for @samp{N} chooses this scheme, ensuring that +branches to stubs always use a negative offset. Two special values of +@samp{N} are recognized, @samp{1} and @samp{-1}. These both instruct +@code{ld} to automatically size input section groups for the branch types +detected, with the same behaviour regarding stub placement as other +positive or negative values of @samp{N} respectively. + +Note that @samp{--stub-group-size} does not split input sections. A +single input section larger than the group size specified will of course +create a larger group (of one section). If input sections are too +large, it may not be possible for a branch to reach its stub. + +@ifset TICOFF +@node TI COFF +@section @code{ld}'s support for various TI COFF versions +@cindex TI COFF versions +@kindex --format=@var{version} +The @samp{--format} switch allows selection of one of the various +TI COFF versions. The latest of this writing is 2; versions 0 and 1 are +also supported. The TI COFF versions also vary in header byte-order +format; @code{ld} will read any version or byte order, but the output +header format depends on the default specified by the specific target. +@end ifset + @ifclear GENERIC @lowersections @end ifclear @@ -4074,7 +4231,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. Otherwise, send bug reports for @code{ld} to -@samp{bug-gnu-utils@@gnu.org}. +@samp{bug-binutils@@gnu.org}. The fundamental principle of reporting bugs usefully is this: @strong{report all the facts}. If you are not sure whether to state a @@ -4353,6 +4510,370 @@ If you have more than one @code{SECT} statement for the same @var{secname}, only the @emph{first} sets the start address. @end table +@node GNU Free Documentation License +@appendix GNU Free Documentation License +@cindex GNU Free Documentation License + + GNU Free Documentation License + + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +@end smallexample + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + @node Index @unnumbered Index diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c index e208106..cb2a00f 100644 --- a/contrib/binutils/ld/ldcref.c +++ b/contrib/binutils/ld/ldcref.c @@ -36,8 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We keep an instance of this structure for each reference to a symbol from a given object. */ -struct cref_ref -{ +struct cref_ref { /* The next reference. */ struct cref_ref *next; /* The object. */ @@ -52,8 +51,7 @@ struct cref_ref /* We keep a hash table of symbols. Each entry looks like this. */ -struct cref_hash_entry -{ +struct cref_hash_entry { struct bfd_hash_entry root; /* The demangled name. */ char *demangled; @@ -63,8 +61,7 @@ struct cref_hash_entry /* This is what the hash table looks like. */ -struct cref_hash_table -{ +struct cref_hash_table { struct bfd_hash_table root; }; @@ -145,7 +142,6 @@ cref_hash_newfunc (entry, table, string) /* Add a symbol to the cref hash table. This is called for every symbol that is seen during the link. */ -/*ARGSUSED*/ void add_cref (name, abfd, section, value) const char *name; @@ -242,7 +238,7 @@ output_cref (fp) len = strlen (msg); while (len < FILECOL) { - putc (' ' , fp); + putc (' ', fp); ++len; } fprintf (fp, _("File\n")); @@ -350,7 +346,6 @@ check_nocrossrefs () /* Check one symbol to see if it is a prohibited cross reference. */ -/*ARGSUSED*/ static boolean check_nocrossref (h, ignore) struct cref_hash_entry *h; @@ -391,8 +386,7 @@ check_nocrossref (h, ignore) /* The struct is used to pass information from check_refs to check_reloc_refs through bfd_map_over_sections. */ -struct check_refs_info -{ +struct check_refs_info { struct cref_hash_entry *h; asection *defsec; struct lang_nocrossrefs *ncrs; diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c index 0a434b8..6e5eace 100644 --- a/contrib/binutils/ld/ldctor.c +++ b/contrib/binutils/ld/ldctor.c @@ -1,8 +1,8 @@ /* ldctor.c -- constructor support routines - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. By Steve Chamberlain <sac@cygnus.com> - + This file is part of GLD, the Gnu Linker. GLD is free software; you can redistribute it and/or modify @@ -86,7 +86,8 @@ ldctor_add_set_entry (h, reloc, name, section, value) { if (p->reloc != reloc) { - einfo (_("%P%X: Different relocs used in set %s\n"), h->root.string); + einfo (_("%P%X: Different relocs used in set %s\n"), + h->root.string); return; } @@ -136,7 +137,7 @@ ctor_prio (name) while (*name == '_') ++name; - if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0) + if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0) return -1; name += sizeof "GLOBAL_" - 1; @@ -365,7 +366,7 @@ ldctor_build_sets () minfo ("%G\n", e->section->owner, e->section, e->value); } - /* Need SEC_KEEP for --gc-sections */ + /* Need SEC_KEEP for --gc-sections. */ if (! bfd_is_abs_section (e->section)) e->section->flags |= SEC_KEEP; diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h index d873f77..4283c47 100644 --- a/contrib/binutils/ld/ldctor.h +++ b/contrib/binutils/ld/ldctor.h @@ -1,6 +1,6 @@ /* ldctor.h - linker constructor support - Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc. - + Copyright 1991, 92, 93, 94, 95, 98, 2000 Free Software Foundation, Inc. + This file is part of GLD, the Gnu Linker. GLD is free software; you can redistribute it and/or modify @@ -31,8 +31,7 @@ extern boolean constructors_sorted; /* We keep a list of these structures for each set we build. */ -struct set_info -{ +struct set_info { struct set_info *next; /* Next set. */ struct bfd_link_hash_entry *h; /* Hash table entry. */ bfd_reloc_code_real_type reloc; /* Reloc to use for an entry. */ @@ -40,8 +39,7 @@ struct set_info struct set_element *elements; /* Elements in set. */ }; -struct set_element -{ +struct set_element { struct set_element *next; /* Next element. */ const char *name; /* Name in set (may be NULL). */ asection *section; /* Section of value in set. */ diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c index 08a4e47..b0f43cd 100644 --- a/contrib/binutils/ld/ldemul.c +++ b/contrib/binutils/ld/ldemul.c @@ -1,5 +1,5 @@ /* ldemul.c -- clearing house for ld emulation states - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -15,47 +15,48 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GLD; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +along with GLD; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" #include "ld.h" -#include "ldemul.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" #include "ldfile.h" +#include "ldemul.h" #include "ldmain.h" #include "ldemul-list.h" ld_emulation_xfer_type *ld_emulation; void -ldemul_hll(name) +ldemul_hll (name) char *name; { - ld_emulation->hll(name); + ld_emulation->hll (name); } - -void ldemul_syslib(name) +void +ldemul_syslib (name) char *name; { - ld_emulation->syslib(name); + ld_emulation->syslib (name); } void -ldemul_after_parse() +ldemul_after_parse () { - ld_emulation->after_parse(); + ld_emulation->after_parse (); } void -ldemul_before_parse() +ldemul_before_parse () { - ld_emulation->before_parse(); + ld_emulation->before_parse (); } void @@ -64,52 +65,51 @@ ldemul_after_open () ld_emulation->after_open (); } -void -ldemul_after_allocation() +void +ldemul_after_allocation () { - ld_emulation->after_allocation(); + ld_emulation->after_allocation (); } -void -ldemul_before_allocation() +void +ldemul_before_allocation () { if (ld_emulation->before_allocation) - ld_emulation->before_allocation(); + ld_emulation->before_allocation (); } - void -ldemul_set_output_arch() +ldemul_set_output_arch () { - ld_emulation->set_output_arch(); + ld_emulation->set_output_arch (); } void -ldemul_finish() +ldemul_finish () { if (ld_emulation->finish) - ld_emulation->finish(); + ld_emulation->finish (); } void -ldemul_set_symbols() +ldemul_set_symbols () { if (ld_emulation->set_symbols) - ld_emulation->set_symbols(); + ld_emulation->set_symbols (); } void -ldemul_create_output_section_statements() +ldemul_create_output_section_statements () { if (ld_emulation->create_output_section_statements) - ld_emulation->create_output_section_statements(); + ld_emulation->create_output_section_statements (); } char * -ldemul_get_script(isfile) +ldemul_get_script (isfile) int *isfile; { - return ld_emulation->get_script(isfile); + return ld_emulation->get_script (isfile); } boolean @@ -138,7 +138,7 @@ ldemul_parse_args (argc, argv) int argc; char **argv; { - /* Try and use the emulation parser if there is one. */ + /* Try and use the emulation parser if there is one. */ if (ld_emulation->parse_args) { return ld_emulation->parse_args (argc, argv); @@ -169,26 +169,25 @@ ldemul_recognized_file (entry) } char * -ldemul_choose_target() +ldemul_choose_target () { - return ld_emulation->choose_target(); + return ld_emulation->choose_target (); } /* The default choose_target function. */ char * -ldemul_default_target() +ldemul_default_target () { char *from_outside = getenv (TARGET_ENVIRON); - if (from_outside != (char *)NULL) + if (from_outside != (char *) NULL) return from_outside; return ld_emulation->target_name; } -void -after_parse_default() +void +after_parse_default () { - } void @@ -197,37 +196,33 @@ after_open_default () } void -after_allocation_default() +after_allocation_default () { - } void -before_allocation_default() +before_allocation_default () { - } void -set_output_arch_default() +set_output_arch_default () { - /* Set the output architecture and machine if possible */ - bfd_set_arch_mach(output_bfd, - ldfile_output_architecture, ldfile_output_machine); + /* Set the output architecture and machine if possible. */ + bfd_set_arch_mach (output_bfd, + ldfile_output_architecture, ldfile_output_machine); } -/*ARGSUSED*/ void -syslib_default(ignore) - char *ignore ATTRIBUTE_UNUSED; +syslib_default (ignore) + char *ignore ATTRIBUTE_UNUSED; { info_msg (_("%S SYSLIB ignored\n")); } -/*ARGSUSED*/ void -hll_default(ignore) - char *ignore ATTRIBUTE_UNUSED; +hll_default (ignore) + char *ignore ATTRIBUTE_UNUSED; { info_msg (_("%S HLL ignored\n")); } @@ -235,25 +230,25 @@ hll_default(ignore) ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST }; void -ldemul_choose_mode(target) +ldemul_choose_mode (target) char *target; { - ld_emulation_xfer_type **eptr = ld_emulations; - /* Ignore "gld" prefix. */ - if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd') - target += 3; - for (; *eptr; eptr++) - { - if (strcmp(target, (*eptr)->emulation_name) == 0) - { - ld_emulation = *eptr; - return; - } - } - einfo (_("%P: unrecognised emulation mode: %s\n"), target); - einfo (_("Supported emulations: ")); - ldemul_list_emulations (stderr); - einfo ("%F\n"); + ld_emulation_xfer_type **eptr = ld_emulations; + /* Ignore "gld" prefix. */ + if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd') + target += 3; + for (; *eptr; eptr++) + { + if (strcmp (target, (*eptr)->emulation_name) == 0) + { + ld_emulation = *eptr; + return; + } + } + einfo (_("%P: unrecognised emulation mode: %s\n"), target); + einfo (_("Supported emulations: ")); + ldemul_list_emulations (stderr); + einfo ("%F\n"); } void @@ -275,33 +270,33 @@ ldemul_list_emulations (f) void ldemul_list_emulation_options (f) - FILE * f; + FILE *f; { - ld_emulation_xfer_type ** eptr; + ld_emulation_xfer_type **eptr; int options_found = 0; - - for (eptr = ld_emulations; * eptr; eptr ++) + + for (eptr = ld_emulations; *eptr; eptr++) { - ld_emulation_xfer_type * emul = * eptr; - + ld_emulation_xfer_type *emul = *eptr; + if (emul->list_options) { fprintf (f, "%s: \n", emul->emulation_name); - + emul->list_options (f); options_found = 1; } } - + if (! options_found) fprintf (f, _(" no emulation specific options.\n")); } int ldemul_find_potential_libraries (name, entry) - char * name; - lang_input_statement_type * entry; + char *name; + lang_input_statement_type *entry; { if (ld_emulation->find_potential_libraries) return ld_emulation->find_potential_libraries (name, entry); diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h index b2d9103..224dab5 100644 --- a/contrib/binutils/ld/ldemul.h +++ b/contrib/binutils/ld/ldemul.h @@ -1,5 +1,6 @@ /* ld-emul.h - Linker emulation header file - Copyright 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -16,11 +17,6 @@ #ifndef LDEMUL_H #define LDEMUL_H -#if ANSI_PROTOTYPES -struct lang_input_statement_struct; -struct search_dirs; -#endif - extern void ldemul_hll PARAMS ((char *)); extern void ldemul_syslib PARAMS ((char *)); extern void ldemul_after_parse PARAMS ((void)); @@ -58,8 +54,7 @@ extern void hll_default PARAMS ((char*)); extern int ldemul_find_potential_libraries PARAMS ((char *, struct lang_input_statement_struct *)); -typedef struct ld_emulation_xfer_struct -{ +typedef struct ld_emulation_xfer_struct { /* Run before parsing the command line and script file. Set the architecture, maybe other things. */ void (*before_parse) PARAMS ((void)); @@ -116,12 +111,12 @@ typedef struct ld_emulation_xfer_struct boolean (*place_orphan) PARAMS ((struct lang_input_statement_struct *, asection *)); - /* Run after assigning parsing with the args, but before - reading the script. Used to initialize symbols used in the script. */ + /* Run after assigning parsing with the args, but before + reading the script. Used to initialize symbols used in the script. */ void (*set_symbols) PARAMS ((void)); /* Run to parse args which the base linker doesn't - understand. Return non zero on sucess. */ + understand. Return non zero on sucess. */ int (*parse_args) PARAMS ((int, char **)); /* Run to handle files which are not recognized as object files or @@ -143,13 +138,12 @@ typedef struct ld_emulation_xfer_struct (For VMS files matching ":lib*.a" have also been scanned). */ int (* find_potential_libraries) PARAMS ((char *, struct lang_input_statement_struct *)); - + } ld_emulation_xfer_type; -typedef enum -{ +typedef enum { intel_ic960_ld_mode_enum, - default_mode_enum , + default_mode_enum, intel_gld960_ld_mode_enum } lang_emulation_mode_enum_type; diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c index 0c38314..cc34274 100644 --- a/contrib/binutils/ld/ldexp.c +++ b/contrib/binutils/ld/ldexp.c @@ -1,7 +1,7 @@ /* This module handles expression trees. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. - Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com). + Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>. This file is part of GLD, the Gnu Linker. @@ -20,15 +20,12 @@ along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* -This module is in charge of working out the contents of expressions. - -It has to keep track of the relative/absness of a symbol etc. This is -done by keeping all values in a struct (an etree_value_type) which -contains a value, a section to which it is relative and a valid bit. - -*/ +/* This module is in charge of working out the contents of expressions. + It has to keep track of the relative/absness of a symbol etc. This + is done by keeping all values in a struct (an etree_value_type) + which contains a value, a section to which it is relative and a + valid bit. */ #include "bfd.h" #include "sysdep.h" @@ -69,71 +66,71 @@ static void exp_print_token (code) token_code_type code; { - static CONST struct - { - token_code_type code; - char *name; - } table[] = - { - { INT, "int" }, - { REL, "relocateable" }, - { NAME,"NAME" }, - { PLUSEQ,"+=" }, - { MINUSEQ,"-=" }, - { MULTEQ,"*=" }, - { DIVEQ,"/=" }, - { LSHIFTEQ,"<<=" }, - { RSHIFTEQ,">>=" }, - { ANDEQ,"&=" }, - { OREQ,"|=" }, - { OROR,"||" }, - { ANDAND,"&&" }, - { EQ,"==" }, - { NE,"!=" }, - { LE,"<=" }, - { GE,">=" }, - { LSHIFT,"<<" }, - { RSHIFT,">>=" }, - { ALIGN_K,"ALIGN" }, - { BLOCK,"BLOCK" }, - { SECTIONS,"SECTIONS" }, - { SIZEOF_HEADERS,"SIZEOF_HEADERS" }, - { NEXT,"NEXT" }, - { SIZEOF,"SIZEOF" }, - { ADDR,"ADDR" }, - { LOADADDR,"LOADADDR" }, - { MEMORY,"MEMORY" }, - { DEFINED,"DEFINED" }, - { TARGET_K,"TARGET" }, - { SEARCH_DIR,"SEARCH_DIR" }, - { MAP,"MAP" }, - { QUAD,"QUAD" }, - { SQUAD,"SQUAD" }, - { LONG,"LONG" }, - { SHORT,"SHORT" }, - { BYTE,"BYTE" }, - { ENTRY,"ENTRY" }, - { 0,(char *)NULL } - }; + static CONST struct { + token_code_type code; + char *name; + } table[] = { + { INT, "int" }, + { REL, "relocateable" }, + { NAME, "NAME" }, + { PLUSEQ, "+=" }, + { MINUSEQ, "-=" }, + { MULTEQ, "*=" }, + { DIVEQ, "/=" }, + { LSHIFTEQ, "<<=" }, + { RSHIFTEQ, ">>=" }, + { ANDEQ, "&=" }, + { OREQ, "|=" }, + { OROR, "||" }, + { ANDAND, "&&" }, + { EQ, "==" }, + { NE, "!=" }, + { LE, "<=" }, + { GE, ">=" }, + { LSHIFT, "<<" }, + { RSHIFT, ">>=" }, + { ALIGN_K, "ALIGN" }, + { BLOCK, "BLOCK" }, + { SECTIONS, "SECTIONS" }, + { SIZEOF_HEADERS, "SIZEOF_HEADERS" }, + { NEXT, "NEXT" }, + { SIZEOF, "SIZEOF" }, + { ADDR, "ADDR" }, + { LOADADDR, "LOADADDR" }, + { MEMORY, "MEMORY" }, + { DEFINED, "DEFINED" }, + { TARGET_K, "TARGET" }, + { SEARCH_DIR, "SEARCH_DIR" }, + { MAP, "MAP" }, + { QUAD, "QUAD" }, + { SQUAD, "SQUAD" }, + { LONG, "LONG" }, + { SHORT, "SHORT" }, + { BYTE, "BYTE" }, + { ENTRY, "ENTRY" }, + { 0, (char *) NULL } + }; unsigned int idx; - for (idx = 0; table[idx].name != (char*)NULL; idx++) { - if (table[idx].code == code) { - fprintf(config.map_file, "%s", table[idx].name); - return; + for (idx = 0; table[idx].name != (char *) NULL; idx++) + { + if (table[idx].code == code) + { + fprintf (config.map_file, "%s", table[idx].name); + return; + } } - } /* Not in table, just print it alone */ - fprintf(config.map_file, "%c",code); + fprintf (config.map_file, "%c", code); } -static void +static void make_abs (ptr) etree_value_type *ptr; { - asection *s = ptr->section->bfd_section; - ptr->value += s->vma; - ptr->section = abs_output_section; + asection *s = ptr->section->bfd_section; + ptr->value += s->vma; + ptr->section = abs_output_section; } static etree_value_type @@ -147,7 +144,7 @@ new_abs (value) return new; } -static void +static void check (os, name, op) lang_output_section_statement_type *os; const char *name; @@ -163,7 +160,7 @@ etree_type * exp_intop (value) bfd_vma value; { - etree_type *new = (etree_type *) stat_alloc(sizeof(new->value)); + etree_type *new = (etree_type *) stat_alloc (sizeof (new->value)); new->type.node_code = INT; new->value.value = value; new->type.node_class = etree_value; @@ -208,12 +205,12 @@ new_rel_from_section (value, section) new.value = value; new.section = section; - new.value -= section->bfd_section->vma; + new.value -= section->bfd_section->vma; return new; } -static etree_value_type +static etree_value_type fold_binary (tree, current_section, allocation_done, dot, dotp) etree_type *tree; lang_output_section_statement_type *current_section; @@ -231,7 +228,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp) other = exp_fold_tree (tree->binary.rhs, current_section, - allocation_done, dot,dotp) ; + allocation_done, dot, dotp); if (other.valid_p) { /* If the values are from different sections, or this is an @@ -260,11 +257,11 @@ fold_binary (tree, current_section, allocation_done, dot, dotp) else if (result.section != other.section || current_section == abs_output_section) { - make_abs(&result); - make_abs(&other); + make_abs (&result); + make_abs (&other); } - switch (tree->type.node_code) + switch (tree->type.node_code) { case '%': if (other.value == 0) @@ -281,22 +278,22 @@ fold_binary (tree, current_section, allocation_done, dot, dotp) break; #define BOP(x,y) case x : result.value = result.value y other.value; break; - BOP('+',+); - BOP('*',*); - BOP('-',-); - BOP(LSHIFT,<<); - BOP(RSHIFT,>>); - BOP(EQ,==); - BOP(NE,!=); - BOP('<',<); - BOP('>',>); - BOP(LE,<=); - BOP(GE,>=); - BOP('&',&); - BOP('^',^); - BOP('|',|); - BOP(ANDAND,&&); - BOP(OROR,||); + BOP ('+', +); + BOP ('*', *); + BOP ('-', -); + BOP (LSHIFT, <<); + BOP (RSHIFT, >>); + BOP (EQ, ==); + BOP (NE, !=); + BOP ('<', <); + BOP ('>', >); + BOP (LE, <=); + BOP (GE, >=); + BOP ('&', &); + BOP ('^', ^); + BOP ('|', |); + BOP (ANDAND, &&); + BOP (OROR, ||); case MAX_K: if (result.value < other.value) @@ -309,7 +306,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp) break; default: - FAIL(); + FAIL (); } } else @@ -321,7 +318,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp) return result; } -etree_value_type +etree_value_type invalid () { etree_value_type new; @@ -329,156 +326,157 @@ invalid () return new; } -static etree_value_type +static etree_value_type fold_name (tree, current_section, allocation_done, dot) etree_type *tree; lang_output_section_statement_type *current_section; - lang_phase_type allocation_done; + lang_phase_type allocation_done; bfd_vma dot; { etree_value_type result; - switch (tree->type.node_code) - { - case SIZEOF_HEADERS: - if (allocation_done != lang_first_phase_enum) - { - result = new_abs ((bfd_vma) - bfd_sizeof_headers (output_bfd, - link_info.relocateable)); - } - else - { - result.valid_p = false; - } - break; - case DEFINED: - if (allocation_done == lang_first_phase_enum) + switch (tree->type.node_code) + { + case SIZEOF_HEADERS: + if (allocation_done != lang_first_phase_enum) + { + result = new_abs ((bfd_vma) + bfd_sizeof_headers (output_bfd, + link_info.relocateable)); + } + else + { result.valid_p = false; - else - { - struct bfd_link_hash_entry *h; - - h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info, - tree->name.name, - false, false, true); - result.value = (h != (struct bfd_link_hash_entry *) NULL - && (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak - || h->type == bfd_link_hash_common)); - result.section = 0; - result.valid_p = true; - } - break; - case NAME: + } + break; + case DEFINED: + if (allocation_done == lang_first_phase_enum) result.valid_p = false; - if (tree->name.name[0] == '.' && tree->name.name[1] == 0) - { - if (allocation_done != lang_first_phase_enum) - result = new_rel_from_section(dot, current_section); - else - result = invalid(); - } - else if (allocation_done != lang_first_phase_enum) - { - struct bfd_link_hash_entry *h; - - h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info, - tree->name.name, - false, false, true); - if (h != NULL - && (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak)) - { - if (bfd_is_abs_section (h->u.def.section)) - result = new_abs (h->u.def.value); - else if (allocation_done == lang_final_phase_enum - || allocation_done == lang_allocating_phase_enum) - { - asection *output_section; - - output_section = h->u.def.section->output_section; - if (output_section == NULL) - einfo (_("%X%S: unresolvable symbol `%s' referenced in expression\n"), - tree->name.name); - else - { - lang_output_section_statement_type *os; - - os = (lang_output_section_statement_lookup - (bfd_get_section_name (output_bfd, - output_section))); - - /* FIXME: Is this correct if this section is - being linked with -R? */ - result = new_rel ((h->u.def.value - + h->u.def.section->output_offset), - os); - } - } - } - else if (allocation_done == lang_final_phase_enum) - einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"), - tree->name.name); - } - break; - - case ADDR: - if (allocation_done != lang_first_phase_enum) - { - lang_output_section_statement_type *os; - - os = lang_output_section_find (tree->name.name); - check (os, tree->name.name, "ADDR"); + else + { + struct bfd_link_hash_entry *h; + + h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info, + tree->name.name, + false, false, true); + result.value = (h != (struct bfd_link_hash_entry *) NULL + && (h->type == bfd_link_hash_defined + || h->type == bfd_link_hash_defweak + || h->type == bfd_link_hash_common)); + result.section = 0; + result.valid_p = true; + } + break; + case NAME: + result.valid_p = false; + if (tree->name.name[0] == '.' && tree->name.name[1] == 0) + { + if (allocation_done != lang_first_phase_enum) + result = new_rel_from_section (dot, current_section); + else + result = invalid (); + } + else if (allocation_done != lang_first_phase_enum) + { + struct bfd_link_hash_entry *h; + + h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info, + tree->name.name, + false, false, true); + if (h != NULL + && (h->type == bfd_link_hash_defined + || h->type == bfd_link_hash_defweak)) + { + if (bfd_is_abs_section (h->u.def.section)) + result = new_abs (h->u.def.value); + else if (allocation_done == lang_final_phase_enum + || allocation_done == lang_allocating_phase_enum) + { + asection *output_section; + + output_section = h->u.def.section->output_section; + if (output_section == NULL) + einfo (_("%X%S: unresolvable symbol `%s' referenced in expression\n"), + tree->name.name); + else + { + lang_output_section_statement_type *os; + + os = (lang_output_section_statement_lookup + (bfd_get_section_name (output_bfd, + output_section))); + + /* FIXME: Is this correct if this section is + being linked with -R? */ + result = new_rel ((h->u.def.value + + h->u.def.section->output_offset), + os); + } + } + } + else if (allocation_done == lang_final_phase_enum) + einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"), + tree->name.name); + } + break; + + case ADDR: + if (allocation_done != lang_first_phase_enum) + { + lang_output_section_statement_type *os; + + os = lang_output_section_find (tree->name.name); + check (os, tree->name.name, "ADDR"); + result = new_rel (0, os); + } + else + result = invalid (); + break; + + case LOADADDR: + if (allocation_done != lang_first_phase_enum) + { + lang_output_section_statement_type *os; + + os = lang_output_section_find (tree->name.name); + check (os, tree->name.name, "LOADADDR"); + if (os->load_base == NULL) result = new_rel (0, os); - } - else - result = invalid (); - break; - - case LOADADDR: - if (allocation_done != lang_first_phase_enum) - { - lang_output_section_statement_type *os; - - os = lang_output_section_find (tree->name.name); - check (os, tree->name.name, "LOADADDR"); - if (os->load_base == NULL) - result = new_rel (0, os); - else - result = exp_fold_tree_no_dot (os->load_base, - abs_output_section, - allocation_done); - } - else - result = invalid (); - break; - - case SIZEOF: - if (allocation_done != lang_first_phase_enum) - { - int opb = bfd_octets_per_byte (output_bfd); - lang_output_section_statement_type *os; - - os = lang_output_section_find (tree->name.name); - check (os, tree->name.name, "SIZEOF"); - result = new_abs (os->bfd_section->_raw_size / opb); - } - else - result = invalid (); - break; - - default: - FAIL(); - break; - } + else + result = exp_fold_tree_no_dot (os->load_base, + abs_output_section, + allocation_done); + } + else + result = invalid (); + break; + + case SIZEOF: + if (allocation_done != lang_first_phase_enum) + { + int opb = bfd_octets_per_byte (output_bfd); + lang_output_section_statement_type *os; + + os = lang_output_section_find (tree->name.name); + check (os, tree->name.name, "SIZEOF"); + result = new_abs (os->bfd_section->_raw_size / opb); + } + else + result = invalid (); + break; + + default: + FAIL (); + break; + } return result; } -etree_value_type + +etree_value_type exp_fold_tree (tree, current_section, allocation_done, dot, dotp) etree_type *tree; lang_output_section_statement_type *current_section; - lang_phase_type allocation_done; + lang_phase_type allocation_done; bfd_vma dot; bfd_vma *dotp; { @@ -490,7 +488,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) return result; } - switch (tree->type.node_class) + switch (tree->type.node_class) { case etree_value: result = new_rel (tree->value.value, current_section); @@ -508,8 +506,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) case etree_assert: result = exp_fold_tree (tree->assert_s.child, - current_section, - allocation_done, dot, dotp); + current_section, + allocation_done, dot, dotp); if (result.valid_p) { if (! result.value) @@ -524,7 +522,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) allocation_done, dot, dotp); if (result.valid_p) { - switch (tree->type.node_code) + switch (tree->type.node_code) { case ALIGN_K: if (allocation_done != lang_first_phase_enum) @@ -540,7 +538,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) result.value += result.section->bfd_section->vma; result.section = abs_output_section; } - else + else result.valid_p = false; break; @@ -627,7 +625,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) dot, nextdot); } else - *dotp = nextdot; + *dotp = nextdot; } } } @@ -685,14 +683,14 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) return result; } -static etree_value_type +static etree_value_type exp_fold_tree_no_dot (tree, current_section, allocation_done) etree_type *tree; lang_output_section_statement_type *current_section; lang_phase_type allocation_done; { -return exp_fold_tree(tree, current_section, allocation_done, (bfd_vma) - 0, (bfd_vma *)NULL); + return exp_fold_tree (tree, current_section, allocation_done, + (bfd_vma) 0, (bfd_vma *) NULL); } etree_type * @@ -708,15 +706,15 @@ exp_binop (code, lhs, rhs) value.binary.lhs = lhs; value.binary.rhs = rhs; value.type.node_class = etree_binary; - r = exp_fold_tree_no_dot(&value, - abs_output_section, - lang_first_phase_enum ); + r = exp_fold_tree_no_dot (&value, + abs_output_section, + lang_first_phase_enum); if (r.valid_p) { - return exp_intop(r.value); + return exp_intop (r.value); } new = (etree_type *) stat_alloc (sizeof (new->binary)); - memcpy((char *)new, (char *)&value, sizeof(new->binary)); + memcpy ((char *) new, (char *) &value, sizeof (new->binary)); return new; } @@ -734,17 +732,18 @@ exp_trinop (code, cond, lhs, rhs) value.trinary.cond = cond; value.trinary.rhs = rhs; value.type.node_class = etree_trinary; - r= exp_fold_tree_no_dot(&value, (lang_output_section_statement_type - *)NULL,lang_first_phase_enum); - if (r.valid_p) { - return exp_intop(r.value); - } + r = exp_fold_tree_no_dot (&value, + (lang_output_section_statement_type *) NULL, + lang_first_phase_enum); + if (r.valid_p) + { + return exp_intop (r.value); + } new = (etree_type *) stat_alloc (sizeof (new->trinary)); - memcpy((char *)new,(char *) &value, sizeof(new->trinary)); + memcpy ((char *) new, (char *) &value, sizeof (new->trinary)); return new; } - etree_type * exp_unop (code, child) int code; @@ -756,17 +755,17 @@ exp_unop (code, child) value.unary.type.node_code = code; value.unary.child = child; value.unary.type.node_class = etree_unary; - r = exp_fold_tree_no_dot(&value,abs_output_section, - lang_first_phase_enum); - if (r.valid_p) { - return exp_intop(r.value); - } + r = exp_fold_tree_no_dot (&value, abs_output_section, + lang_first_phase_enum); + if (r.valid_p) + { + return exp_intop (r.value); + } new = (etree_type *) stat_alloc (sizeof (new->unary)); - memcpy((char *)new, (char *)&value, sizeof(new->unary)); + memcpy ((char *) new, (char *) &value, sizeof (new->unary)); return new; } - etree_type * exp_nameop (code, name) int code; @@ -778,22 +777,19 @@ exp_nameop (code, name) value.name.name = name; value.name.type.node_class = etree_name; - - r = exp_fold_tree_no_dot(&value, - (lang_output_section_statement_type *)NULL, - lang_first_phase_enum); - if (r.valid_p) { - return exp_intop(r.value); - } + r = exp_fold_tree_no_dot (&value, + (lang_output_section_statement_type *) NULL, + lang_first_phase_enum); + if (r.valid_p) + { + return exp_intop (r.value); + } new = (etree_type *) stat_alloc (sizeof (new->name)); - memcpy((char *)new, (char *)&value, sizeof(new->name)); + memcpy ((char *) new, (char *) &value, sizeof (new->name)); return new; } - - - etree_type * exp_assop (code, dst, src) int code; @@ -804,18 +800,18 @@ exp_assop (code, dst, src) value.assign.type.node_code = code; - value.assign.src = src; value.assign.dst = dst; value.assign.type.node_class = etree_assign; #if 0 - if (exp_fold_tree_no_dot(&value, &result)) { - return exp_intop(result); - } + if (exp_fold_tree_no_dot (&value, &result)) + { + return exp_intop (result); + } #endif - new = (etree_type*) stat_alloc (sizeof (new->assign)); - memcpy((char *)new, (char *)&value, sizeof(new->assign)); + new = (etree_type *) stat_alloc (sizeof (new->assign)); + memcpy ((char *) new, (char *) &value, sizeof (new->assign)); return new; } @@ -853,86 +849,90 @@ exp_assert (exp, message) return n; } -void +void exp_print_tree (tree) etree_type *tree; { - switch (tree->type.node_class) { - case etree_value: - minfo ("0x%v", tree->value.value); - return; - case etree_rel: - if (tree->rel.section->owner != NULL) - minfo ("%B:", tree->rel.section->owner); - minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value); - return; - case etree_assign: + switch (tree->type.node_class) + { + case etree_value: + minfo ("0x%v", tree->value.value); + return; + case etree_rel: + if (tree->rel.section->owner != NULL) + minfo ("%B:", tree->rel.section->owner); + minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value); + return; + case etree_assign: #if 0 - if (tree->assign.dst->sdefs != (asymbol *)NULL){ - fprintf(config.map_file,"%s (%x) ",tree->assign.dst->name, - tree->assign.dst->sdefs->value); - } - else { - fprintf(config.map_file,"%s (UNDEFINED)",tree->assign.dst->name); - } + if (tree->assign.dst->sdefs != (asymbol *) NULL) + { + fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name, + tree->assign.dst->sdefs->value); + } + else + { + fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name); + } #endif - fprintf(config.map_file,"%s",tree->assign.dst); - exp_print_token(tree->type.node_code); - exp_print_tree(tree->assign.src); - break; - case etree_provide: - fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst); - exp_print_tree (tree->assign.src); - fprintf (config.map_file, ")"); - break; - case etree_binary: - fprintf(config.map_file,"("); - exp_print_tree(tree->binary.lhs); - exp_print_token(tree->type.node_code); - exp_print_tree(tree->binary.rhs); - fprintf(config.map_file,")"); - break; - case etree_trinary: - exp_print_tree(tree->trinary.cond); - fprintf(config.map_file,"?"); - exp_print_tree(tree->trinary.lhs); - fprintf(config.map_file,":"); - exp_print_tree(tree->trinary.rhs); - break; - case etree_unary: - exp_print_token(tree->unary.type.node_code); - if (tree->unary.child) - { - fprintf(config.map_file,"("); - exp_print_tree(tree->unary.child); - fprintf(config.map_file,")"); - } - - break; - - case etree_assert: - fprintf (config.map_file, "ASSERT ("); - exp_print_tree (tree->assert_s.child); - fprintf (config.map_file, ", %s)", tree->assert_s.message); - break; - - case etree_undef: - fprintf(config.map_file,"????????"); - break; - case etree_name: - if (tree->type.node_code == NAME) { - fprintf(config.map_file,"%s", tree->name.name); - } - else { - exp_print_token(tree->type.node_code); - if (tree->name.name) - fprintf(config.map_file,"(%s)", tree->name.name); + fprintf (config.map_file, "%s", tree->assign.dst); + exp_print_token (tree->type.node_code); + exp_print_tree (tree->assign.src); + break; + case etree_provide: + fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst); + exp_print_tree (tree->assign.src); + fprintf (config.map_file, ")"); + break; + case etree_binary: + fprintf (config.map_file, "("); + exp_print_tree (tree->binary.lhs); + exp_print_token (tree->type.node_code); + exp_print_tree (tree->binary.rhs); + fprintf (config.map_file, ")"); + break; + case etree_trinary: + exp_print_tree (tree->trinary.cond); + fprintf (config.map_file, "?"); + exp_print_tree (tree->trinary.lhs); + fprintf (config.map_file, ":"); + exp_print_tree (tree->trinary.rhs); + break; + case etree_unary: + exp_print_token (tree->unary.type.node_code); + if (tree->unary.child) + { + fprintf (config.map_file, "("); + exp_print_tree (tree->unary.child); + fprintf (config.map_file, ")"); + } + break; + + case etree_assert: + fprintf (config.map_file, "ASSERT ("); + exp_print_tree (tree->assert_s.child); + fprintf (config.map_file, ", %s)", tree->assert_s.message); + break; + + case etree_undef: + fprintf (config.map_file, "????????"); + break; + case etree_name: + if (tree->type.node_code == NAME) + { + fprintf (config.map_file, "%s", tree->name.name); + } + else + { + exp_print_token (tree->type.node_code); + if (tree->name.name) + fprintf (config.map_file, "(%s)", tree->name.name); + } + break; + default: + FAIL (); + break; } - break; - default: - FAIL(); - break; - } } bfd_vma @@ -955,17 +955,16 @@ exp_get_vma (tree, def, name, allocation_done) return def; } -int -exp_get_value_int (tree,def,name, allocation_done) +int +exp_get_value_int (tree, def, name, allocation_done) etree_type *tree; int def; char *name; lang_phase_type allocation_done; { - return (int)exp_get_vma(tree,(bfd_vma)def,name, allocation_done); + return (int) exp_get_vma (tree, (bfd_vma) def, name, allocation_done); } - bfd_vma exp_get_abs_int (tree, def, name, allocation_done) etree_type *tree; @@ -980,8 +979,9 @@ exp_get_abs_int (tree, def, name, allocation_done) { res.value += res.section->bfd_section->vma; } - else { - einfo (_("%F%S non constant expression for %s\n"),name); - } + else + { + einfo (_("%F%S non constant expression for %s\n"), name); + } return res.value; } diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h index b8e8ddf..4c507bd 100644 --- a/contrib/binutils/ld/ldexp.h +++ b/contrib/binutils/ld/ldexp.h @@ -1,5 +1,6 @@ /* ldexp.h - - Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 98, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -22,17 +23,13 @@ #define LDEXP_H /* The result of an expression tree */ -typedef struct -{ +typedef struct { bfd_vma value; struct lang_output_section_statement_struct *section; boolean valid_p; } etree_value_type; - - -typedef struct -{ +typedef struct { int node_code; enum { etree_binary, etree_trinary, @@ -47,10 +44,7 @@ typedef struct etree_rel } node_class; } node_type; - - -typedef union etree_union -{ +typedef union etree_union { node_type type; struct { node_type type; @@ -71,11 +65,11 @@ typedef union etree_union struct { node_type type; - union etree_union *child; + union etree_union *child; } unary; struct { node_type type; - CONST char *name; + CONST char *name; } name; struct { node_type type; @@ -93,7 +87,6 @@ typedef union etree_union } assert_s; } etree_type; - etree_type *exp_intop PARAMS ((bfd_vma)); etree_type *exp_relop PARAMS ((asection *, bfd_vma)); etree_value_type invalid PARAMS ((void)); @@ -110,7 +103,7 @@ etree_type *exp_provide PARAMS ((const char *, etree_type *)); etree_type *exp_assert PARAMS ((etree_type *, const char *)); void exp_print_tree PARAMS ((etree_type *)); bfd_vma exp_get_vma PARAMS ((etree_type *, bfd_vma, char *, lang_phase_type)); -int exp_get_value_int PARAMS ((etree_type *, int, char *,lang_phase_type)); -bfd_vma exp_get_abs_int PARAMS ((etree_type *, int, char *,lang_phase_type)); +int exp_get_value_int PARAMS ((etree_type *, int, char *, lang_phase_type)); +bfd_vma exp_get_abs_int PARAMS ((etree_type *, int, char *, lang_phase_type)); #endif diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c index 9613c07..fbb4685 100644 --- a/contrib/binutils/ld/ldfile.c +++ b/contrib/binutils/ld/ldfile.c @@ -19,12 +19,7 @@ along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - ldfile.c - - look after all the file stuff - - */ +/* ldfile.c: look after all the file stuff. */ #include "bfd.h" #include "sysdep.h" @@ -59,7 +54,7 @@ char *slash = "/"; #endif #endif #else /* MPW */ -/* The MPW path char is a colon. */ +/* The MPW path char is a colon. */ char *slash = ":"; #endif /* MPW */ @@ -67,15 +62,14 @@ char *slash = ":"; static search_dirs_type **search_tail_ptr = &search_head; -typedef struct search_arch -{ - char *name; +typedef struct search_arch { + char *name; struct search_arch *next; } search_arch_type; static search_arch_type *search_arch_head; static search_arch_type **search_arch_tail_ptr = &search_arch_head; - + static FILE *try_open PARAMS ((const char *name, const char *exten)); void @@ -137,7 +131,7 @@ ldfile_try_open_bfd (attempt, entry) return true; if (bfd_arch_get_compatible (check, output_bfd) == NULL) { - einfo (_("%P: skipping incompatible %s when searching for %s"), + einfo (_("%P: skipping incompatible %s when searching for %s\n"), attempt, entry->local_sym_name); bfd_close (entry->the_bfd); entry->the_bfd = NULL; @@ -170,8 +164,8 @@ ldfile_open_file_search (arch, entry, lib, suffix) } for (search = search_head; - search != (search_dirs_type *)NULL; - search = search->next) + search != (search_dirs_type *) NULL; + search = search->next) { char *string; @@ -194,8 +188,8 @@ ldfile_open_file_search (arch, entry, lib, suffix) lib, entry->filename, arch, suffix); else if (entry->filename[0] == '/' || entry->filename[0] == '.' #if defined (__MSDOS__) || defined (_WIN32) - || entry->filename[0] == '\\' - || (isalpha (entry->filename[0]) + || entry->filename[0] == '\\' + || (isalpha (entry->filename[0]) && entry->filename[1] == ':') #endif ) @@ -232,7 +226,7 @@ ldfile_open_file (entry) einfo (_("%F%P: cannot open %s for %s: %E\n"), entry->filename, entry->local_sym_name); else - einfo(_("%F%P: cannot open %s: %E\n"), entry->local_sym_name); + einfo (_("%F%P: cannot open %s: %E\n"), entry->local_sym_name); } else { @@ -252,6 +246,7 @@ ldfile_open_file (entry) if (ldemul_find_potential_libraries (arch->name, entry)) return; } + einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name); } } @@ -267,6 +262,7 @@ try_open (name, exten) char buff[1000]; result = fopen (name, "r"); + if (trace_file_tries) { if (result == NULL) @@ -282,6 +278,7 @@ try_open (name, exten) { sprintf (buff, "%s%s", name, exten); result = fopen (buff, "r"); + if (trace_file_tries) { if (result == NULL) @@ -306,18 +303,23 @@ ldfile_find_command_file (name, extend) FILE *result; char buffer[1000]; - /* First try raw name */ - result = try_open(name,""); - if (result == (FILE *)NULL) { - /* Try now prefixes */ - for (search = search_head; - search != (search_dirs_type *)NULL; - search = search->next) { - sprintf(buffer,"%s%s%s", search->name, slash, name); - result = try_open(buffer, extend); - if (result)break; + /* First try raw name. */ + result = try_open (name, ""); + if (result == (FILE *) NULL) + { + /* Try now prefixes. */ + for (search = search_head; + search != (search_dirs_type *) NULL; + search = search->next) + { + sprintf (buffer, "%s%s%s", search->name, slash, name); + + result = try_open (buffer, extend); + if (result) + break; + } } - } + return result; } @@ -326,31 +328,29 @@ ldfile_open_command_file (name) const char *name; { FILE *ldlex_input_stack; - ldlex_input_stack = ldfile_find_command_file(name, ""); - - if (ldlex_input_stack == (FILE *)NULL) { - bfd_set_error (bfd_error_system_call); - einfo(_("%P%F: cannot open linker script file %s: %E\n"),name); - } - lex_push_file(ldlex_input_stack, name); - + ldlex_input_stack = ldfile_find_command_file (name, ""); + + if (ldlex_input_stack == (FILE *) NULL) + { + bfd_set_error (bfd_error_system_call); + einfo (_("%P%F: cannot open linker script file %s: %E\n"), name); + } + + lex_push_file (ldlex_input_stack, name); + ldfile_input_filename = name; lineno = 1; had_script = true; } - - - - #ifdef GNU960 -static -char * -gnu960_map_archname( name ) -char *name; +static char * +gnu960_map_archname (name) + char *name; { struct tabentry { char *cmd_switch; char *arch; }; - static struct tabentry arch_tab[] = { + static struct tabentry arch_tab[] = + { "", "", "KA", "ka", "KB", "kb", @@ -362,60 +362,57 @@ char *name; NULL, "" }; struct tabentry *tp; - - for ( tp = arch_tab; tp->cmd_switch != NULL; tp++ ){ - if ( !strcmp(name,tp->cmd_switch) ){ - break; + for (tp = arch_tab; tp->cmd_switch != NULL; tp++) + { + if (! strcmp (name,tp->cmd_switch)) + break; } - } - if ( tp->cmd_switch == NULL ){ - einfo(_("%P%F: unknown architecture: %s\n"),name); - } + if (tp->cmd_switch == NULL) + einfo (_("%P%F: unknown architecture: %s\n"), name); + return tp->arch; } - - void -ldfile_add_arch(name) -char *name; +ldfile_add_arch (name) + char *name; { search_arch_type *new = - (search_arch_type *)xmalloc((bfd_size_type)(sizeof(search_arch_type))); + (search_arch_type *) xmalloc ((bfd_size_type) (sizeof (search_arch_type))); + if (*name != '\0') + { + if (ldfile_output_machine_name[0] != '\0') + { + einfo (_("%P%F: target architecture respecified\n")); + return; + } - if (*name != '\0') { - if (ldfile_output_machine_name[0] != '\0') { - einfo(_("%P%F: target architecture respecified\n")); - return; + ldfile_output_machine_name = name; } - ldfile_output_machine_name = name; - } - new->next = (search_arch_type*)NULL; - new->name = gnu960_map_archname( name ); + new->next = (search_arch_type *) NULL; + new->name = gnu960_map_archname (name); *search_arch_tail_ptr = new; search_arch_tail_ptr = &new->next; - } -#else /* not GNU960 */ - +#else /* not GNU960 */ void ldfile_add_arch (in_name) - CONST char * in_name; + CONST char *in_name; { - char *name = buystring(in_name); + char *name = buystring (in_name); search_arch_type *new = (search_arch_type *) xmalloc (sizeof (search_arch_type)); ldfile_output_machine_name = in_name; new->name = name; - new->next = (search_arch_type*)NULL; + new->next = (search_arch_type *) NULL; while (*name) { if (isupper ((unsigned char) *name)) @@ -428,19 +425,22 @@ ldfile_add_arch (in_name) } #endif -/* Set the output architecture */ +/* Set the output architecture. */ + void ldfile_set_output_arch (string) CONST char *string; { - const bfd_arch_info_type *arch = bfd_scan_arch(string); - - if (arch) { - ldfile_output_architecture = arch->arch; - ldfile_output_machine = arch->mach; - ldfile_output_machine_name = arch->printable_name; - } - else { - einfo(_("%P%F: cannot represent machine `%s'\n"), string); - } + const bfd_arch_info_type *arch = bfd_scan_arch (string); + + if (arch) + { + ldfile_output_architecture = arch->arch; + ldfile_output_machine = arch->mach; + ldfile_output_machine_name = arch->printable_name; + } + else + { + einfo (_("%P%F: cannot represent machine `%s'\n"), string); + } } diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h index 9c9a4d6..35bd2dc 100644 --- a/contrib/binutils/ld/ldfile.h +++ b/contrib/binutils/ld/ldfile.h @@ -1,5 +1,5 @@ /* ldfile.h - - Copyright 1991, 1992 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -17,6 +17,9 @@ along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef LDFILE_H +#define LDFILE_H + extern const char *ldfile_input_filename; extern boolean ldfile_assumed_script; extern unsigned long ldfile_output_machine; @@ -26,8 +29,7 @@ extern const char *ldfile_output_machine_name; /* Structure used to hold the list of directories to search for libraries. */ -typedef struct search_dirs -{ +typedef struct search_dirs { /* Next directory on list. */ struct search_dirs *next; /* Name of directory. */ @@ -38,10 +40,6 @@ typedef struct search_dirs extern search_dirs_type *search_head; -#if ANSI_PROTOTYPES -struct lang_input_statement_struct; -#endif - extern void ldfile_add_arch PARAMS ((CONST char *)); extern void ldfile_add_library_path PARAMS ((const char *, boolean cmdline)); extern void ldfile_open_command_file PARAMS ((const char *name)); @@ -54,3 +52,5 @@ extern void ldfile_set_output_arch PARAMS ((CONST char *)); extern boolean ldfile_open_file_search PARAMS ((const char *arch, struct lang_input_statement_struct *, const char *lib, const char *suffix)); + +#endif diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y index 806ea1c..2c40478 100644 --- a/contrib/binutils/ld/ldgram.y +++ b/contrib/binutils/ld/ldgram.y @@ -33,8 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ldexp.h" #include "ldver.h" #include "ldlang.h" -#include "ldemul.h" #include "ldfile.h" +#include "ldemul.h" #include "ldmisc.h" #include "ldmain.h" #include "mri.h" @@ -619,7 +619,9 @@ memory_spec: NAME attributes_opt ':' origin_spec opt_comma length_spec - ; origin_spec: + ; + +origin_spec: ORIGIN '=' mustbe_exp { region->current = region->origin = @@ -1113,6 +1115,7 @@ vers_defns: } vers_defns '}' { + $$ = $5; ldgram_vers_current_lang = $<name>4; } ; diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo index 013e485..afb9890 100644 --- a/contrib/binutils/ld/ldint.texinfo +++ b/contrib/binutils/ld/ldint.texinfo @@ -12,12 +12,15 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the internals of the GNU linker ld. -Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". @ignore Permission is granted to process this file through Tex and print the @@ -26,9 +29,6 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy or distribute modified versions of this -manual under the terms of the GPL (for which purpose this text may be -regarded as a program in the language TeX). @end ifinfo @iftex @@ -43,7 +43,7 @@ regarded as a program in the language TeX). @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ -\xdef\manvers{\$Revision: 1.1.1.1 $} % For use in headers, footers too +\xdef\manvers{2.10.91} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Support\par \hfill \manvers\par @@ -52,12 +52,15 @@ regarded as a program in the language TeX). @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 93, 94, 95, 96, 97, 1998 +Copyright @copyright{} 1992, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". @end titlepage @end iftex @@ -70,10 +73,15 @@ collection of miscellaneous information with little form at this point. Mostly, it is a repository into which you can put information about GNU @code{ld} as you discover it (or as you design changes to @code{ld}). +This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the +section entitled "GNU Free Documentation License". + @menu * README:: The README File * Emulations:: How linker emulations are generated * Emulation Walkthrough:: A Walkthrough of a Typical Emulation +* GNU Free Documentation License:: GNU Free Documentation License @end menu @node README @@ -560,5 +568,368 @@ In summary, @end itemize +@node GNU Free Documentation License +@chapter GNU Free Documentation License + + GNU Free Documentation License + + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +@end smallexample + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + @contents @bye diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c index 8f0c607..32097fa 100644 --- a/contrib/binutils/ld/ldlang.c +++ b/contrib/binutils/ld/ldlang.c @@ -1,5 +1,5 @@ /* Linker command language support. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -30,11 +30,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldgram.h" #include "ldexp.h" #include "ldlang.h" -#include "ldemul.h" #include "ldlex.h" #include "ldmisc.h" #include "ldctor.h" #include "ldfile.h" +#include "ldemul.h" #include "fnmatch.h" #include "demangle.h" @@ -43,92 +43,88 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* FORWARDS */ static lang_statement_union_type *new_statement PARAMS ((enum statement_enum, size_t, - lang_statement_list_type*)); - + lang_statement_list_type *)); /* LOCALS */ static struct obstack stat_obstack; #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -static CONST char *startup_file; +static const char *startup_file; static lang_statement_list_type input_file_chain; static boolean placed_commons = false; static lang_output_section_statement_type *default_common_section; static boolean map_option_f; static bfd_vma print_dot; static lang_input_statement_type *first_file; -static CONST char *current_target; -static CONST char *output_target; +static const char *current_target; +static const char *output_target; static lang_statement_list_type statement_list; static struct lang_phdr *lang_phdr_list; static void lang_for_each_statement_worker - PARAMS ((void (*func) (lang_statement_union_type *), - lang_statement_union_type *s)); + PARAMS ((void (*) (lang_statement_union_type *), + lang_statement_union_type *)); static lang_input_statement_type *new_afile - PARAMS ((const char *name, lang_input_file_enum_type file_type, - const char *target, boolean add_to_list)); -static void init_os PARAMS ((lang_output_section_statement_type *s)); + PARAMS ((const char *, lang_input_file_enum_type, const char *, boolean)); +static lang_memory_region_type *lang_memory_default PARAMS ((asection *)); +static void lang_map_flags PARAMS ((flagword)); +static void init_os PARAMS ((lang_output_section_statement_type *)); static void exp_init_os PARAMS ((etree_type *)); static void section_already_linked PARAMS ((bfd *, asection *, PTR)); static struct bfd_hash_entry *already_linked_newfunc - PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, - const char *string)); + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static void already_linked_table_init PARAMS ((void)); static void already_linked_table_free PARAMS ((void)); static boolean wildcardp PARAMS ((const char *)); static lang_statement_union_type *wild_sort PARAMS ((lang_wild_statement_type *, lang_input_statement_type *, asection *)); -static lang_input_statement_type *lookup_name PARAMS ((const char *name)); -static void load_symbols PARAMS ((lang_input_statement_type *entry, - lang_statement_list_type *)); -static void wild PARAMS ((lang_wild_statement_type *s, - const char *section, const char *file, - const char *target, - lang_output_section_statement_type *output)); -static bfd *open_output PARAMS ((const char *name)); -static void ldlang_open_output PARAMS ((lang_statement_union_type *statement)); -static void open_input_bfds - PARAMS ((lang_statement_union_type *statement, boolean)); +static void output_section_callback + PARAMS ((lang_wild_statement_type *, asection *, + lang_input_statement_type *, PTR)); +static lang_input_statement_type *lookup_name PARAMS ((const char *)); +static void load_symbols + PARAMS ((lang_input_statement_type *, lang_statement_list_type *)); +static void wild + PARAMS ((lang_wild_statement_type *, const char *, const char *, + const char *, lang_output_section_statement_type *)); +static bfd *open_output PARAMS ((const char *)); +static void ldlang_open_output PARAMS ((lang_statement_union_type *)); +static void open_input_bfds PARAMS ((lang_statement_union_type *, boolean)); static void lang_reasonable_defaults PARAMS ((void)); static void lang_place_undefineds PARAMS ((void)); static void map_input_to_output_sections - PARAMS ((lang_statement_union_type *s, - const char *target, - lang_output_section_statement_type *output_section_statement)); + PARAMS ((lang_statement_union_type *, const char *, + lang_output_section_statement_type *)); static void print_output_section_statement - PARAMS ((lang_output_section_statement_type *output_section_statement)); + PARAMS ((lang_output_section_statement_type *)); static void print_assignment - PARAMS ((lang_assignment_statement_type *assignment, - lang_output_section_statement_type *output_section)); -static void print_input_statement PARAMS ((lang_input_statement_type *statm)); + PARAMS ((lang_assignment_statement_type *, + lang_output_section_statement_type *)); +static void print_input_statement PARAMS ((lang_input_statement_type *)); static boolean print_one_symbol PARAMS ((struct bfd_link_hash_entry *, PTR)); -static void print_input_section PARAMS ((lang_input_section_type *in)); -static void print_fill_statement PARAMS ((lang_fill_statement_type *fill)); -static void print_data_statement PARAMS ((lang_data_statement_type *data)); +static void print_input_section PARAMS ((lang_input_section_type *)); +static void print_fill_statement PARAMS ((lang_fill_statement_type *)); +static void print_data_statement PARAMS ((lang_data_statement_type *)); static void print_address_statement PARAMS ((lang_address_statement_type *)); -static void print_reloc_statement PARAMS ((lang_reloc_statement_type *reloc)); -static void print_padding_statement PARAMS ((lang_padding_statement_type *s)); +static void print_reloc_statement PARAMS ((lang_reloc_statement_type *)); +static void print_padding_statement PARAMS ((lang_padding_statement_type *)); static void print_wild_statement - PARAMS ((lang_wild_statement_type *w, - lang_output_section_statement_type *os)); + PARAMS ((lang_wild_statement_type *, lang_output_section_statement_type *)); static void print_group PARAMS ((lang_group_statement_type *, lang_output_section_statement_type *)); -static void print_statement PARAMS ((lang_statement_union_type *s, - lang_output_section_statement_type *os)); -static void print_statement_list PARAMS ((lang_statement_union_type *s, - lang_output_section_statement_type *os)); +static void print_statement + PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *)); +static void print_statement_list + PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *)); static void print_statements PARAMS ((void)); -static bfd_vma insert_pad PARAMS ((lang_statement_union_type **this_ptr, - fill_type fill, unsigned int power, - asection *output_section_statement, - bfd_vma dot)); +static bfd_vma insert_pad + PARAMS ((lang_statement_union_type **, fill_type, + unsigned int, asection *, bfd_vma)); static bfd_vma size_input_section - PARAMS ((lang_statement_union_type **this_ptr, - lang_output_section_statement_type *output_section_statement, - fill_type fill, bfd_vma dot, boolean relax)); + PARAMS ((lang_statement_union_type **, lang_output_section_statement_type *, + fill_type, bfd_vma, boolean)); static void lang_finish PARAMS ((void)); static void ignore_bfd_errors PARAMS ((const char *, ...)); static void lang_check PARAMS ((void)); @@ -138,31 +134,46 @@ static void lang_place_orphans PARAMS ((void)); static int topower PARAMS ((int)); static void lang_set_startof PARAMS ((void)); static void reset_memory_regions PARAMS ((void)); +static void gc_section_callback + PARAMS ((lang_wild_statement_type *, asection *, + lang_input_statement_type *, PTR)); static void lang_record_phdrs PARAMS ((void)); static void lang_gc_wild PARAMS ((lang_wild_statement_type *, const char *, const char *)); static void lang_gc_sections_1 PARAMS ((lang_statement_union_type *)); static void lang_gc_sections PARAMS ((void)); +static int lang_vers_match_lang_c + PARAMS ((struct bfd_elf_version_expr *, const char *)); +static int lang_vers_match_lang_cplusplus + PARAMS ((struct bfd_elf_version_expr *, const char *)); +static int lang_vers_match_lang_java + PARAMS ((struct bfd_elf_version_expr *, const char *)); static void lang_do_version_exports_section PARAMS ((void)); static void lang_check_section_addresses PARAMS ((void)); +static void os_region_check + PARAMS ((lang_output_section_statement_type *, + struct memory_region_struct *, etree_type *, bfd_vma)); typedef void (*callback_t) PARAMS ((lang_wild_statement_type *, asection *, lang_input_statement_type *, - void *)); + PTR)); +static void walk_wild + PARAMS ((lang_wild_statement_type *, const char *, const char *, + callback_t, PTR)); static void walk_wild_section PARAMS ((lang_wild_statement_type *, const char *, - lang_input_statement_type *, callback_t, void *)); + lang_input_statement_type *, callback_t, PTR)); static void walk_wild_file PARAMS ((lang_wild_statement_type *, const char *, - lang_input_statement_type *, callback_t, void *)); + lang_input_statement_type *, callback_t, PTR)); -static int get_target PARAMS ((const bfd_target *, void *)); +static int get_target PARAMS ((const bfd_target *, PTR)); static void stricpy PARAMS ((char *, char *)); static void strcut PARAMS ((char *, char *)); static int name_compare PARAMS ((char *, char *)); -static int closest_target_match PARAMS ((const bfd_target *, void *)); +static int closest_target_match PARAMS ((const bfd_target *, PTR)); static char * get_first_input_target PARAMS ((void)); - + /* EXPORTS */ lang_output_section_statement_type *abs_output_section; lang_statement_list_type lang_output_section_statement; @@ -175,21 +186,22 @@ boolean had_output_filename = false; boolean lang_float_flag = false; boolean delete_output_file_on_failure = false; struct lang_nocrossrefs *nocrossref_list; +struct unique_sections *unique_section_list; etree_type *base; /* Relocation base - or null */ - #if defined(__STDC__) || defined(ALMOST_STDC) #define cat(a,b) a##b #else #define cat(a,b) a/**/b #endif -#define new_stat(x,y) (cat(x,_type)*) new_statement(cat(x,_enum), sizeof(cat(x,_type)),y) +/* Don't beautify the line below with "innocent" whitespace, it breaks the K&R C preprocessor! */ +#define new_stat(x, y) (cat (x,_type)*) new_statement (cat (x,_enum), sizeof (cat (x,_type)), y) -#define outside_section_address(q) ( (q)->output_offset + (q)->output_section->vma) +#define outside_section_address(q) ((q)->output_offset + (q)->output_section->vma) -#define outside_symbol_address(q) ((q)->value + outside_section_address(q->section)) +#define outside_symbol_address(q) ((q)->value + outside_section_address (q->section)) #define SECTION_NAME_MAP_LENGTH (16) @@ -200,9 +212,24 @@ stat_alloc (size) return obstack_alloc (&stat_obstack, size); } -/*---------------------------------------------------------------------- - Generic traversal routines for finding matching sections. -*/ +boolean +unique_section_p (secnam) + const char *secnam; +{ + struct unique_sections *unam; + + for (unam = unique_section_list; unam; unam = unam->next) + if (wildcardp (unam->name) + ? fnmatch (unam->name, secnam, 0) == 0 + : strcmp (unam->name, secnam) == 0) + { + return true; + } + + return false; +} + +/* Generic traversal routines for finding matching sections. */ static void walk_wild_section (ptr, section, file, callback, data) @@ -210,14 +237,14 @@ walk_wild_section (ptr, section, file, callback, data) const char *section; lang_input_statement_type *file; callback_t callback; - void *data; + PTR data; { - /* Don't process sections from files which were excluded. */ + /* Don't process sections from files which were excluded. */ if (ptr->exclude_filename_list != NULL) { struct name_list *list_tmp; for (list_tmp = ptr->exclude_filename_list; list_tmp; list_tmp = list_tmp->next) - { + { boolean match; if (wildcardp (list_tmp->name)) @@ -233,31 +260,26 @@ walk_wild_section (ptr, section, file, callback, data) if (file->just_syms_flag == false) { register asection *s; - boolean wildcard; + boolean wildcard = false; - if (section == NULL) - wildcard = false; - else + if (section != NULL) wildcard = wildcardp (section); for (s = file->the_bfd->sections; s != NULL; s = s->next) { boolean match; + const char *sname = bfd_get_section_name (file->the_bfd, s); if (section == NULL) match = true; + else if (wildcard) + match = fnmatch (section, sname, 0) == 0 ? true : false; else - { - const char *name; - - name = bfd_get_section_name (file->the_bfd, s); - if (wildcard) - match = fnmatch (section, name, 0) == 0 ? true : false; - else - match = strcmp (section, name) == 0 ? true : false; - } + match = strcmp (section, sname) == 0 ? true : false; - if (match) + /* If this is a wild-card output section statement, exclude + sections that match UNIQUE_SECTION_LIST. */ + if (match && (data == NULL || !unique_section_p (sname))) (*callback) (ptr, s, file, data); } } @@ -271,7 +293,7 @@ walk_wild_file (s, section, f, callback, data) const char *section; lang_input_statement_type *f; callback_t callback; - void *data; + PTR data; { if (f->the_bfd == NULL || ! bfd_check_format (f->the_bfd, bfd_archive)) @@ -308,7 +330,7 @@ walk_wild (s, section, file, callback, data) const char *section; const char *file; callback_t callback; - void *data; + PTR data; { if (file == (char *) NULL) { @@ -334,12 +356,10 @@ walk_wild (s, section, file, callback, data) f = lookup_name (file); walk_wild_file (s, section, f, callback, data); } -} - -/*---------------------------------------------------------------------- - lang_for_each_statement walks the parse tree and calls the provided - function for each node -*/ +} + +/* lang_for_each_statement walks the parse tree and calls the provided + function for each node. */ static void lang_for_each_statement_worker (func, s) @@ -392,11 +412,11 @@ void lang_for_each_statement (func) void (*func) PARAMS ((lang_statement_union_type *)); { - lang_for_each_statement_worker (func, - statement_list.head); + lang_for_each_statement_worker (func, statement_list.head); } /*----------------------------------------------------------------------*/ + void lang_list_init (list) lang_statement_list_type *list; @@ -405,18 +425,13 @@ lang_list_init (list) list->tail = &list->head; } -/*---------------------------------------------------------------------- - - build a new statement node for the parse tree - - */ +/* Build a new statement node for the parse tree. */ -static -lang_statement_union_type * +static lang_statement_union_type * new_statement (type, size, list) enum statement_enum type; size_t size; - lang_statement_list_type * list; + lang_statement_list_type *list; { lang_statement_union_type *new = (lang_statement_union_type *) stat_alloc (size); @@ -427,22 +442,20 @@ new_statement (type, size, list) return new; } -/* - Build a new input file node for the language. There are several ways - in which we treat an input file, eg, we only look at symbols, or - prefix it with a -l etc. +/* Build a new input file node for the language. There are several + ways in which we treat an input file, eg, we only look at symbols, + or prefix it with a -l etc. - We can be supplied with requests for input files more than once; - they may, for example be split over serveral lines like foo.o(.text) - foo.o(.data) etc, so when asked for a file we check that we havn't - got it already so we don't duplicate the bfd. + We can be supplied with requests for input files more than once; + they may, for example be split over serveral lines like foo.o(.text) + foo.o(.data) etc, so when asked for a file we check that we havn't + got it already so we don't duplicate the bfd. */ - */ static lang_input_statement_type * new_afile (name, file_type, target, add_to_list) - CONST char *name; + const char *name; lang_input_file_enum_type file_type; - CONST char *target; + const char *target; boolean add_to_list; { lang_input_statement_type *p; @@ -527,15 +540,16 @@ new_afile (name, file_type, target, add_to_list) lang_input_statement_type * lang_add_input_file (name, file_type, target) - CONST char *name; + const char *name; lang_input_file_enum_type file_type; - CONST char *target; + const char *target; { lang_has_input_file = true; return new_afile (name, file_type, target, true); } -/* Build enough state so that the parser can build its tree */ +/* Build enough state so that the parser can build its tree. */ + void lang_init () { @@ -551,29 +565,29 @@ lang_init () first_file = lang_add_input_file ((char *) NULL, lang_input_file_is_marker_enum, (char *) NULL); - abs_output_section = lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME); + abs_output_section = + lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME); abs_output_section->bfd_section = bfd_abs_section_ptr; } /*---------------------------------------------------------------------- - A region is an area of memory declared with the - MEMORY { name:org=exp, len=exp ... } - syntax. + A region is an area of memory declared with the + MEMORY { name:org=exp, len=exp ... } + syntax. - We maintain a list of all the regions here + We maintain a list of all the regions here. - If no regions are specified in the script, then the default is used - which is created when looked up to be the entire data space -*/ + If no regions are specified in the script, then the default is used + which is created when looked up to be the entire data space. */ static lang_memory_region_type *lang_memory_region_list; static lang_memory_region_type **lang_memory_region_list_tail = &lang_memory_region_list; lang_memory_region_type * lang_memory_region_lookup (name) - CONST char *CONST name; + const char *const name; { lang_memory_region_type *p; @@ -615,7 +629,7 @@ lang_memory_region_lookup (name) new->origin = 0; new->flags = 0; new->not_flags = 0; - new->length = ~(bfd_size_type)0; + new->length = ~(bfd_size_type) 0; new->current = 0; new->had_full_message = false; @@ -623,8 +637,7 @@ lang_memory_region_lookup (name) } } - -lang_memory_region_type * +static lang_memory_region_type * lang_memory_default (section) asection *section; { @@ -651,7 +664,7 @@ lang_memory_default (section) lang_output_section_statement_type * lang_output_section_find (name) - CONST char *CONST name; + const char *const name; { lang_statement_union_type *u; lang_output_section_statement_type *lookup; @@ -671,7 +684,7 @@ lang_output_section_find (name) lang_output_section_statement_type * lang_output_section_statement_lookup (name) - CONST char *CONST name; + const char *const name; { lang_output_section_statement_type *lookup; @@ -694,7 +707,7 @@ lang_output_section_statement_lookup (name) lookup->addr_tree = (etree_type *) NULL; lang_list_init (&lookup->children); - lookup->memspec = (CONST char *) NULL; + lookup->memspec = (const char *) NULL; lookup->flags = 0; lookup->subsection_alignment = -1; lookup->section_alignment = -1; @@ -809,8 +822,8 @@ init_os (s) } s->bfd_section->output_section = s->bfd_section; - /* We initialize an output sections output offset to minus its own */ - /* vma to allow us to output a section through itself */ + /* We initialize an output sections output offset to minus its own + vma to allow us to output a section through itself. */ s->bfd_section->output_offset = 0; get_userdata (s->bfd_section) = (PTR) new; @@ -883,13 +896,13 @@ exp_init_os (exp) the same name. It's possible to get more than one element in a list if the COMDAT sections have different names. */ -struct already_linked_hash_entry +struct already_linked_hash_entry { struct bfd_hash_entry root; struct already_linked *entry; }; -struct already_linked +struct already_linked { struct already_linked *next; asection *sec; @@ -899,7 +912,6 @@ struct already_linked static struct bfd_hash_table already_linked_table; -/*ARGSUSED*/ static void section_already_linked (abfd, sec, data) bfd *abfd; @@ -926,30 +938,30 @@ section_already_linked (abfd, sec, data) if ((flags & SEC_LINK_ONCE) == 0) return; - /* FIXME: When doing a relocateable link, we may have trouble + /* FIXME: When doing a relocatable link, we may have trouble copying relocations in other sections that refer to local symbols in the section being discarded. Those relocations will have to be converted somehow; as of this writing I'm not sure that any of the backends handle that correctly. It is tempting to instead not discard link once sections when - doing a relocateable link (technically, they should be discarded + doing a relocatable link (technically, they should be discarded whenever we are building constructors). However, that fails, because the linker winds up combining all the link once sections into a single large link once section, which defeats the purpose of having link once sections in the first place. - Also, not merging link once sections in a relocateable link + Also, not merging link once sections in a relocatable link causes trouble for MIPS ELF, which relies in link once semantics to handle the .reginfo section correctly. */ name = bfd_get_section_name (abfd, sec); - already_linked_list = + already_linked_list = ((struct already_linked_hash_entry *) bfd_hash_lookup (&already_linked_table, name, true, false)); - for (l = already_linked_list->entry; l != NULL; l = l->next) + for (l = already_linked_list->entry; l != NULL; l = l->next) { if (sec->comdat == NULL || l->sec->comdat == NULL @@ -995,8 +1007,7 @@ section_already_linked (abfd, sec, data) discarded, we must retain a pointer to the section which we are really going to use. */ sec->output_section = bfd_abs_section_ptr; - if (sec->comdat != NULL) - sec->comdat->sec = l->sec; + sec->kept_section = l->sec; return; } @@ -1005,7 +1016,7 @@ section_already_linked (abfd, sec, data) /* This is the first section with this name. Record it. Allocate the memory from the same obstack as the hash table is kept in. */ - l = ((struct already_linked *) + l = ((struct already_linked *) bfd_hash_allocate (&already_linked_table, sizeof *l)); l->sec = sec; @@ -1022,7 +1033,7 @@ already_linked_newfunc (entry, table, string) struct bfd_hash_table *table; const char *string ATTRIBUTE_UNUSED; { - struct already_linked_hash_entry *ret = + struct already_linked_hash_entry *ret = bfd_hash_allocate (table, sizeof (struct already_linked_hash_entry)); ret->entry = NULL; @@ -1130,7 +1141,7 @@ wild_doit (ptr, section, output, file) else first = false; - /* Add a section reference to the list */ + /* Add a section reference to the list. */ new = new_stat (lang_input_section, ptr); new->section = section; @@ -1196,6 +1207,13 @@ wild_doit (ptr, section, output, file) /* If supplied an aligment, then force it. */ if (output->section_alignment != -1) output->bfd_section->alignment_power = output->section_alignment; + + if (section->flags & SEC_BLOCK) + { + section->output_section->flags |= SEC_BLOCK; + /* FIXME: This value should really be obtained from the bfd... */ + output->block_value = 128; + } } } @@ -1308,47 +1326,47 @@ output_section_callback (ptr, section, file, output) lang_wild_statement_type *ptr; asection *section; lang_input_statement_type *file; - void *output; + PTR output; { lang_statement_union_type *before; - + /* If the wild pattern was marked KEEP, the member sections should be as well. */ if (ptr->keep_sections) section->flags |= SEC_KEEP; - + before = wild_sort (ptr, file, section); - + /* Here BEFORE points to the lang_input_section which should follow the one we are about to add. If BEFORE is NULL, then the section should just go at the end of the current list. */ - + if (before == NULL) - wild_doit (&ptr->children, section, - (lang_output_section_statement_type *) output, + wild_doit (&ptr->children, section, + (lang_output_section_statement_type *) output, file); else { lang_statement_list_type list; lang_statement_union_type **pp; - + lang_list_init (&list); - wild_doit (&list, section, - (lang_output_section_statement_type *) output, + wild_doit (&list, section, + (lang_output_section_statement_type *) output, file); - + /* If we are discarding the section, LIST.HEAD will be NULL. */ if (list.head != NULL) { ASSERT (list.head->next == NULL); - + for (pp = &ptr->children.head; *pp != before; pp = &(*pp)->next) ASSERT (*pp != NULL); - + list.head->next = *pp; *pp = list.head; } @@ -1503,8 +1521,6 @@ load_symbols (entry, place) entry->loaded = true; } - - /* Handle a wild statement. SECTION or FILE or both may be NULL, indicating that it is a wildcard. Separate lang_input_section statements are created for each part of the expansion; they are @@ -1518,7 +1534,7 @@ wild (s, section, file, target, output) const char *target ATTRIBUTE_UNUSED; lang_output_section_statement_type *output; { - walk_wild (s, section, file, output_section_callback, (void *) output); + walk_wild (s, section, file, output_section_callback, (PTR) output); if (section != (char *) NULL && strcmp (section, "COMMON") == 0 @@ -1531,66 +1547,70 @@ wild (s, section, file, target, output) } /* Return true iff target is the sought target. */ + static int get_target (target, data) - const bfd_target * target; - void * data; + const bfd_target *target; + PTR data; { - const char * sought = (const char *) data; - + const char *sought = (const char *) data; + return strcmp (target->name, sought) == 0; } /* Like strcpy() but convert to lower case as well. */ + static void stricpy (dest, src) - char * dest; - char * src; + char *dest; + char *src; { char c; - - while ((c = * src ++) != 0) + + while ((c = *src++) != 0) { if (isupper ((unsigned char) c)) c = tolower (c); - * dest ++ = c; + *dest++ = c; } - * dest = 0; + *dest = 0; } /* Remove the first occurance of needle (if any) in haystack from haystack. */ + static void strcut (haystack, needle) - char * haystack; - char * needle; + char *haystack; + char *needle; { haystack = strstr (haystack, needle); - + if (haystack) { - char * src; + char *src; + + for (src = haystack + strlen (needle); *src;) + *haystack++ = *src++; - for (src = haystack + strlen (needle); * src;) - * haystack ++ = * src ++; - - * haystack = 0; + *haystack = 0; } } /* Compare two target format name strings. Return a value indicating how "similar" they are. */ + static int name_compare (first, second) - char * first; - char * second; + char *first; + char *second; { - char * copy1; - char * copy2; - int result; - + char *copy1; + char *copy2; + int result; + copy1 = xmalloc (strlen (first) + 1); copy2 = xmalloc (strlen (second) + 1); @@ -1607,13 +1627,13 @@ name_compare (first, second) /* Return a value based on how many characters match, starting from the beginning. If both strings are the same then return 10 * their length. */ - for (result = 0; copy1 [result] == copy2 [result]; result ++) - if (copy1 [result] == 0) + for (result = 0; copy1[result] == copy2[result]; result++) + if (copy1[result] == 0) { result *= 10; break; } - + free (copy1); free (copy2); @@ -1621,22 +1641,25 @@ name_compare (first, second) } /* Set by closest_target_match() below. */ -static const bfd_target * winner; +static const bfd_target *winner; /* Scan all the valid bfd targets looking for one that has the endianness requirement that was specified on the command line, and is the nearest match to the original output target. */ + static int closest_target_match (target, data) - const bfd_target * target; - void * data; + const bfd_target *target; + PTR data; { - const bfd_target * original = (const bfd_target *) data; - - if (command_line.endian == ENDIAN_BIG && target->byteorder != BFD_ENDIAN_BIG) + const bfd_target *original = (const bfd_target *) data; + + if (command_line.endian == ENDIAN_BIG + && target->byteorder != BFD_ENDIAN_BIG) return 0; - - if (command_line.endian == ENDIAN_LITTLE && target->byteorder != BFD_ENDIAN_LITTLE) + + if (command_line.endian == ENDIAN_LITTLE + && target->byteorder != BFD_ENDIAN_LITTLE) return 0; /* Must be the same flavour. */ @@ -1651,7 +1674,7 @@ closest_target_match (target, data) } /* Oh dear, we now have two potential candidates for a successful match. - Compare their names and choose the better one. */ + Compare their names and choose the better one. */ if (name_compare (target->name, original->name) > name_compare (winner->name, original->name)) winner = target; @@ -1660,10 +1683,11 @@ closest_target_match (target, data) } /* Return the BFD target format of the first input file. */ + static char * get_first_input_target () { - char * target = NULL; + char *target = NULL; LANG_FOR_EACH_INPUT_STATEMENT (s) { @@ -1671,18 +1695,18 @@ get_first_input_target () && s->real) { ldfile_open_file (s); - + if (s->the_bfd != NULL && bfd_check_format (s->the_bfd, bfd_object)) { target = bfd_get_target (s->the_bfd); - + if (target != NULL) break; } } } - + return target; } @@ -1690,18 +1714,19 @@ get_first_input_target () static bfd * open_output (name) - const char * name; + const char *name; { - bfd * output; + bfd *output; - /* Has the user told us which output format to use ? */ + /* Has the user told us which output format to use? */ if (output_target == (char *) NULL) { - /* No - has the current target been set to something other than the default ? */ + /* No - has the current target been set to something other than + the default? */ if (current_target != default_target) output_target = current_target; - /* No - can we determine the format of the first input file ? */ + /* No - can we determine the format of the first input file? */ else { output_target = get_first_input_target (); @@ -1711,46 +1736,54 @@ open_output (name) output_target = default_target; } } - - /* Has the user requested a particular endianness on the command line ? */ + + /* Has the user requested a particular endianness on the command + line? */ if (command_line.endian != ENDIAN_UNSET) { - const bfd_target * target; + const bfd_target *target; enum bfd_endian desired_endian; /* Get the chosen target. */ - target = bfd_search_for_target (get_target, (void *) output_target); + target = bfd_search_for_target (get_target, (PTR) output_target); - if (command_line.endian == ENDIAN_BIG) - desired_endian = BFD_ENDIAN_BIG; - else - desired_endian = BFD_ENDIAN_LITTLE; - - /* See if the target has the wrong endianness. This should not happen - if the linker script has provided big and little endian alternatives, - but some scrips don't do this. */ - if (target->byteorder != desired_endian) + /* If the target is not supported, we cannot do anything. */ + if (target != NULL) { - /* If it does, then see if the target provides - an alternative with the correct endianness. */ - if (target->alternative_target != NULL - && (target->alternative_target->byteorder == desired_endian)) - output_target = target->alternative_target->name; + if (command_line.endian == ENDIAN_BIG) + desired_endian = BFD_ENDIAN_BIG; else + desired_endian = BFD_ENDIAN_LITTLE; + + /* See if the target has the wrong endianness. This should + not happen if the linker script has provided big and + little endian alternatives, but some scrips don't do + this. */ + if (target->byteorder != desired_endian) { - /* Try to find a target as similar as possible to the default - target, but which has the desired endian characteristic. */ - (void) bfd_search_for_target (closest_target_match, (void *) target); - - /* Oh dear - we could not find any targets that satisfy our requirements. */ - if (winner == NULL) - einfo (_("%P: warning: could not find any targets that match endianness requirement\n")); + /* If it does, then see if the target provides + an alternative with the correct endianness. */ + if (target->alternative_target != NULL + && (target->alternative_target->byteorder == desired_endian)) + output_target = target->alternative_target->name; else - output_target = winner->name; + { + /* Try to find a target as similar as possible to + the default target, but which has the desired + endian characteristic. */ + (void) bfd_search_for_target (closest_target_match, (PTR) target); + + /* Oh dear - we could not find any targets that + satisfy our requirements. */ + if (winner == NULL) + einfo (_("%P: warning: could not find any targets that match endianness requirement\n")); + else + output_target = winner->name; + } } } } - + output = bfd_openw (name, output_target); if (output == (bfd *) NULL) @@ -1763,7 +1796,9 @@ open_output (name) delete_output_file_on_failure = true; - /* output->flags |= D_PAGED;*/ +#if 0 + output->flags |= D_PAGED; +#endif if (! bfd_set_format (output, bfd_object)) einfo (_("%P%F:%s: can not make object file: %E\n"), name); @@ -1782,7 +1817,7 @@ open_output (name) static void ldlang_open_output (statement) - lang_statement_union_type * statement; + lang_statement_union_type *statement; { switch (statement->header.type) { @@ -1830,7 +1865,7 @@ open_input_bfds (s, force) open_input_bfds (s->output_section_statement.children.head, force); break; case lang_wild_statement_enum: - /* Maybe we should load the file's symbols */ + /* Maybe we should load the file's symbols. */ if (s->wild_statement.filename && ! wildcardp (s->wild_statement.filename)) (void) lookup_name (s->wild_statement.filename); @@ -1841,8 +1876,8 @@ open_input_bfds (s, force) struct bfd_link_hash_entry *undefs; /* We must continually search the entries in the group - until no new symbols are added to the list of undefined - symbols. */ + until no new symbols are added to the list of undefined + symbols. */ do { @@ -1864,8 +1899,10 @@ open_input_bfds (s, force) /* If we are being called from within a group, and this is an archive which has already been searched, then - force it to be researched. */ + force it to be researched unless the whole archive + has been loaded already. */ if (force + && !s->input_statement.whole_archive && s->input_statement.loaded && bfd_check_format (s->input_statement.the_bfd, bfd_archive)) @@ -1888,7 +1925,8 @@ open_input_bfds (s, force) } } -/* If there are [COMMONS] statements, put a wild one into the bss section */ +/* If there are [COMMONS] statements, put a wild one into the bss + section. */ static void lang_reasonable_defaults () @@ -1897,9 +1935,7 @@ lang_reasonable_defaults () lang_output_section_statement_lookup (".text"); lang_output_section_statement_lookup (".data"); - default_common_section = - lang_output_section_statement_lookup (".bss"); - + default_common_section = lang_output_section_statement_lookup (".bss"); if (placed_commons == false) { @@ -1912,13 +1948,10 @@ lang_reasonable_defaults () lang_list_init (&new->children); } #endif - } -/* - Add the supplied name to the symbol table as an undefined reference. - Remove items from the chain as we open input bfds - */ +/* Add the supplied name to the symbol table as an undefined reference. + Remove items from the chain as we open input bfds. */ typedef struct ldlang_undef_chain_list { struct ldlang_undef_chain_list *next; @@ -1929,7 +1962,7 @@ static ldlang_undef_chain_list_type *ldlang_undef_chain_list_head; void ldlang_add_undef (name) - CONST char *CONST name; + const char *const name; { ldlang_undef_chain_list_type *new = ((ldlang_undef_chain_list_type *) @@ -1943,8 +1976,8 @@ ldlang_add_undef (name) /* Run through the list of undefineds created above and place them into the linker hash table as undefined symbols belonging to the - script file. -*/ + script file. */ + static void lang_place_undefineds () { @@ -1968,19 +2001,19 @@ lang_place_undefineds () } } -/* Open input files and attatch to output sections */ +/* Open input files and attatch to output sections. */ + static void map_input_to_output_sections (s, target, output_section_statement) - lang_statement_union_type * s; - CONST char *target; - lang_output_section_statement_type * output_section_statement; + lang_statement_union_type *s; + const char *target; + lang_output_section_statement_type *output_section_statement; { for (; s != (lang_statement_union_type *) NULL; s = s->next) { switch (s->header.type) { - case lang_wild_statement_enum: wild (&s->wild_statement, s->wild_statement.section_name, s->wild_statement.filename, target, @@ -2024,14 +2057,14 @@ map_input_to_output_sections (s, target, output_section_statement) init_os (output_section_statement); /* Make sure that any sections mentioned in the assignment - are initialized. */ + are initialized. */ exp_init_os (s->assignment_statement.exp); break; case lang_afile_asection_pair_statement_enum: FAIL (); break; case lang_address_statement_enum: - /* Mark the specified section with the supplied address */ + /* Mark the specified section with the supplied address. */ { lang_output_section_statement_type *os = lang_output_section_statement_lookup @@ -2048,7 +2081,7 @@ map_input_to_output_sections (s, target, output_section_statement) static void print_output_section_statement (output_section_statement) - lang_output_section_statement_type * output_section_statement; + lang_output_section_statement_type *output_section_statement; { asection *section = output_section_statement->bfd_section; int len; @@ -2094,8 +2127,8 @@ print_output_section_statement (output_section_statement) static void print_assignment (assignment, output_section) - lang_assignment_statement_type * assignment; - lang_output_section_statement_type * output_section; + lang_assignment_statement_type *assignment; + lang_output_section_statement_type *output_section; { int i; etree_value_type result; @@ -2124,7 +2157,7 @@ print_assignment (assignment, output_section) static void print_input_statement (statm) - lang_input_statement_type * statm; + lang_input_statement_type *statm; { if (statm->filename != (char *) NULL) { @@ -2135,7 +2168,7 @@ print_input_statement (statm) /* Print all symbols defined in a particular section. This is called via bfd_link_hash_traverse. */ -static boolean +static boolean print_one_symbol (hash_entry, ptr) struct bfd_link_hash_entry *hash_entry; PTR ptr; @@ -2165,11 +2198,11 @@ print_one_symbol (hash_entry, ptr) static void print_input_section (in) - lang_input_section_type * in; + lang_input_section_type *in; { asection *i = in->section; bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, ldfile_output_machine); if (size != 0) { @@ -2223,20 +2256,20 @@ print_input_section (in) static void print_fill_statement (fill) - lang_fill_statement_type * fill; + lang_fill_statement_type *fill; { fprintf (config.map_file, " FILL mask 0x%x\n", fill->fill); } static void print_data_statement (data) - lang_data_statement_type * data; + lang_data_statement_type *data; { int i; bfd_vma addr; bfd_size_type size; const char *name; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, ldfile_output_machine); for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++) @@ -2307,8 +2340,8 @@ print_reloc_statement (reloc) int i; bfd_vma addr; bfd_size_type size; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++) print_space (); @@ -2331,7 +2364,7 @@ print_reloc_statement (reloc) print_nl (); print_dot = addr + size / opb; -} +} static void print_padding_statement (s) @@ -2339,8 +2372,8 @@ print_padding_statement (s) { int len; bfd_vma addr; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); minfo (" *fill*"); @@ -2366,8 +2399,8 @@ print_padding_statement (s) static void print_wild_statement (w, os) - lang_wild_statement_type * w; - lang_output_section_statement_type * os; + lang_wild_statement_type *w; + lang_output_section_statement_type *os; { print_space (); @@ -2377,11 +2410,11 @@ print_wild_statement (w, os) { name_list *tmp; minfo ("EXCLUDE_FILE ( %s", w->exclude_filename_list->name); - for (tmp=w->exclude_filename_list->next; tmp; tmp = tmp->next) - minfo (", %s", tmp->name); + for (tmp = w->exclude_filename_list->next; tmp; tmp = tmp->next) + minfo (", %s", tmp->name); minfo (")"); - } - if (w->filename != NULL) + } + if (w->filename != NULL) minfo ("%s", w->filename); else minfo ("*"); @@ -2519,7 +2552,7 @@ print_statements () void dprint_statement (s, n) - lang_statement_union_type * s; + lang_statement_union_type *s; int n; { FILE *map_save = config.map_file; @@ -2542,10 +2575,10 @@ dprint_statement (s, n) static bfd_vma insert_pad (this_ptr, fill, power, output_section_statement, dot) - lang_statement_union_type ** this_ptr; + lang_statement_union_type **this_ptr; fill_type fill; unsigned int power; - asection * output_section_statement; + asection *output_section_statement; bfd_vma dot; { /* Align this section first to the @@ -2553,11 +2586,10 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot) to the output section's requirement. If this alignment is > than any seen before, then record it too. Perform the alignment by - inserting a magic 'padding' statement. - */ + inserting a magic 'padding' statement. */ - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); unsigned int alignment_needed = align_power (dot, power) - dot; if (alignment_needed != 0) @@ -2566,7 +2598,7 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot) ((lang_statement_union_type *) stat_alloc (sizeof (lang_padding_statement_type))); - /* Link into existing chain */ + /* Link into existing chain. */ new->header.next = *this_ptr; *this_ptr = new; new->header.type = lang_padding_statement_enum; @@ -2577,8 +2609,7 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot) new->padding_statement.size = alignment_needed * opb; } - - /* Remember the most restrictive alignment */ + /* Remember the most restrictive alignment. */ if (power > output_section_statement->alignment_power) { output_section_statement->alignment_power = power; @@ -2588,19 +2619,20 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot) return dot + alignment_needed; } -/* Work out how much this section will move the dot point */ +/* Work out how much this section will move the dot point. */ + static bfd_vma size_input_section (this_ptr, output_section_statement, fill, dot, relax) - lang_statement_union_type ** this_ptr; - lang_output_section_statement_type * output_section_statement; + lang_statement_union_type **this_ptr; + lang_output_section_statement_type *output_section_statement; fill_type fill; bfd_vma dot; boolean relax ATTRIBUTE_UNUSED; { lang_input_section_type *is = &((*this_ptr)->input_section); asection *i = is->section; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); if (is->ifile->just_syms_flag == false) { @@ -2611,18 +2643,17 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax) dot = insert_pad (this_ptr, fill, i->alignment_power, output_section_statement->bfd_section, dot); - /* Remember where in the output section this input section goes */ + /* Remember where in the output section this input section goes. */ i->output_offset = dot - output_section_statement->bfd_section->vma; - /* Mark how big the output section must be to contain this now - */ + /* Mark how big the output section must be to contain this now. */ if (i->_cooked_size != 0) dot += i->_cooked_size / opb; else dot += i->_raw_size / opb; - output_section_statement->bfd_section->_raw_size = - (dot - output_section_statement->bfd_section->vma) * opb; + output_section_statement->bfd_section->_raw_size = + (dot - output_section_statement->bfd_section->vma) * opb; } else { @@ -2639,21 +2670,22 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax) /* Check to see if any allocated sections overlap with other allocated sections. This can happen when the linker script specifically specifies the output section addresses of the two sections. */ + static void lang_check_section_addresses () { - asection * s; + asection *s; unsigned opb = bfd_octets_per_byte (output_bfd); /* Scan all sections in the output list. */ for (s = output_bfd->sections; s != NULL; s = s->next) { - asection * os; - + asection *os; + /* Ignore sections which are not loaded or which have no contents. */ if (IGNORE_SECTION (output_bfd, s)) continue; - + /* Once we reach section 's' stop our seach. This prevents two warning messages from being produced, one for 'section A overlaps section B' and one for 'section B overlaps section A'. */ @@ -2663,7 +2695,7 @@ lang_check_section_addresses () bfd_vma s_end; bfd_vma os_start; bfd_vma os_end; - + /* Only consider loadable sections with real contents. */ if (IGNORE_SECTION (output_bfd, os)) continue; @@ -2675,15 +2707,15 @@ lang_check_section_addresses () os_start = bfd_section_lma (output_bfd, os); s_end = s_start + bfd_section_size (output_bfd, s) / opb - 1; os_end = os_start + bfd_section_size (output_bfd, os) / opb - 1; - + /* Look for an overlap. */ if ((s_end < os_start) || (s_start > os_end)) continue; - + einfo ( _("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"), s->name, s_start, s_end, os->name, os_start, os_end); - + /* Once we have found one overlap for this section, stop looking for others. */ break; @@ -2699,14 +2731,14 @@ static boolean relax_again; /* Make sure the new address is within the region. We explicitly permit the current address to be at the exact end of the region when the address is non-zero, in case the region is at the end of addressable memory and the - calculation wraps around. */ + calculation wraps around. */ static void os_region_check (os, region, tree, base) - lang_output_section_statement_type *os; - struct memory_region_struct *region; - etree_type *tree; - bfd_vma base; + lang_output_section_statement_type *os; + struct memory_region_struct *region; + etree_type *tree; + bfd_vma base; { if ((region->current < region->origin || (region->current - region->origin > region->length)) @@ -2737,14 +2769,14 @@ os_region_check (os, region, tree, base) bfd_vma lang_size_sections (s, output_section_statement, prev, fill, dot, relax) - lang_statement_union_type * s; - lang_output_section_statement_type * output_section_statement; - lang_statement_union_type ** prev; + lang_statement_union_type *s; + lang_output_section_statement_type *output_section_statement; + lang_statement_union_type **prev; fill_type fill; bfd_vma dot; boolean relax; { - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, ldfile_output_machine); /* Size up the sections from their constituent parts. */ @@ -2767,7 +2799,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) to do this, but nothing simple comes to mind. */ if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0) { - asection * input; + asection *input; if (os->children.head == NULL || os->children.head->next != NULL @@ -2817,7 +2849,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) bfd_get_section_name (output_bfd, os->bfd_section)); dot = os->region->current; - + if (os->section_alignment == -1) { bfd_vma olddot; @@ -2845,7 +2877,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) } dot = r.value + r.section->bfd_section->vma; } - + /* The section starts here. First, align to what the section needs. */ @@ -2853,15 +2885,16 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) dot = align_power (dot, os->section_alignment); bfd_set_section_vma (0, os->bfd_section, dot); - + os->bfd_section->output_offset = 0; } - (void) lang_size_sections (os->children.head, os, &os->children.head, + (void) lang_size_sections (os->children.head, os, + &os->children.head, os->fill, dot, relax); - - /* put the section within the requested block size, or align at - the block boundary */ + + /* Put the section within the requested block size, or + align at the block boundary. */ after = ALIGN_N (os->bfd_section->vma + os->bfd_section->_raw_size / opb, /* The coercion here is important, see ld.h. */ @@ -2870,8 +2903,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) if (bfd_is_abs_section (os->bfd_section)) ASSERT (after == os->bfd_section->vma); else - os->bfd_section->_raw_size = - (after - os->bfd_section->vma) * opb; + os->bfd_section->_raw_size = + (after - os->bfd_section->vma) * opb; dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb; os->processed = true; @@ -2879,7 +2912,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) We only do this if the section is going to be allocated, since unallocated sections do not contribute to the region's overall size in memory. - + If the SEC_NEVER_LOAD bit is not set, it will affect the addresses of sections after it. We have to update dot. */ @@ -2890,36 +2923,37 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) & (SEC_ALLOC | SEC_LOAD)))) { os->region->current = dot; - + /* Make sure the new address is within the region. */ - os_region_check (os, os->region, os->addr_tree, - os->bfd_section->vma); - - /* if there's no load address specified, use the run region as - the load region */ - if (os->lma_region == NULL && os->load_base == NULL) - os->lma_region = os->region; - - if (os->lma_region != NULL) - { - if (os->load_base != NULL) - { - einfo (_("%X%P: use an absolute load address or a load memory region, not both\n")); - } - else - { - /* don't allocate twice */ - if (os->lma_region != os->region) - { - /* set load_base, which will be handled later */ - os->load_base = exp_intop (os->lma_region->current); - os->lma_region->current += - os->bfd_section->_raw_size / opb; - os_region_check (os, os->lma_region, NULL, - os->bfd_section->lma); - } - } - } + os_region_check (os, os->region, os->addr_tree, + os->bfd_section->vma); + + /* If there's no load address specified, use the run + region as the load region. */ + if (os->lma_region == NULL && os->load_base == NULL) + os->lma_region = os->region; + + if (os->lma_region != NULL) + { + if (os->load_base != NULL) + { + einfo (_("%X%P: use an absolute load address or a load memory region, not both\n")); + } + else + { + /* Don't allocate twice. */ + if (os->lma_region != os->region) + { + /* Set load_base, which will be handled later. */ + os->load_base = + exp_intop (os->lma_region->current); + os->lma_region->current += + os->bfd_section->_raw_size / opb; + os_region_check (os, os->lma_region, NULL, + os->bfd_section->lma); + } + } + } } } break; @@ -2936,14 +2970,15 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) { unsigned int size = 0; - s->data_statement.output_vma = dot - output_section_statement->bfd_section->vma; + s->data_statement.output_vma = + dot - output_section_statement->bfd_section->vma; s->data_statement.output_section = output_section_statement->bfd_section; switch (s->data_statement.type) { - default: - abort(); + default: + abort (); case QUAD: case SQUAD: size = QUAD_SIZE; @@ -2958,16 +2993,18 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) size = BYTE_SIZE; break; } - if (size < opb) - size = opb; + if (size < opb) + size = opb; dot += size / opb; output_section_statement->bfd_section->_raw_size += size; /* The output section gets contents, and then we inspect for any flags set in the input script which override any ALLOC. */ output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS; - if (!(output_section_statement->flags & SEC_NEVER_LOAD)) { - output_section_statement->bfd_section->flags |= SEC_ALLOC | SEC_LOAD; - } + if (!(output_section_statement->flags & SEC_NEVER_LOAD)) + { + output_section_statement->bfd_section->flags |= + SEC_ALLOC | SEC_LOAD; + } } break; @@ -2984,13 +3021,12 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) output_section_statement->bfd_section->_raw_size += size; } break; - + case lang_wild_statement_enum: dot = lang_size_sections (s->wild_statement.children.head, output_section_statement, &s->wild_statement.children.head, - fill, dot, relax); break; @@ -3030,7 +3066,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) case lang_input_statement_enum: break; case lang_fill_statement_enum: - s->fill_statement.output_section = output_section_statement->bfd_section; + s->fill_statement.output_section = + output_section_statement->bfd_section; fill = s->fill_statement.fill; break; @@ -3114,13 +3151,13 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) bfd_vma lang_do_assignments (s, output_section_statement, fill, dot) - lang_statement_union_type * s; - lang_output_section_statement_type * output_section_statement; + lang_statement_union_type *s; + lang_output_section_statement_type *output_section_statement; fill_type fill; bfd_vma dot; { - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); for (; s != (lang_statement_union_type *) NULL; s = s->next) { @@ -3146,14 +3183,15 @@ lang_do_assignments (s, output_section_statement, fill, dot) dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb; } - if (os->load_base) + if (os->load_base) { /* If nothing has been placed into the output section then - it won't have a bfd_section. */ - if (os->bfd_section) + it won't have a bfd_section. */ + if (os->bfd_section) { - os->bfd_section->lma - = exp_get_abs_int(os->load_base, 0,"load base", lang_final_phase_enum); + os->bfd_section->lma + = exp_get_abs_int (os->load_base, 0, "load base", + lang_final_phase_enum); } } } @@ -3186,28 +3224,28 @@ lang_do_assignments (s, output_section_statement, fill, dot) } { unsigned int size; - switch (s->data_statement.type) - { - default: - abort(); - case QUAD: - case SQUAD: - size = QUAD_SIZE; - break; - case LONG: - size = LONG_SIZE; - break; - case SHORT: - size = SHORT_SIZE; - break; - case BYTE: - size = BYTE_SIZE; - break; - } - if (size < opb) - size = opb; - dot += size / opb; - } + switch (s->data_statement.type) + { + default: + abort (); + case QUAD: + case SQUAD: + size = QUAD_SIZE; + break; + case LONG: + size = LONG_SIZE; + break; + case SHORT: + size = SHORT_SIZE; + break; + case BYTE: + size = BYTE_SIZE; + break; + } + if (size < opb) + size = opb; + dot += size / opb; + } break; case lang_reloc_statement_enum: @@ -3309,7 +3347,7 @@ lang_set_startof () h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true); if (h != NULL && h->type == bfd_link_hash_undefined) { - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, ldfile_output_machine); h->type = bfd_link_hash_defined; if (s->_cooked_size != 0) @@ -3360,7 +3398,7 @@ lang_finish () else { bfd_vma val; - CONST char *send; + const char *send; /* We couldn't find the entry symbol. Try parsing it as a number. */ @@ -3420,7 +3458,7 @@ lang_check () { lang_statement_union_type *file; bfd *input_bfd; - CONST bfd_arch_info_type *compatible; + const bfd_arch_info_type *compatible; for (file = file_chain.head; file != (lang_statement_union_type *) NULL; @@ -3436,8 +3474,11 @@ lang_check () bfd_printable_name (input_bfd), input_bfd, bfd_printable_name (output_bfd)); } - else + else if (bfd_count_sections (input_bfd)) { + /* If the input bfd has no contents, it shouldn't set the + private data of the output bfd. */ + bfd_error_handler_type pfn = NULL; /* If we aren't supposed to warn about mismatched input @@ -3492,8 +3533,8 @@ lang_one_common (h, info) unsigned int power_of_two; bfd_vma size; asection *section; - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); if (h->type != bfd_link_hash_common) return true; @@ -3526,7 +3567,7 @@ lang_one_common (h, info) /* Make sure the section is allocated in memory, and make sure that it is no longer a common section. */ section->flags |= SEC_ALLOC; - section->flags &= ~ SEC_IS_COMMON; + section->flags &= ~SEC_IS_COMMON; if (config.map_file != NULL) { @@ -3578,12 +3619,9 @@ lang_one_common (h, info) return true; } -/* -run through the input files and ensure that every input -section has somewhere to go. If one is found without -a destination then create an input request and place it -into the statement tree. -*/ +/* Run through the input files and ensure that every input section has + somewhere to go. If one is found without a destination then create + an input request and place it into the statement tree. */ static void lang_place_orphans () @@ -3599,7 +3637,7 @@ lang_place_orphans () if (s->output_section == (asection *) NULL) { /* This section of the file is not attatched, root - around for a sensible place for it to go */ + around for a sensible place for it to go. */ if (file->just_syms_flag) { @@ -3647,11 +3685,10 @@ lang_place_orphans () } } - void lang_set_flags (ptr, flags, invert) lang_memory_region_type *ptr; - CONST char *flags; + const char *flags; int invert; { flagword *ptr_flags; @@ -3725,11 +3762,11 @@ lang_for_each_file (func) void lang_for_each_input_section (func) - void (*func) PARAMS ((bfd * ab, asection * as)); + void (*func) PARAMS ((bfd *ab, asection *as)); { LANG_FOR_EACH_INPUT_STATEMENT (f) { - asection * s; + asection *s; for (s = f->the_bfd->sections; s != (asection *) NULL; @@ -3744,7 +3781,7 @@ lang_for_each_input_section (func) void ldlang_add_file (entry) - lang_input_statement_type * entry; + lang_input_statement_type *entry; { bfd **pp; @@ -3779,7 +3816,7 @@ ldlang_add_file (entry) void lang_add_output (name, from_script) - CONST char *name; + const char *name; int from_script; { /* Make -o on command line override OUTPUT in script. */ @@ -3790,7 +3827,6 @@ lang_add_output (name, from_script) } } - static lang_output_section_statement_type *current_section; static int @@ -3803,7 +3839,7 @@ topower (x) if (x < 0) return -1; - for (l = 0; l < 32; l++) + for (l = 0; l < 32; l++) { if (i >= (unsigned int) x) return l; @@ -3818,7 +3854,7 @@ lang_enter_output_section_statement (output_section_statement_name, address_exp, sectype, block_value, align, subalign, ebase) const char *output_section_statement_name; - etree_type * address_exp; + etree_type *address_exp; enum section_type sectype; bfd_vma block_value; etree_type *align; @@ -3831,19 +3867,17 @@ lang_enter_output_section_statement (output_section_statement_name, os = lang_output_section_statement_lookup (output_section_statement_name); + /* Add this statement to tree. */ +#if 0 + add_statement (lang_output_section_statement_enum, + output_section_statement); +#endif + /* Make next things chain into subchain of this. */ - - /* Add this statement to tree */ - /* add_statement(lang_output_section_statement_enum, - output_section_statement);*/ - /* Make next things chain into subchain of this */ - - if (os->addr_tree == - (etree_type *) NULL) - { - os->addr_tree = - address_exp; - } + if (os->addr_tree == (etree_type *) NULL) + { + os->addr_tree = address_exp; + } os->sectype = sectype; if (sectype != noload_section) os->flags = SEC_NO_FLAGS; @@ -3852,19 +3886,15 @@ lang_enter_output_section_statement (output_section_statement_name, os->block_value = block_value ? block_value : 1; stat_ptr = &os->children; - os->subsection_alignment = topower( - exp_get_value_int(subalign, -1, - "subsection alignment", - 0)); - os->section_alignment = topower( - exp_get_value_int(align, -1, - "section alignment", 0)); + os->subsection_alignment = + topower (exp_get_value_int (subalign, -1, "subsection alignment", 0)); + os->section_alignment = + topower (exp_get_value_int (align, -1, "section alignment", 0)); os->load_base = ebase; return os; } - void lang_final () { @@ -3874,7 +3904,8 @@ lang_final () new->name = output_filename; } -/* Reset the current counters in the regions */ +/* Reset the current counters in the regions. */ + static void reset_memory_regions () { @@ -3897,7 +3928,7 @@ gc_section_callback (ptr, section, file, data) lang_wild_statement_type *ptr; asection *section; lang_input_statement_type *file ATTRIBUTE_UNUSED; - void *data ATTRIBUTE_UNUSED; + PTR data ATTRIBUTE_UNUSED; { /* If the wild pattern was marked KEEP, the member sections should be as well. */ @@ -3921,7 +3952,7 @@ lang_gc_wild (s, section, file) static void lang_gc_sections_1 (s) - lang_statement_union_type * s; + lang_statement_union_type *s; { for (; s != (lang_statement_union_type *) NULL; s = s->next) { @@ -3959,7 +3990,7 @@ lang_gc_sections () /* Keep all sections containing symbols undefined on the command-line. Handle the entry symbol at the same time. */ - + if (entry_symbol != NULL) { fake_list_start.next = ldlang_undef_chain_list_head; @@ -3971,12 +4002,12 @@ lang_gc_sections () for (; ulist; ulist = ulist->next) { - h = bfd_link_hash_lookup (link_info.hash, ulist->name, + h = bfd_link_hash_lookup (link_info.hash, ulist->name, false, false, false); if (h != (struct bfd_link_hash_entry *) NULL - && (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak) + && (h->type == bfd_link_hash_defined + || h->type == bfd_link_hash_defweak) && ! bfd_is_abs_section (h->u.def.section)) { h->u.def.section->flags |= SEC_KEEP; @@ -3992,16 +4023,17 @@ lang_process () lang_reasonable_defaults (); current_target = default_target; - lang_for_each_statement (ldlang_open_output); /* Open the output file */ + /* Open the output file. */ + lang_for_each_statement (ldlang_open_output); ldemul_create_output_section_statements (); - /* Add to the hash table all undefineds on the command line */ + /* Add to the hash table all undefineds on the command line. */ lang_place_undefineds (); already_linked_table_init (); - /* Create a bfd for each input file */ + /* Create a bfd for each input file. */ current_target = default_target; open_input_bfds (statement_list.head, false); @@ -4028,17 +4060,15 @@ lang_process () if (command_line.gc_sections) lang_gc_sections (); - /* Size up the common data */ + /* Size up the common data. */ lang_common (); /* Run through the contours of the script and attach input sections - to the correct output sections - */ + to the correct output sections. */ map_input_to_output_sections (statement_list.head, (char *) NULL, (lang_output_section_statement_type *) NULL); - - /* Find any sections not attached explicitly and handle them */ + /* Find any sections not attached explicitly and handle them. */ lang_place_orphans (); ldemul_before_allocation (); @@ -4047,7 +4077,7 @@ lang_process () section positions, since they will affect SIZEOF_HEADERS. */ lang_record_phdrs (); - /* Now run around and relax if we can */ + /* Now run around and relax if we can. */ if (command_line.relax) { /* First time round is a trial run to get the 'worst case' @@ -4065,7 +4095,7 @@ lang_process () /* Note: pe-dll.c does something like this also. If you find you need to change this code, you probably need to change - pe-dll.c also. DJ */ + pe-dll.c also. DJ */ /* Do all the assignments with our current guesses as to section sizes. */ @@ -4096,8 +4126,8 @@ lang_process () /* Fix any .startof. or .sizeof. symbols. */ lang_set_startof (); - /* Do all the assignments, now that we know the final restingplaces - of all the symbols */ + /* Do all the assignments, now that we know the final resting places + of all the symbols. */ lang_do_assignments (statement_list.head, abs_output_section, @@ -4107,8 +4137,8 @@ lang_process () if (! link_info.relocateable && command_line.check_section_addresses) lang_check_section_addresses (); - - /* Final stuffs */ + + /* Final stuffs. */ ldemul_finish (); lang_finish (); @@ -4148,8 +4178,8 @@ lang_add_wild (section_name, sections_sorted, filename, filenames_sorted, void lang_section_start (name, address) - CONST char *name; - etree_type * address; + const char *name; + etree_type *address; { lang_address_statement_type *ad = new_stat (lang_address_statement, stat_ptr); @@ -4164,7 +4194,7 @@ lang_section_start (name, address) void lang_add_entry (name, cmdline) - CONST char *name; + const char *name; boolean cmdline; { if (entry_symbol == NULL @@ -4178,7 +4208,7 @@ lang_add_entry (name, cmdline) void lang_add_target (name) - CONST char *name; + const char *name; { lang_target_statement_type *new = new_stat (lang_target_statement, stat_ptr); @@ -4189,13 +4219,13 @@ lang_add_target (name) void lang_add_map (name) - CONST char *name; + const char *name; { while (*name) { switch (*name) { - case 'F': + case 'F': map_option_f = true; break; } @@ -4243,7 +4273,7 @@ lang_add_reloc (reloc, howto, section, name, addend) union etree_union *addend; { lang_reloc_statement_type *p = new_stat (lang_reloc_statement, stat_ptr); - + p->reloc = reloc; p->howto = howto; p->section = section; @@ -4257,7 +4287,7 @@ lang_add_reloc (reloc, howto, section, name, addend) lang_assignment_statement_type * lang_add_assignment (exp) - etree_type * exp; + etree_type *exp; { lang_assignment_statement_type *new = new_stat (lang_assignment_statement, stat_ptr); @@ -4275,7 +4305,7 @@ lang_add_attribute (attribute) void lang_startup (name) - CONST char *name; + const char *name; { if (startup_file != (char *) NULL) { @@ -4307,8 +4337,8 @@ lang_leave_output_section_statement (fill, memspec, phdrs, lma_memspec) if (strcmp (lma_memspec, "*default*") != 0) { current_section->lma_region = lang_memory_region_lookup (lma_memspec); - /* if no runtime region has been given, but the load region has been, - use the load region */ + /* If no runtime region has been given, but the load region has + been, use the load region. */ if (strcmp (memspec, "*default*") == 0) current_section->region = lang_memory_region_lookup (lma_memspec); } @@ -4316,12 +4346,11 @@ lang_leave_output_section_statement (fill, memspec, phdrs, lma_memspec) stat_ptr = &statement_list; } -/* - Create an absolute symbol with the given name with the value of the - address of first byte of the section named. +/* Create an absolute symbol with the given name with the value of the + address of first byte of the section named. + + If the symbol already exists, then do nothing. */ - If the symbol already exists, then do nothing. -*/ void lang_abs_symbol_at_beginning_of (secname, name) const char *secname; @@ -4350,12 +4379,11 @@ lang_abs_symbol_at_beginning_of (secname, name) } } -/* - Create an absolute symbol with the given name with the value of the - address of the first byte after the end of the section named. +/* Create an absolute symbol with the given name with the value of the + address of the first byte after the end of the section named. + + If the symbol already exists, then do nothing. */ - If the symbol already exists, then do nothing. -*/ void lang_abs_symbol_at_end_of (secname, name) const char *secname; @@ -4388,9 +4416,9 @@ lang_abs_symbol_at_end_of (secname, name) void lang_statement_append (list, element, field) - lang_statement_list_type * list; - lang_statement_union_type * element; - lang_statement_union_type ** field; + lang_statement_list_type *list; + lang_statement_union_type *element; + lang_statement_union_type **field; { *(list->tail) = element; list->tail = field; @@ -4608,8 +4636,7 @@ static etree_type *overlay_max; /* A list of all the sections in this overlay. */ -struct overlay_list -{ +struct overlay_list { struct overlay_list *next; lang_output_section_statement_type *os; }; @@ -4690,7 +4717,7 @@ lang_leave_overlay_section (fill, phdrs) name = current_section->name; - lang_leave_output_section_statement (fill, "*default*", + lang_leave_output_section_statement (fill, "*default*", phdrs, "*default*"); /* Define the magic symbols. */ @@ -4753,8 +4780,15 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec) l->os->fill = fill; if (region != NULL && l->os->region == NULL) l->os->region = region; - if (lma_region != NULL && l->os->lma_region == NULL) - l->os->lma_region = lma_region; + /* We only set lma_region for the first overlay section, as + subsequent overlay sections will have load_base set relative + to the first section. Also, don't set lma_region if + load_base is specified. FIXME: There should really be a test + that `AT ( LDADDR )' doesn't conflict with `AT >LMA_REGION' + rather than letting LDADDR simply override LMA_REGION. */ + if (lma_region != NULL && l->os->lma_region == NULL + && l->next == NULL && l->os->load_base == NULL) + l->os->lma_region = lma_region; if (phdrs != NULL && l->os->phdrs == NULL) l->os->phdrs = phdrs; @@ -4814,7 +4848,7 @@ lang_vers_match_lang_cplusplus (expr, sym) if (expr->pattern[0] == '*' && expr->pattern[1] == '\0') return 1; - alt_sym = cplus_demangle(sym, /* DMGL_NO_TPARAMS */ 0); + alt_sym = cplus_demangle (sym, /* DMGL_NO_TPARAMS */ 0); if (!alt_sym) { /* cplus_demangle (also) returns NULL when it is not a C++ symbol. @@ -4841,7 +4875,7 @@ lang_vers_match_lang_java (expr, sym) if (expr->pattern[0] == '*' && expr->pattern[1] == '\0') return 1; - alt_sym = cplus_demangle(sym, DMGL_JAVA); + alt_sym = cplus_demangle (sym, DMGL_JAVA); if (!alt_sym) { /* cplus_demangle (also) returns NULL when it is not a Java symbol. @@ -5016,7 +5050,7 @@ lang_do_version_exports_section () einfo (_("%X%P: unable to read .exports section contents"), sec); p = contents; - while (p < contents+len) + while (p < contents + len) { greg = lang_new_vers_regex (greg, p, NULL); p = strchr (p, '\0') + 1; @@ -5033,3 +5067,19 @@ lang_do_version_exports_section () lang_register_vers_node (command_line.version_exports_section, lang_new_vers_node (greg, lreg), NULL); } + +void +lang_add_unique (name) + const char *name; +{ + struct unique_sections *ent; + + for (ent = unique_section_list; ent; ent = ent->next) + if (strcmp (ent->name, name) == 0) + return; + + ent = (struct unique_sections *) xmalloc (sizeof *ent); + ent->name = xstrdup (name); + ent->next = unique_section_list; + unique_section_list = ent; +} diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h index 553db4b..ac0fd28 100644 --- a/contrib/binutils/ld/ldlang.h +++ b/contrib/binutils/ld/ldlang.h @@ -1,19 +1,19 @@ /* ldlang.h - linker command language support - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. - + This file is part of GLD, the Gnu Linker. - + GLD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. - + GLD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA @@ -22,8 +22,7 @@ #ifndef LDLANG_H #define LDLANG_H -typedef enum -{ +typedef enum { lang_input_file_is_l_enum, lang_input_file_is_symbols_only_enum, lang_input_file_is_marker_enum, @@ -33,15 +32,13 @@ typedef enum } lang_input_file_enum_type; typedef unsigned int fill_type; -typedef struct statement_list -{ + +typedef struct statement_list { union lang_statement_union *head; union lang_statement_union **tail; } lang_statement_list_type; - -typedef struct memory_region_struct -{ +typedef struct memory_region_struct { char *name; struct memory_region_struct *next; bfd_vma origin; @@ -51,58 +48,49 @@ typedef struct memory_region_struct flagword flags; flagword not_flags; boolean had_full_message; -} lang_memory_region_type ; - -typedef struct lang_statement_header_struct -{ - union lang_statement_union *next; - enum statement_enum - { - lang_output_section_statement_enum, - lang_assignment_statement_enum, - lang_input_statement_enum, - lang_address_statement_enum, - lang_wild_statement_enum, - lang_input_section_enum, - lang_object_symbols_statement_enum, - lang_fill_statement_enum, - lang_data_statement_enum, - lang_reloc_statement_enum, - lang_target_statement_enum, - lang_output_statement_enum, - lang_padding_statement_enum, - lang_group_statement_enum, - - lang_afile_asection_pair_statement_enum, - lang_constructors_statement_enum - } type; -} lang_statement_header_type; +} lang_memory_region_type; +typedef struct lang_statement_header_struct { + union lang_statement_union *next; + enum statement_enum { + lang_output_section_statement_enum, + lang_assignment_statement_enum, + lang_input_statement_enum, + lang_address_statement_enum, + lang_wild_statement_enum, + lang_input_section_enum, + lang_object_symbols_statement_enum, + lang_fill_statement_enum, + lang_data_statement_enum, + lang_reloc_statement_enum, + lang_target_statement_enum, + lang_output_statement_enum, + lang_padding_statement_enum, + lang_group_statement_enum, + + lang_afile_asection_pair_statement_enum, + lang_constructors_statement_enum + } type; +} lang_statement_header_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; union etree_union *exp; } lang_assignment_statement_type; - -typedef struct lang_target_statement_struct -{ +typedef struct lang_target_statement_struct { lang_statement_header_type header; const char *target; } lang_target_statement_type; - -typedef struct lang_output_statement_struct -{ +typedef struct lang_output_statement_struct { lang_statement_header_type header; const char *name; } lang_output_statement_type; /* Section types specified in a linker script. */ -enum section_type -{ +enum section_type { normal_section, dsect_section, copy_section, @@ -114,15 +102,13 @@ enum section_type /* This structure holds a list of program headers describing segments in which this section should be placed. */ -struct lang_output_section_phdr_list -{ +struct lang_output_section_phdr_list { struct lang_output_section_phdr_list *next; const char *name; boolean used; }; -typedef struct lang_output_section_statement_struct -{ +typedef struct lang_output_section_statement_struct { lang_statement_header_type header; union etree_union *addr_tree; lang_statement_list_type children; @@ -131,7 +117,7 @@ typedef struct lang_output_section_statement_struct const char *name; boolean processed; - + asection *bfd_section; flagword flags; /* Or together of all input sections */ enum section_type sectype; @@ -140,38 +126,33 @@ typedef struct lang_output_section_statement_struct size_t block_value; fill_type fill; - int subsection_alignment; /* alignment of components */ - int section_alignment; /* alignment of start of section */ + int subsection_alignment; /* alignment of components */ + int section_alignment; /* alignment of start of section */ union etree_union *load_base; struct lang_output_section_phdr_list *phdrs; } lang_output_section_statement_type; - -typedef struct -{ +typedef struct { lang_statement_header_type header; } lang_common_statement_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; } lang_object_symbols_statement_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; fill_type fill; int size; asection *output_section; } lang_fill_statement_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; unsigned int type; - union etree_union *exp; + union etree_union *exp; bfd_vma value; asection *output_section; bfd_vma output_vma; @@ -179,8 +160,7 @@ typedef struct /* Generate a reloc in the output file. */ -typedef struct -{ +typedef struct { lang_statement_header_type header; /* Reloc to generate. */ @@ -210,8 +190,7 @@ typedef struct bfd_vma output_vma; } lang_reloc_statement_type; -typedef struct lang_input_statement_struct -{ +typedef struct lang_input_statement_struct { lang_statement_header_type header; /* Name of this file. */ const char *filename; @@ -219,32 +198,32 @@ typedef struct lang_input_statement_struct /* Usually the same as filename, but for a file spec'd with -l this is the -l switch itself rather than the filename. */ const char *local_sym_name; - + bfd *the_bfd; - + boolean closed; file_ptr passive_position; - + /* Symbol table of the file. */ asymbol **asymbols; unsigned int symbol_count; - + /* Point to the next file - whatever it is, wanders up and down archives */ - - union lang_statement_union *next; + + union lang_statement_union *next; /* Point to the next file, but skips archive contents */ - union lang_statement_union *next_real_file; - + union lang_statement_union *next_real_file; + boolean is_archive; - + /* 1 means search a set of directories for this file. */ boolean search_dirs_flag; - + /* 1 means this is base file of incremental load. Do not load this file's text or data. - Also default text_start to after this file's bss. */ - + Also default text_start to after this file's bss. */ + boolean just_syms_flag; /* Whether to search for this entry as a dynamic archive. */ @@ -254,30 +233,28 @@ typedef struct lang_input_statement_struct boolean whole_archive; boolean loaded; - - /* unsigned int globals_in_this_file;*/ + +#if 0 + unsigned int globals_in_this_file; +#endif const char *target; boolean real; } lang_input_statement_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; asection *section; lang_input_statement_type *ifile; - -} lang_input_section_type; +} lang_input_section_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; asection *section; union lang_statement_union *file; } lang_afile_asection_pair_statement_type; -typedef struct lang_wild_statement_struct -{ +typedef struct lang_wild_statement_struct { lang_statement_header_type header; const char *section_name; boolean sections_sorted; @@ -288,15 +265,13 @@ typedef struct lang_wild_statement_struct lang_statement_list_type children; } lang_wild_statement_type; -typedef struct lang_address_statement_struct -{ +typedef struct lang_address_statement_struct { lang_statement_header_type header; - const char *section_name; - union etree_union *address; + const char *section_name; + union etree_union *address; } lang_address_statement_type; -typedef struct -{ +typedef struct { lang_statement_header_type header; bfd_vma output_offset; size_t size; @@ -309,14 +284,12 @@ typedef struct symbols are found. The effect is to search a group of libraries as though they were a single library. */ -typedef struct -{ +typedef struct { lang_statement_header_type header; lang_statement_list_type children; } lang_group_statement_type; -typedef union lang_statement_union -{ +typedef union lang_statement_union { lang_statement_header_type header; union lang_statement_union *next; lang_wild_statement_type wild_statement; @@ -340,8 +313,7 @@ typedef union lang_statement_union /* This structure holds information about a program header, from the PHDRS command in the linker script. */ -struct lang_phdr -{ +struct lang_phdr { struct lang_phdr *next; const char *name; unsigned long type; @@ -354,22 +326,30 @@ struct lang_phdr /* This structure is used to hold a list of sections which may not cross reference each other. */ -struct lang_nocrossref -{ +struct lang_nocrossref { struct lang_nocrossref *next; const char *name; }; /* The list of nocrossref lists. */ -struct lang_nocrossrefs -{ +struct lang_nocrossrefs { struct lang_nocrossrefs *next; struct lang_nocrossref *list; }; extern struct lang_nocrossrefs *nocrossref_list; +/* This structure is used to hold a list of input section names which + will not match an output section in the linker script. */ + +struct unique_sections { + struct unique_sections *next; + const char *name; +}; + +extern struct unique_sections *unique_section_list; + extern lang_output_section_statement_type *abs_output_section; extern lang_statement_list_type lang_output_section_statement; extern boolean lang_has_input_file; @@ -379,6 +359,7 @@ extern boolean delete_output_file_on_failure; extern const char *entry_symbol; extern boolean entry_from_cmdline; +extern lang_statement_list_type file_chain; extern void lang_init PARAMS ((void)); extern struct memory_region_struct *lang_memory_region_lookup @@ -430,12 +411,11 @@ extern bfd_vma lang_do_assignments bfd_vma dot)); #define LANG_FOR_EACH_INPUT_STATEMENT(statement) \ - extern lang_statement_list_type file_chain; \ lang_input_statement_type *statement; \ for (statement = (lang_input_statement_type *)file_chain.head;\ statement != (lang_input_statement_type *)NULL; \ statement = (lang_input_statement_type *)statement->next)\ - + extern void lang_process PARAMS ((void)); extern void ldlang_add_file PARAMS ((lang_input_statement_type *)); extern lang_output_section_statement_type *lang_output_section_find @@ -492,5 +472,7 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend extern void lang_register_vers_node PARAMS ((const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *)); +boolean unique_section_p PARAMS ((const char *)); +extern void lang_add_unique PARAMS ((const char *)); #endif diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h index 53444ca..9990ddd 100644 --- a/contrib/binutils/ld/ldlex.h +++ b/contrib/binutils/ld/ldlex.h @@ -57,6 +57,6 @@ extern void lex_unput PARAMS ((int)); #ifndef yywrap extern int yywrap PARAMS ((void)); #endif -extern void parse_args PARAMS ((int, char **)); +extern void parse_args PARAMS ((unsigned, char **)); #endif diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l index f3efe77..d5f5d27 100644 --- a/contrib/binutils/ld/ldlex.l +++ b/contrib/binutils/ld/ldlex.l @@ -115,7 +115,7 @@ WHITE [ \t\n\r]+ NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~] V_TAG [.$_a-zA-Z][._a-zA-Z0-9]* -V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]* +V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)* %s SCRIPT %s EXPRESSION diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c index 676eeba..9d6e042 100644 --- a/contrib/binutils/ld/ldmain.c +++ b/contrib/binutils/ld/ldmain.c @@ -36,12 +36,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldgram.h" #include "ldexp.h" #include "ldlang.h" -#include "ldemul.h" #include "ldlex.h" #include "ldfile.h" +#include "ldemul.h" #include "ldctor.h" -/* Somewhere above, sys/stat.h got included . . . . */ +/* Somewhere above, sys/stat.h got included . . . . */ #if !defined(S_ISDIR) && defined(S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif @@ -65,7 +65,7 @@ const char *output_filename = "a.out"; /* Name this program was invoked by. */ char *program_name; -/* The file that we're creating */ +/* The file that we're creating. */ bfd *output_bfd = 0; /* Set by -G argument, for MIPS ECOFF target. */ @@ -130,8 +130,7 @@ static boolean unattached_reloc PARAMS ((struct bfd_link_info *, static boolean notice PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma)); -static struct bfd_link_callbacks link_callbacks = -{ +static struct bfd_link_callbacks link_callbacks = { add_archive_element, multiple_definition, multiple_common, @@ -150,10 +149,10 @@ struct bfd_link_info link_info; static void remove_output () { - if (output_filename) + if (output_filename) { if (output_bfd && output_bfd->iostream) - fclose((FILE *)(output_bfd->iostream)); + fclose ((FILE *) (output_bfd->iostream)); if (delete_output_file_on_failure) unlink (output_filename); } @@ -200,6 +199,8 @@ main (argc, argv) config.build_constructors = true; config.dynamic_link = false; config.has_shared = false; + config.split_by_reloc = (unsigned) -1; + config.split_by_file = (bfd_size_type) -1; command_line.force_common_definition = false; command_line.interpreter = NULL; command_line.rpath = NULL; @@ -215,12 +216,14 @@ main (argc, argv) link_info.callbacks = &link_callbacks; link_info.relocateable = false; + link_info.emitrelocations = false; link_info.shared = false; link_info.symbolic = false; link_info.static_link = false; link_info.traditional_format = false; link_info.optimize = false; link_info.no_undefined = false; + link_info.allow_shlib_undefined = false; link_info.strip = strip_none; link_info.discard = discard_none; link_info.keep_memory = true; @@ -236,6 +239,9 @@ main (argc, argv) and _fini symbols. We are compatible. */ link_info.init_function = "_init"; link_info.fini_function = "_fini"; + link_info.new_dtags = false; + link_info.flags = (bfd_vma) 0; + link_info.flags_1 = (bfd_vma) 0; ldfile_add_arch (""); @@ -243,7 +249,6 @@ main (argc, argv) force_make_executable = false; config.magic_demand_paged = true; config.text_read_only = true; - config.make_executable = true; emulation = get_emulation (argc, argv); ldemul_choose_mode (emulation); @@ -322,7 +327,6 @@ main (argc, argv) ldemul_after_parse (); - if (config.map_filename) { if (strcmp (config.map_filename, "-") == 0) @@ -341,21 +345,22 @@ main (argc, argv) } } - lang_process (); /* Print error messages for any missing symbols, for any warning - symbols, and possibly multiple definitions */ - + symbols, and possibly multiple definitions. */ - if (config.text_read_only) + if (! link_info.relocateable) { - /* Look for a text section and mark the readonly attribute in it */ + /* Look for a text section and switch the readonly attribute in it. */ asection *found = bfd_get_section_by_name (output_bfd, ".text"); if (found != (asection *) NULL) { - found->flags |= SEC_READONLY; + if (config.text_read_only) + found->flags |= SEC_READONLY; + else + found->flags &= ~SEC_READONLY; } } @@ -395,12 +400,12 @@ main (argc, argv) einfo (_("%F%B: final close failed: %E\n"), output_bfd); /* If the --force-exe-suffix is enabled, and we're making an - executable file and it doesn't end in .exe, copy it to one which does. */ - + executable file and it doesn't end in .exe, copy it to one + which does. */ if (! link_info.relocateable && command_line.force_exe_suffix) { int len = strlen (output_filename); - if (len < 4 + if (len < 4 || (strcasecmp (output_filename + len - 4, ".exe") != 0 && strcasecmp (output_filename + len - 4, ".dll") != 0)) { @@ -491,7 +496,7 @@ get_emulation (argc, argv) } else { - einfo(_("%P%F: missing argument to -m\n")); + einfo (_("%P%F: missing argument to -m\n")); } } else if (strcmp (argv[i], "-mips1") == 0 @@ -539,7 +544,7 @@ check_for_scripts_dir (dir) dirlen = strlen (dir); /* sizeof counts the terminating NUL. */ - buf = (char *) xmalloc (dirlen + sizeof("/ldscripts")); + buf = (char *) xmalloc (dirlen + sizeof ("/ldscripts")); sprintf (buf, "%s/ldscripts", dir); res = stat (buf, &s) == 0 && S_ISDIR (s.st_mode); @@ -564,7 +569,8 @@ set_scripts_dir () size_t dirlen; if (check_for_scripts_dir (SCRIPTDIR)) - return; /* We've been installed normally. */ + /* We've been installed normally. */ + return; /* Look for "ldscripts" in the dir where our binary is. */ end = strrchr (program_name, '/'); @@ -572,7 +578,7 @@ set_scripts_dir () { /* We could have \foo\bar, or /foo\bar. */ char *bslash = strrchr (program_name, '\\'); - if (bslash > end) + if (end == NULL || (bslash != NULL && bslash > end)) end = bslash; } #endif @@ -592,14 +598,16 @@ set_scripts_dir () dir[dirlen] = '\0'; if (check_for_scripts_dir (dir)) - return; /* Don't free dir. */ + /* Don't free dir. */ + return; /* Look for "ldscripts" in <the dir where our binary is>/../lib. */ strcpy (dir + dirlen, "/../lib"); if (check_for_scripts_dir (dir)) return; - free (dir); /* Well, we tried. */ + /* Well, we tried. */ + free (dir); } void @@ -614,7 +622,7 @@ add_ysym (name) bfd_hash_newfunc, 61)) einfo (_("%P%F: bfd_hash_table_init failed: %E\n")); - } + } if (bfd_hash_lookup (link_info.notice_hash, name, true, true) == (struct bfd_hash_entry *) NULL) @@ -711,7 +719,6 @@ add_keepsyms_file (filename) /* This is called when BFD has decided to include an archive member in a link. */ -/*ARGSUSED*/ static boolean add_archive_element (info, abfd, name) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -826,7 +833,6 @@ add_archive_element (info, abfd, name) /* This is called when BFD has discovered a symbol which is defined multiple times. */ -/*ARGSUSED*/ static boolean multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -855,6 +861,13 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval) nbfd, nsec, nval, name); if (obfd != (bfd *) NULL) einfo (_("%D: first defined here\n"), obfd, osec, oval); + + if (command_line.relax) + { + einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n")); + command_line.relax = 0; + } + return true; } @@ -863,7 +876,6 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval) or when two common symbols are found. We only do something if -warn-common was used. */ -/*ARGSUSED*/ static boolean multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -930,7 +942,6 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize) entry in the linker hash table for the set. SECTION and VALUE represent a value which should be added to the set. */ -/*ARGSUSED*/ static boolean add_to_set (info, h, reloc, abfd, section, value) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -1019,8 +1030,7 @@ constructor_callback (info, constructor, name, abfd, section, value) /* A structure used by warning_callback to pass information through bfd_map_over_sections. */ -struct warning_callback_info -{ +struct warning_callback_info { boolean found; const char *warning; const char *symbol; @@ -1029,7 +1039,6 @@ struct warning_callback_info /* This is called when there is a reference to a warning symbol. */ -/*ARGSUSED*/ static boolean warning_callback (info, warning, symbol, abfd, section, address) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -1151,7 +1160,6 @@ warning_find_reloc (abfd, sec, iarg) /* This is called when an undefined symbol is found. */ -/*ARGSUSED*/ static boolean undefined_symbol (info, name, abfd, section, address, fatal) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -1159,7 +1167,7 @@ undefined_symbol (info, name, abfd, section, address, fatal) bfd *abfd; asection *section; bfd_vma address; - boolean fatal; + boolean fatal ATTRIBUTE_UNUSED; { static char *error_name; static unsigned int error_count; @@ -1232,7 +1240,6 @@ undefined_symbol (info, name, abfd, section, address, fatal) /* This is called when a reloc overflows. */ -/*ARGSUSED*/ static boolean reloc_overflow (info, name, reloc_name, addend, abfd, section, address) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -1256,7 +1263,6 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address) /* This is called when a dangerous relocation is made. */ -/*ARGSUSED*/ static boolean reloc_dangerous (info, message, abfd, section, address) struct bfd_link_info *info ATTRIBUTE_UNUSED; @@ -1276,7 +1282,6 @@ reloc_dangerous (info, message, abfd, section, address) /* This is called when a reloc is being generated attached to a symbol that is not being output. */ -/*ARGSUSED*/ static boolean unattached_reloc (info, name, abfd, section, address) struct bfd_link_info *info ATTRIBUTE_UNUSED; diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c index e343944..7068cc3 100644 --- a/contrib/binutils/ld/ldmisc.c +++ b/contrib/binutils/ld/ldmisc.c @@ -76,10 +76,10 @@ demangle (string) && bfd_get_symbol_leading_char (output_bfd) == string[0]) ++string; - /* This is a hack for better error reporting on XCOFF, or the MS PE */ - /* format. Xcoff has a single '.', while the NT PE for PPC has '..'. */ - /* So we remove all of them. */ - while(string[0] == '.') + /* This is a hack for better error reporting on XCOFF, or the MS PE + format. Xcoff has a single '.', while the NT PE for PPC has + '..'. So we remove all of them. */ + while (string[0] == '.') ++string; res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS); @@ -96,19 +96,19 @@ vfinfo (fp, fmt, arg) while (*fmt != '\0') { - while (*fmt != '%' && *fmt != '\0') + while (*fmt != '%' && *fmt != '\0') { putc (*fmt, fp); fmt++; } - if (*fmt == '%') + if (*fmt == '%') { - fmt ++; - switch (*fmt++) + fmt++; + switch (*fmt++) { default: - fprintf (fp,"%%%c", fmt[-1]); + fprintf (fp, "%%%c", fmt[-1]); break; case '%': @@ -191,7 +191,7 @@ vfinfo (fp, fmt, arg) case 'B': /* filename from a bfd */ - { + { bfd *abfd = va_arg (arg, bfd *); if (abfd->my_archive) fprintf (fp, "%s(%s)", abfd->my_archive->filename, @@ -202,12 +202,12 @@ vfinfo (fp, fmt, arg) break; case 'F': - /* error is fatal */ + /* Error is fatal. */ fatal = true; break; case 'P': - /* print program name */ + /* Print program name. */ fprintf (fp, "%s", program_name); break; @@ -233,7 +233,7 @@ vfinfo (fp, fmt, arg) break; case 'S': - /* print script file and linenumber */ + /* Print script file and linenumber. */ if (parsing_defsym) fprintf (fp, "--defsym %s", lex_string); else if (ldfile_input_filename != NULL) @@ -243,17 +243,17 @@ vfinfo (fp, fmt, arg) break; case 'R': - /* Print all that's interesting about a relent */ + /* Print all that's interesting about a relent. */ { arelent *relent = va_arg (arg, arelent *); - + lfinfo (fp, "%s+0x%v (type %s)", (*(relent->sym_ptr_ptr))->name, relent->addend, relent->howto->name); } break; - + case 'C': case 'D': case 'G': @@ -355,7 +355,7 @@ vfinfo (fp, fmt, arg) if (linenumber != 0) lfinfo (fp, ":%u", linenumber); } - else if (linenumber != 0) + else if (linenumber != 0) lfinfo (fp, "%B:%s:%u", abfd, filename, linenumber); else lfinfo (fp, "%B(%s+0x%v):%s", abfd, section->name, @@ -380,7 +380,7 @@ vfinfo (fp, fmt, arg) } } break; - + case 's': /* arbitrary string, like printf */ fprintf (fp, "%s", va_arg (arg, char *)); @@ -399,11 +399,11 @@ vfinfo (fp, fmt, arg) } } - if (fatal == true) - xexit(1); + if (fatal == true) + xexit (1); } -/* Format info message and print on stdout. */ +/* Format info message and print on stdout. */ /* (You would think this should be called just "info", but then you would hosed by LynxOS, which defines that name in its libc.) */ @@ -431,7 +431,7 @@ info_msg (va_alist) va_end (arg); } -/* ('e' for error.) Format info message and print on stderr. */ +/* ('e' for error.) Format info message and print on stderr. */ void #if USE_STDARG @@ -456,7 +456,7 @@ einfo (va_alist) va_end (arg); } -void +void info_assert (file, line) const char *file; unsigned int line; @@ -468,13 +468,13 @@ char * buystring (x) CONST char *CONST x; { - size_t l = strlen(x)+1; - char *r = xmalloc(l); - memcpy(r, x,l); + size_t l = strlen (x) + 1; + char *r = xmalloc (l); + memcpy (r, x, l); return r; } -/* ('m' for map) Format info message and print on map. */ +/* ('m' for map) Format info message and print on map. */ void #if USE_STDARG @@ -525,13 +525,13 @@ lfinfo (va_alist) /* Functions to print the link map. */ -void +void print_space () { fprintf (config.map_file, " "); } -void +void print_nl () { fprintf (config.map_file, "\n"); diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c index 5b600a2..4e027b0 100644 --- a/contrib/binutils/ld/ldver.c +++ b/contrib/binutils/ld/ldver.c @@ -1,5 +1,6 @@ /* ldver.c -- Print linker version. - Copyright (C) 1991, 92, 93, 94, 95, 1996, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -23,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ld.h" #include "ldver.h" +#include "ldexp.h" +#include "ldlang.h" +#include "ldfile.h" #include "ldemul.h" #include "ldmain.h" @@ -35,12 +39,12 @@ ldversion (noisy) fprintf (stdout, _("GNU ld version %s (with BFD %s)\n"), ld_program_version, BFD_VERSION); - if (noisy) + if (noisy) { ld_emulation_xfer_type **ptr = ld_emulations; - + printf (_(" Supported emulations:\n")); - while (*ptr) + while (*ptr) { printf (" %s\n", (*ptr)->emulation_name); ptr++; diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c index b56119a..e4f176f 100644 --- a/contrib/binutils/ld/ldwrite.c +++ b/contrib/binutils/ld/ldwrite.c @@ -1,5 +1,5 @@ /* ldwrite.c -- write out the linked file - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain sac@cygnus.com @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ldmain.h" static void build_link_order PARAMS ((lang_statement_union_type *)); -static asection *clone_section PARAMS ((bfd *, asection *, int *)); +static asection *clone_section PARAMS ((bfd *, asection *, const char *, int *)); static void split_sections PARAMS ((bfd *, struct bfd_link_info *)); /* Build link_order structures for the BFD linker. */ @@ -290,48 +290,43 @@ build_link_order (statement) /* Call BFD to write out the linked file. */ - /**********************************************************************/ - /* Wander around the input sections, make sure that we'll never try and create an output section with more relocs than will fit.. Do this by always assuming the worst case, and - creating new output sections with all the right bits */ + creating new output sections with all the right bits. */ #define TESTIT 1 static asection * -clone_section (abfd, s, count) +clone_section (abfd, s, name, count) bfd *abfd; asection *s; + const char *name; int *count; { -#define SSIZE 8 - char sname[SSIZE]; /* ?? find the name for this size */ + char templ[6]; + char *sname; asection *n; struct bfd_link_hash_entry *h; - /* Invent a section name - use first five - chars of base section name and a digit suffix */ - do + + /* Invent a section name from the first five chars of the base + section name and a digit suffix. */ + strncpy (templ, name, sizeof (templ) - 1); + templ[sizeof (templ) - 1] = '\0'; + if ((sname = bfd_get_unique_section_name (abfd, templ, count)) == NULL + || (n = bfd_make_section_anyway (abfd, sname)) == NULL + || (h = bfd_link_hash_lookup (link_info.hash, + sname, true, true, false)) == NULL) { - unsigned int i; - char b[6]; - for (i = 0; i < sizeof (b) - 1 && s->name[i]; i++) - b[i] = s->name[i]; - b[i] = 0; - sprintf (sname, "%s%d", b, (*count)++); + einfo (_("%F%P: clone section failed: %E\n")); + /* Silence gcc warnings. einfo exits, so we never reach here. */ + return NULL; } - while (bfd_get_section_by_name (abfd, sname)); - n = bfd_make_section_anyway (abfd, xstrdup (sname)); - - /* Create a symbol of the same name */ - - h = bfd_link_hash_lookup (link_info.hash, - sname, true, true, false); + /* Set up section symbol. */ h->type = bfd_link_hash_defined; h->u.def.value = 0; - h->u.def.section = n ; - + h->u.def.section = n; n->flags = s->flags; n->vma = s->vma; @@ -348,7 +343,7 @@ clone_section (abfd, s, count) } #if TESTING -static void +static void ds (s) asection *s; { @@ -368,6 +363,7 @@ ds (s) } printf ("\n"); } + dump (s, a1, a2) char *s; asection *a1; @@ -378,7 +374,7 @@ dump (s, a1, a2) ds (a2); } -static void +static void sanity_check (abfd) bfd *abfd; { @@ -402,7 +398,7 @@ sanity_check (abfd) #define dump(a, b, c) #endif -static void +static void split_sections (abfd, info) bfd *abfd; struct bfd_link_info *info; @@ -410,27 +406,27 @@ split_sections (abfd, info) asection *original_sec; int nsecs = abfd->section_count; sanity_check (abfd); - /* look through all the original sections */ + /* Look through all the original sections. */ for (original_sec = abfd->sections; original_sec && nsecs; original_sec = original_sec->next, nsecs--) { - boolean first = true; int count = 0; - int lines = 0; - int relocs = 0; - struct bfd_link_order **pp; + unsigned int lines = 0; + unsigned int relocs = 0; + bfd_size_type sec_size = 0; + struct bfd_link_order *l; + struct bfd_link_order *p; bfd_vma vma = original_sec->vma; - bfd_vma shift_offset = 0; asection *cursor = original_sec; - /* count up the relocations and line entries to see if - anything would be too big to fit */ - for (pp = &(cursor->link_order_head); *pp; pp = &((*pp)->next)) + /* Count up the relocations and line entries to see if anything + would be too big to fit. Accumulate section size too. */ + for (l = NULL, p = cursor->link_order_head; p != NULL; p = l->next) { - struct bfd_link_order *p = *pp; - int thislines = 0; - int thisrelocs = 0; + unsigned int thislines = 0; + unsigned int thisrelocs = 0; + bfd_size_type thissize = 0; if (p->type == bfd_indirect_link_order) { asection *sec; @@ -444,77 +440,98 @@ split_sections (abfd, info) if (info->relocateable) thisrelocs = sec->reloc_count; + if (sec->_cooked_size != 0) + thissize = sec->_cooked_size; + else + thissize = sec->_raw_size; + } else if (info->relocateable && (p->type == bfd_section_reloc_link_order || p->type == bfd_symbol_reloc_link_order)) thisrelocs++; - if (! first - && (thisrelocs + relocs > config.split_by_reloc - || thislines + lines > config.split_by_reloc - || config.split_by_file)) + if (l != NULL + && (thisrelocs + relocs >= config.split_by_reloc + || thislines + lines >= config.split_by_reloc + || thissize + sec_size >= config.split_by_file)) { - /* create a new section and put this link order and the - following link orders into it */ - struct bfd_link_order *l = p; - asection *n = clone_section (abfd, cursor, &count); - *pp = NULL; /* Snip off link orders from old section */ - n->link_order_head = l; /* attach to new section */ - pp = &n->link_order_head; + /* Create a new section and put this link order and the + following link orders into it. */ + bfd_vma shift_offset; + asection *n; - /* change the size of the original section and - update the vma of the new one */ + n = clone_section (abfd, cursor, original_sec->name, &count); - dump ("before snip", cursor, n); + /* Attach the link orders to the new section and snip + them off from the old section. */ + n->link_order_head = p; + n->link_order_tail = cursor->link_order_tail; + cursor->link_order_tail = l; + l->next = NULL; + l = p; - n->_raw_size = cursor->_raw_size - l->offset; - cursor->_raw_size = l->offset; + /* Change the size of the original section and + update the vma of the new one. */ - vma += cursor->_raw_size; - n->lma = n->vma = vma; + dump ("before snip", cursor, n); - shift_offset = l->offset; + shift_offset = p->offset; + if (cursor->_cooked_size != 0) + { + n->_cooked_size = cursor->_cooked_size - shift_offset; + cursor->_cooked_size = shift_offset; + } + n->_raw_size = cursor->_raw_size - shift_offset; + cursor->_raw_size = shift_offset; - /* run down the chain and change the output section to - the right one, update the offsets too */ + vma += shift_offset; + n->lma = n->vma = vma; - while (l) + /* Run down the chain and change the output section to + the right one, update the offsets too. */ + do { - l->offset -= shift_offset; - if (l->type == bfd_indirect_link_order) + p->offset -= shift_offset; + if (p->type == bfd_indirect_link_order) { - l->u.indirect.section->output_section = n; - l->u.indirect.section->output_offset = l->offset; + p->u.indirect.section->output_section = n; + p->u.indirect.section->output_offset = p->offset; } - l = l->next; + p = p->next; } + while (p); + dump ("after snip", cursor, n); cursor = n; relocs = thisrelocs; lines = thislines; + sec_size = thissize; } else { + l = p; relocs += thisrelocs; lines += thislines; + sec_size += thissize; } - - first = false; } } sanity_check (abfd); } + /**********************************************************************/ + void ldwrite () { /* Reset error indicator, which can typically something like invalid - format from openning up the .o files */ + format from opening up the .o files. */ bfd_set_error (bfd_error_no_error); lang_for_each_statement (build_link_order); - if (config.split_by_reloc || config.split_by_file) + if (config.split_by_reloc != (unsigned) -1 + || config.split_by_file != (bfd_size_type) -1) split_sections (output_bfd, &link_info); if (!bfd_final_link (output_bfd, &link_info)) { @@ -523,8 +540,8 @@ ldwrite () out. */ if (bfd_get_error () != bfd_error_no_error) - einfo (_("%F%P: final link failed: %E\n"), output_bfd); + einfo (_("%F%P: final link failed: %E\n")); else - xexit(1); + xexit (1); } } diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c index e2aac47..f9ef805 100644 --- a/contrib/binutils/ld/lexsup.c +++ b/contrib/binutils/ld/lexsup.c @@ -1,5 +1,5 @@ /* Parse options for the GNU linker. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -37,6 +37,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldfile.h" #include "ldver.h" #include "ldemul.h" +#include "demangle.h" #ifndef PATH_SEPARATOR #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__)) @@ -46,7 +47,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #endif #endif -/* Somewhere above, sys/stat.h got included . . . . */ +/* Somewhere above, sys/stat.h got included . . . . */ #if !defined(S_ISDIR) && defined(S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif @@ -123,6 +124,10 @@ int parsing_defsym = 0; #define OPTION_NO_UNDEFINED (OPTION_MPC860C0 + 1) #define OPTION_INIT (OPTION_NO_UNDEFINED + 1) #define OPTION_FINI (OPTION_INIT + 1) +#define OPTION_SECTION_START (OPTION_FINI + 1) +#define OPTION_UNIQUE (OPTION_SECTION_START + 1) +#define OPTION_TARGET_HELP (OPTION_UNIQUE + 1) +#define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1) /* The long options. This structure is used for both the option parsing and the help text. */ @@ -138,15 +143,24 @@ struct ld_option /* The documentation string. If this is NULL, this is a synonym for the previous option. */ const char *doc; - enum - { - /* Use one dash before long option name. */ - ONE_DASH, - /* Use two dashes before long option name. */ - TWO_DASHES, - /* Don't mention this option in --help output. */ - NO_HELP - } control; + enum { + /* Use one dash before long option name. */ + ONE_DASH, + /* Use two dashes before long option name. */ + TWO_DASHES, + /* Only accept two dashes before the long option name. + This is an overloading of the use of this enum, since originally it + was only intended to tell the --help display function how to display + the long option name. This feature was added in order to resolve + the confusion about the -omagic command line switch. Is it setting + the output file name to "magic" or is it setting the NMAGIC flag on + the output ? It has been decided that it is setting the output file + name, and that if you want to set the NMAGIC flag you should use -N + or --omagic. */ + EXACTLY_TWO_DASHES, + /* Don't mention this option in --help output. */ + NO_HELP + } control; }; static const struct ld_option ld_options[] = @@ -196,13 +210,15 @@ static const struct ld_option ld_options[] = 'n', NULL, N_("Do not page align data"), TWO_DASHES }, { {"omagic", no_argument, NULL, 'N'}, 'N', NULL, N_("Do not page align data, do not make text readonly"), - TWO_DASHES }, + EXACTLY_TWO_DASHES }, { {"output", required_argument, NULL, 'o'}, - 'o', N_("FILE"), N_("Set output file name"), TWO_DASHES }, + 'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES }, { {NULL, required_argument, NULL, '\0'}, 'O', NULL, N_("Optimize output file"), ONE_DASH }, { {"Qy", no_argument, NULL, OPTION_IGNORE}, '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH }, + { {"emit-relocs", no_argument, NULL, 'q'}, + 'q', NULL, "Generate relocations in final output", TWO_DASHES }, { {"relocateable", no_argument, NULL, 'r'}, 'r', NULL, N_("Generate relocateable output"), TWO_DASHES }, { {NULL, no_argument, NULL, '\0'}, @@ -220,6 +236,8 @@ static const struct ld_option ld_options[] = 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES }, { {"undefined", required_argument, NULL, 'u'}, 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES }, + { {"unique", optional_argument, NULL, OPTION_UNIQUE}, + '\0', N_("[=SECTION]"), N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES }, { {"Ur", no_argument, NULL, OPTION_UR}, '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH }, { {"version", no_argument, NULL, OPTION_VERSION}, @@ -234,8 +252,6 @@ static const struct ld_option ld_options[] = 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES }, { {NULL, required_argument, NULL, '\0'}, 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH }, - { {NULL, required_argument, NULL, '\0'}, - 'z', N_("KEYWORD"), N_("Ignored for Solaris compatibility"), ONE_DASH }, { {"start-group", no_argument, NULL, '('}, '(', NULL, N_("Start a group"), TWO_DASHES }, { {"end-group", no_argument, NULL, ')'}, @@ -267,8 +283,8 @@ static const struct ld_option ld_options[] = '\0', NULL, N_("Output cross reference table"), TWO_DASHES }, { {"defsym", required_argument, NULL, OPTION_DEFSYM}, '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES }, - { {"demangle", no_argument, NULL, OPTION_DEMANGLE}, - '\0', NULL, N_("Demangle symbol names"), TWO_DASHES }, + { {"demangle", optional_argument, NULL, OPTION_DEMANGLE}, + '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"), TWO_DASHES }, { {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER}, '\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES }, { {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS}, @@ -295,6 +311,8 @@ static const struct ld_option ld_options[] = '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES }, { {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED}, '\0', NULL, N_("Allow no undefined symbols"), TWO_DASHES }, + { {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED}, + '\0', NULL, N_("Allow undefined symbols in shared objects"), TWO_DASHES }, { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH}, '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES}, { {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE}, @@ -304,7 +322,7 @@ static const struct ld_option ld_options[] = { {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC}, '\0', NULL, NULL, NO_HELP }, { {"oformat", required_argument, NULL, OPTION_OFORMAT}, - '\0', N_("TARGET"), N_("Specify target of output file"), TWO_DASHES }, + '\0', N_("TARGET"), N_("Specify target of output file"), EXACTLY_TWO_DASHES }, { {"qmagic", no_argument, NULL, OPTION_IGNORE}, '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH }, { {"relax", no_argument, NULL, OPTION_RELAX}, @@ -324,16 +342,20 @@ static const struct ld_option ld_options[] = '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES }, { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON}, '\0', NULL, NULL, NO_HELP }, - { {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE}, - '\0', NULL, N_("Split output sections for each file"), TWO_DASHES }, - { {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC}, - '\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES }, + { {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE}, + '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"), TWO_DASHES }, + { {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC}, + '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"), TWO_DASHES }, { {"stats", no_argument, NULL, OPTION_STATS}, '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES }, + { {"target-help", no_argument, NULL, OPTION_TARGET_HELP}, + '\0', NULL, N_("Display target specific options"), TWO_DASHES }, { {"task-link", required_argument, NULL, OPTION_TASK_LINK}, '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES }, { {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}, '\0', NULL, N_("Use same format as native linker"), TWO_DASHES }, + { {"section-start", required_argument, NULL, OPTION_SECTION_START}, + '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"), TWO_DASHES }, { {"Tbss", required_argument, NULL, OPTION_TBSS}, '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH }, { {"Tdata", required_argument, NULL, OPTION_TDATA}, @@ -370,7 +392,7 @@ static const struct ld_option ld_options[] = '\0', N_("[=WORDS]"), N_("Modify problematic branches in last WORDS (1-10,\n\t\t\t\tdefault 5) words of a page"), TWO_DASHES } }; -#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0])) +#define OPTION_COUNT ARRAY_SIZE (ld_options) /* Test STRING for containing a string of digits that form a number between MIN and MAX. The return value is the number or ERR. */ @@ -401,14 +423,16 @@ is_num (string, min, max, err) void parse_args (argc, argv) - int argc; + unsigned argc; char **argv; { - int i, is, il; + unsigned i; + int is, il, irl; int ingroup = 0; char *default_dirlist = NULL; char shortopts[OPTION_COUNT * 3 + 2]; struct option longopts[OPTION_COUNT + 1]; + struct option really_longopts[OPTION_COUNT + 1]; int last_optind; /* Starting the short option string with '-' is for programs that @@ -418,6 +442,7 @@ parse_args (argc, argv) shortopts[0] = '-'; is = 1; il = 0; + irl = 0; for (i = 0; i < OPTION_COUNT; i++) { if (ld_options[i].shortopt != '\0') @@ -438,12 +463,21 @@ parse_args (argc, argv) } if (ld_options[i].opt.name != NULL) { - longopts[il] = ld_options[i].opt; - ++il; + if (ld_options[i].control == EXACTLY_TWO_DASHES) + { + really_longopts[irl] = ld_options[i].opt; + ++irl; + } + else + { + longopts[il] = ld_options[i].opt; + ++il; + } } } shortopts[is] = '\0'; longopts[il].name = NULL; + really_longopts[irl].name = NULL; /* The -G option is ambiguous on different platforms. Sometimes it specifies the largest data size to put into the small data @@ -509,12 +543,22 @@ parse_args (argc, argv) /* getopt_long_only is like getopt_long, but '-' as well as '--' can indicate a long option. */ + opterr = 0; optc = getopt_long_only (argc, argv, shortopts, longopts, &longind); + if (optc == '?') + { + --optind; + optc = getopt_long (argc, argv, shortopts, really_longopts, &longind); + } if (optc == -1) break; + switch (optc) { + case '?': + fprintf (stderr, _("%s: unrecognized option '%s'\n"), + program_name, argv[optind - 1]); default: fprintf (stderr, _("%s: use the --help option for usage information\n"), @@ -587,6 +631,17 @@ parse_args (argc, argv) break; case OPTION_DEMANGLE: demangling = true; + if (optarg != NULL) + { + enum demangling_styles style; + + style = cplus_demangle_name_to_style (optarg); + if (style == unknown_demangling) + einfo (_("%F%P: unknown demangling style `%s'"), + optarg); + + cplus_demangle_set_style (style); + } break; case OPTION_DYNAMIC_LINKER: command_line.interpreter = optarg; @@ -691,6 +746,9 @@ parse_args (argc, argv) case OPTION_NO_UNDEFINED: link_info.no_undefined = true; break; + case OPTION_ALLOW_SHLIB_UNDEFINED: + link_info.allow_shlib_undefined = true; + break; case OPTION_NO_WARN_MISMATCH: command_line.warn_mismatch = false; break; @@ -711,11 +769,14 @@ parse_args (argc, argv) link_info.optimize = strtoul (optarg, NULL, 0) ? true : false; break; case 'o': - lang_add_output (optarg, 0); + lang_add_output (optarg, 0); break; case OPTION_OFORMAT: lang_add_output_format (optarg, (char *) NULL, (char *) NULL, 0); break; + case 'q': + link_info.emitrelocations = true; + break; case 'i': case 'r': link_info.relocateable = true; @@ -836,6 +897,48 @@ parse_args (argc, argv) parser_input = input_script; yyparse (); break; + case OPTION_SECTION_START: + { + char *optarg2; + char *sec_name; + int len; + + /* Check for <something>=<somthing>... */ + optarg2 = strchr (optarg, '='); + if (optarg2 == NULL) + { + fprintf (stderr, + _("%s: Invalid argument to option \"--section-start\"\n"), + program_name); + xexit (1); + } + + optarg2++; + + /* So far so good. Are all the args present? */ + if ((*optarg == '\0') || (*optarg2 == '\0')) + { + fprintf (stderr, + _("%s: Missing argument(s) to option \"--section-start\"\n"), + program_name); + xexit (1); + } + + /* We must copy the section name as set_section_start + doesn't do it for us. */ + len = optarg2 - optarg; + sec_name = xmalloc (len); + memcpy (sec_name, optarg, len - 1); + sec_name[len - 1] = 0; + + /* Then set it... */ + set_section_start (sec_name, optarg2); + } + break; + case OPTION_TARGET_HELP: + /* Mention any target specific options. */ + ldemul_list_emulation_options (stdout); + exit (0); case OPTION_TBSS: set_section_start (".bss", optarg); break; @@ -861,6 +964,12 @@ parse_args (argc, argv) case 'u': ldlang_add_undef (optarg); break; + case OPTION_UNIQUE: + if (optarg != NULL) + lang_add_unique (optarg); + else + config.unique_orphan_sections = true; + break; case OPTION_VERBOSE: ldversion (1); version_printed = true; @@ -877,15 +986,15 @@ parse_args (argc, argv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ printf ("GNU ld %s\n", ld_program_version); - printf (_("Copyright 2000 Free Software Foundation, Inc.\n")); + printf (_("Copyright 2001 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); { ld_emulation_xfer_type **ptr = ld_emulations; - + printf (_(" Supported emulations:\n")); - while (*ptr) + while (*ptr) { printf (" %s\n", (*ptr)->emulation_name); ptr++; @@ -948,17 +1057,18 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case 'y': add_ysym (optarg); break; - case 'z': - /* We accept and ignore this option for Solaris - compatibility. Actually, on Solaris, optarg is not - ignored. Someday we should handle it correctly. FIXME. */ - break; case OPTION_SPLIT_BY_RELOC: - config.split_by_reloc = strtoul (optarg, NULL, 0); - break; + if (optarg != NULL) + config.split_by_reloc = strtoul (optarg, NULL, 0); + else + config.split_by_reloc = 32768; + break; case OPTION_SPLIT_BY_FILE: - config.split_by_file = true; - break; + if (optarg != NULL) + config.split_by_file = bfd_scan_vma (optarg, NULL, 0); + else + config.split_by_file = 1; + break; case OPTION_CHECK_SECTIONS: command_line.check_section_addresses = true; break; @@ -987,29 +1097,29 @@ the GNU General Public License. This program has absolutely no warranty.\n")); lang_leave_group (); ingroup = 0; break; - case OPTION_MPC860C0: - link_info.mpc860c0 = 20; /* default value (in bytes) */ - if (optarg) - { - unsigned words; + case OPTION_MPC860C0: + link_info.mpc860c0 = 20; /* default value (in bytes) */ + if (optarg) + { + unsigned words; - words = is_num (optarg, 1, 10, 0); - if (words == 0) - { - fprintf (stderr, + words = is_num (optarg, 1, 10, 0); + if (words == 0) + { + fprintf (stderr, _("%s: Invalid argument to option \"mpc860c0\"\n"), program_name); - xexit (1); - } - link_info.mpc860c0 = words * 4; /* convert words to bytes */ - } - command_line.relax = true; - break; + xexit (1); + } + link_info.mpc860c0 = words * 4; /* convert words to bytes */ + } + command_line.relax = true; + break; case OPTION_INIT: link_info.init_function = optarg; break; - + case OPTION_FINI: link_info.fini_function = optarg; break; @@ -1062,7 +1172,7 @@ set_section_start (sect, valstr) static void help () { - int i; + unsigned i; const char **targets, **pp; printf (_("Usage: %s [options] file...\n"), program_name); @@ -1074,7 +1184,7 @@ help () { boolean comma; int len; - int j; + unsigned j; printf (" "); @@ -1111,13 +1221,17 @@ help () if (ld_options[j].opt.name != NULL && ld_options[j].control != NO_HELP) { + int two_dashes = + (ld_options[j].control == TWO_DASHES + || ld_options[j].control == EXACTLY_TWO_DASHES); + printf ("%s-%s%s", comma ? ", " : "", - ld_options[j].control == TWO_DASHES ? "-" : "", + two_dashes ? "-" : "", ld_options[j].opt.name); len += ((comma ? 2 : 0) + 1 - + (ld_options[j].control == TWO_DASHES ? 1 : 0) + + (two_dashes ? 1 : 0) + strlen (ld_options[j].opt.name)); if (ld_options[j].arg != NULL) { diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c index d39186c..d53eccb 100644 --- a/contrib/binutils/ld/mri.c +++ b/contrib/binutils/ld/mri.c @@ -1,5 +1,6 @@ /* mri.c -- handle MRI style linker scripts - Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 1997, 1998, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -16,19 +17,15 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. + This bit does the tree decoration when MRI style link scripts + are parsed. -/* This bit does the tree decoration when MRI style link scripts are parsed */ - -/* - contributed by Steve Chamberlain - sac@cygnus.com - -*/ + Contributed by Steve Chamberlain <sac@cygnus.com>. */ #include "bfd.h" -#include "sysdep.h" +#include "sysdep.h" #include "ld.h" #include "ldexp.h" #include "ldlang.h" @@ -45,7 +42,7 @@ struct section_name_struct { etree_type *align; etree_type *subalign; int ok_to_load; -} ; +}; unsigned int symbol_truncate = 10000; struct section_name_struct *order; @@ -68,21 +65,19 @@ lookup (name, list) CONST char *name; struct section_name_struct **list; { - struct section_name_struct **ptr = list; - while (*ptr) - { - if (strcmp(name, (*ptr)->name) == 0) { - /* If this is a match, delete it, we only keep the last instance - of any name */ - *ptr = (*ptr)->next; - } - else { - ptr = &((*ptr)->next); + + while (*ptr) + { + if (strcmp (name, (*ptr)->name) == 0) + /* If this is a match, delete it, we only keep the last instance + of any name. */ + *ptr = (*ptr)->next; + else + ptr = &((*ptr)->next); } - } - *ptr = (struct section_name_struct *)xmalloc(sizeof(struct section_name_struct)); + *ptr = (struct section_name_struct *) xmalloc (sizeof (struct section_name_struct)); return ptr; } @@ -95,36 +90,35 @@ mri_add_to_list (list, name, vma, zalias, align, subalign) etree_type *align; etree_type *subalign; { - struct section_name_struct **ptr = lookup(name,list); + struct section_name_struct **ptr = lookup (name, list); + (*ptr)->name = name; (*ptr)->vma = vma; - (*ptr)->next = (struct section_name_struct *)NULL; + (*ptr)->next = (struct section_name_struct *) NULL; (*ptr)->ok_to_load = 0; (*ptr)->alias = zalias; (*ptr)->align = align; (*ptr)->subalign = subalign; } - void mri_output_section (name, vma) CONST char *name; etree_type *vma; { - mri_add_to_list(&address, name, vma, 0,0,0); + mri_add_to_list (&address, name, vma, 0, 0, 0); } -/* if any ABSOLUTE <name> are in the script, only load those files -marked thus */ +/* If any ABSOLUTE <name> are in the script, only load those files + marked thus. */ void mri_only_load (name) CONST char *name; { - mri_add_to_list(&only_load, name, 0, 0,0,0); + mri_add_to_list (&only_load, name, 0, 0, 0, 0); } - void mri_base (exp) etree_type *exp; @@ -137,240 +131,221 @@ static int done_tree = 0; void mri_draw_tree () { - if (done_tree) return; + if (done_tree) + return; - /* We don't bother with memory regions. */ -#if 0 - /* Create the regions */ - { - lang_memory_region_type *r; - r = lang_memory_region_lookup("long"); - r->current = r->origin = exp_get_vma(base, (bfd_vma)0, "origin", - lang_first_phase_enum); - r->length = (bfd_size_type) exp_get_vma(0, (bfd_vma) ~((bfd_size_type)0), - "length", lang_first_phase_enum); - } -#endif - - /* Now build the statements for the ldlang machine */ +#if 0 /* We don't bother with memory regions. */ + /* Create the regions. */ + { + lang_memory_region_type *r; + r = lang_memory_region_lookup("long"); + r->current = r->origin = exp_get_vma (base, (bfd_vma)0, "origin", + lang_first_phase_enum); + r->length = (bfd_size_type) exp_get_vma (0, (bfd_vma) ~((bfd_size_type)0), + "length", lang_first_phase_enum); + } +#endif - /* Attatch the addresses of any which have addresses, and add the - ones not mentioned */ - if (address != (struct section_name_struct *)NULL) { - struct section_name_struct *alist; - struct section_name_struct *olist; - if (order == (struct section_name_struct *)NULL) { - order = address; - } + /* Now build the statements for the ldlang machine. */ - for (alist = address; - alist != (struct section_name_struct*)NULL; - alist = alist->next) + /* Attatch the addresses of any which have addresses, + and add the ones not mentioned. */ + if (address != (struct section_name_struct *) NULL) { - int done = 0; - for (olist = order; - done == 0 && - olist != (struct section_name_struct *)NULL; - olist = olist->next) - { - if (strcmp(alist->name, olist->name) == 0) + struct section_name_struct *alist; + struct section_name_struct *olist; + + if (order == (struct section_name_struct *) NULL) + order = address; + + for (alist = address; + alist != (struct section_name_struct *) NULL; + alist = alist->next) { - olist->vma = alist->vma; - done = 1; + int done = 0; + + for (olist = order; + done == 0 && olist != (struct section_name_struct *) NULL; + olist = olist->next) + { + if (strcmp (alist->name, olist->name) == 0) + { + olist->vma = alist->vma; + done = 1; + } + } + + if (!done) + { + /* Add this onto end of order list. */ + mri_add_to_list (&order, alist->name, alist->vma, 0, 0, 0); + } } - } - if (!done) { - /* add this onto end of order list */ - mri_add_to_list(&order, alist->name, alist->vma, 0,0,0); - } - } - } - /* If we're only supposed to load a subset of them in, then prune the list. */ - - if (only_load != (struct section_name_struct *)NULL) - { - struct section_name_struct *ptr1; - struct section_name_struct *ptr2; - if (order == (struct section_name_struct*)NULL) - order = only_load; - - /* See if this name is in the list, if it is then we can load it - */ - for (ptr1 = only_load; ptr1; ptr1 = ptr1->next) + if (only_load != (struct section_name_struct *) NULL) { - for (ptr2= order; ptr2; ptr2=ptr2->next) - { - if (strcmp(ptr2->name, ptr1->name)==0) { - ptr2->ok_to_load = 1; - } - } - } - } - else - { - /* No only load list, so everything is ok to load */ - struct section_name_struct *ptr; - for (ptr = order; ptr; ptr=ptr->next) { - ptr->ok_to_load = 1; - } - } - + struct section_name_struct *ptr1; + struct section_name_struct *ptr2; + if (order == (struct section_name_struct *) NULL) + order = only_load; - /* Create the order of sections to load */ - if (order != (struct section_name_struct *)NULL) - { - /* Been told to output the sections in a certain order */ - struct section_name_struct *p = order; - while (p) + /* See if this name is in the list, if it is then we can load it. */ + for (ptr1 = only_load; ptr1; ptr1 = ptr1->next) + for (ptr2 = order; ptr2; ptr2 = ptr2->next) + if (strcmp (ptr2->name, ptr1->name) == 0) + ptr2->ok_to_load = 1; + } + else { - struct section_name_struct *aptr; - etree_type *align = 0; - etree_type *subalign = 0; - /* See if an alignment has been specified */ - - for (aptr = alignment; aptr; aptr= aptr->next) - { - if (strcmp(aptr->name, p->name)==0) { - align = aptr->align; - } - } + /* No only load list, so everything is ok to load. */ + struct section_name_struct *ptr; - for (aptr = subalignment; aptr; aptr= aptr->next) - { - if (strcmp(aptr->name, p->name)==0) { - subalign = aptr->subalign; - } - } - - if (base == 0) { - base = p->vma ? p->vma :exp_nameop(NAME, "."); - } - lang_enter_output_section_statement (p->name, base, - p->ok_to_load ? 0 : noload_section, - 1, align, subalign, - (etree_type *) NULL); - base = 0; - lang_add_wild (p->name, false, (char *)NULL, false, false, NULL); - /* If there is an alias for this section, add it too */ - for (aptr = alias; aptr; aptr = aptr->next) { - - if (strcmp(aptr->alias, p->name)== 0) { - lang_add_wild (aptr->name, false, (char *)NULL, false, false, NULL); - } - } + for (ptr = order; ptr; ptr = ptr->next) + ptr->ok_to_load = 1; + } - lang_leave_output_section_statement - (0, "*default*", (struct lang_output_section_phdr_list *) NULL, - "*default*"); + /* Create the order of sections to load. */ + if (order != (struct section_name_struct *) NULL) + { + /* Been told to output the sections in a certain order. */ + struct section_name_struct *p = order; - p = p->next; + while (p) + { + struct section_name_struct *aptr; + etree_type *align = 0; + etree_type *subalign = 0; + + /* See if an alignment has been specified. */ + for (aptr = alignment; aptr; aptr = aptr->next) + if (strcmp (aptr->name, p->name) == 0) + align = aptr->align; + + for (aptr = subalignment; aptr; aptr = aptr->next) + if (strcmp (aptr->name, p->name) == 0) + subalign = aptr->subalign; + + if (base == 0) + base = p->vma ? p->vma : exp_nameop (NAME, "."); + + lang_enter_output_section_statement (p->name, base, + p->ok_to_load ? 0 : noload_section, + 1, align, subalign, + (etree_type *) NULL); + base = 0; + lang_add_wild (p->name, false, (char *) NULL, false, false, NULL); + + /* If there is an alias for this section, add it too. */ + for (aptr = alias; aptr; aptr = aptr->next) + if (strcmp (aptr->alias, p->name) == 0) + lang_add_wild (aptr->name, false, (char *) NULL, false, false, NULL); + + lang_leave_output_section_statement + (0, "*default*", (struct lang_output_section_phdr_list *) NULL, + "*default*"); + + p = p->next; + } } - } - done_tree = 1; - } + void mri_load (name) CONST char *name; { base = 0; - lang_add_input_file(name, - lang_input_file_is_file_enum, (char *)NULL); - /* lang_leave_output_section_statement(0,"*default*");*/ + lang_add_input_file (name, + lang_input_file_is_file_enum, (char *) NULL); +#if 0 + lang_leave_output_section_statement (0, "*default*"); +#endif } - void mri_order (name) CONST char *name; { - mri_add_to_list(&order, name, 0, 0,0,0); + mri_add_to_list (&order, name, 0, 0, 0, 0); } -void +void mri_alias (want, is, isn) CONST char *want; CONST char *is; int isn; { - if (!is) { - /* Some sections are digits - */ - char buf[20]; - sprintf(buf, "%d", isn); - is = xstrdup (buf); - if (is == NULL) - abort (); - } - mri_add_to_list(&alias, is, 0, want,0,0); + if (!is) + { + char buf[20]; -} + /* Some sections are digits. */ + sprintf (buf, "%d", isn); + is = xstrdup (buf); + + if (is == NULL) + abort (); + } + + mri_add_to_list (&alias, is, 0, want, 0, 0); +} -void +void mri_name (name) CONST char *name; { - lang_add_output(name, 1); - + lang_add_output (name, 1); } - void mri_format (name) CONST char *name; { - if (strcmp(name, "S") == 0) - { - lang_add_output_format("srec", (char *) NULL, (char *) NULL, 1); - } - else if (strcmp(name, "IEEE") == 0) - { - lang_add_output_format("ieee", (char *) NULL, (char *) NULL, 1); - } - else if (strcmp(name, "COFF") == 0) - { - lang_add_output_format("coff-m68k", (char *) NULL, (char *) NULL, 1); - } - else { - einfo(_("%P%F: unknown format type %s\n"), name); - } -} + if (strcmp (name, "S") == 0) + lang_add_output_format ("srec", (char *) NULL, (char *) NULL, 1); + + else if (strcmp (name, "IEEE") == 0) + lang_add_output_format ("ieee", (char *) NULL, (char *) NULL, 1); + else if (strcmp (name, "COFF") == 0) + lang_add_output_format ("coff-m68k", (char *) NULL, (char *) NULL, 1); + + else + einfo (_("%P%F: unknown format type %s\n"), name); +} void mri_public (name, exp) CONST char *name; etree_type *exp; { - lang_add_assignment(exp_assop('=', name, exp)); + lang_add_assignment (exp_assop ('=', name, exp)); } -void +void mri_align (name, exp) CONST char *name; etree_type *exp; { - mri_add_to_list(&alignment, name,0,0,exp,0); + mri_add_to_list (&alignment, name, 0, 0, exp, 0); } -void +void mri_alignmod (name, exp) CONST char *name; etree_type *exp; { - mri_add_to_list(&subalignment, name,0,0,0,exp); + mri_add_to_list (&subalignment, name, 0, 0, 0, exp); } - -void +void mri_truncate (exp) unsigned int exp; { diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c index 6b8b1af..2553327 100644 --- a/contrib/binutils/ld/pe-dll.c +++ b/contrib/binutils/ld/pe-dll.c @@ -34,6 +34,7 @@ #include "ldmisc.h" #include "ldgram.h" #include "ldmain.h" +#include "ldfile.h" #include "ldemul.h" #include "coff/internal.h" #include "../bfd/libcoff.h" @@ -135,10 +136,11 @@ pe_dll_id_target (target) const char *target; { int i; - for (i=0; pe_detail_list[i].target_name; i++) - if (strcmp (pe_detail_list[i].target_name, target) == 0) + for (i = 0; pe_detail_list[i].target_name; i++) + if (strcmp (pe_detail_list[i].target_name, target) == 0 + || strcmp (pe_detail_list[i].object_target, target) == 0) { - pe_details = pe_detail_list+i; + pe_details = pe_detail_list + i; return; } einfo (_("%XUnsupported PEI architecture: %s\n"), target); @@ -184,7 +186,7 @@ pe_export_sort (va, vb) /* These correspond to the entries in pe_def_file->exports[]. I use exported_symbol_sections[i] to tag whether or not the symbol was - defined, since we can't export symbols we don't have. */ + defined, since we can't export symbols we don't have. */ static bfd_vma *exported_symbol_offsets; static struct sec **exported_symbol_sections; @@ -197,12 +199,11 @@ static const char *dll_name; static int min_ordinal, max_ordinal; static int *exported_symbols; -typedef struct exclude_list_struct - { - char *string; - struct exclude_list_struct *next; - } -exclude_list_struct; +typedef struct exclude_list_struct { + char *string; + struct exclude_list_struct *next; +} exclude_list_struct; + static struct exclude_list_struct *excludes = 0; void @@ -264,13 +265,13 @@ process_def_file (abfd, info) struct bfd_link_hash_entry *blhe; bfd *b; struct sec *s; - def_file_export *e=0; + def_file_export *e = 0; if (!pe_def_file) pe_def_file = def_file_empty (); /* First, run around to all the objects looking for the .drectve - sections, and push those into the def file too */ + sections, and push those into the def file too. */ for (b = info->input_bfds; b; b = b->link_next) { @@ -285,7 +286,7 @@ process_def_file (abfd, info) } } - /* Now, maybe export everything else the default way */ + /* Now, maybe export everything else the default way. */ if (pe_dll_export_everything || pe_def_file->num_exports == 0) { @@ -300,14 +301,21 @@ process_def_file (abfd, info) for (j = 0; j < nsyms; j++) { - if ((symbols[j]->flags & (BSF_FUNCTION | BSF_GLOBAL)) - == (BSF_FUNCTION | BSF_GLOBAL)) + /* We should export symbols which are either global or not + anything at all. (.bss data is the latter) */ + if ((symbols[j]->flags & BSF_GLOBAL) + || (symbols[j]->flags == BSF_NO_FLAGS)) { const char *sn = symbols[j]->name; if (*sn == '_') sn++; if (auto_export (pe_def_file, sn)) - def_file_add_export (pe_def_file, sn, 0, -1); + { + def_file_export *p; + p=def_file_add_export (pe_def_file, sn, 0, -1); + /* Fill data flag properly, from dlltool.c */ + p->flag_data = !(symbols[j]->flags & BSF_FUNCTION); + } } } } @@ -316,7 +324,7 @@ process_def_file (abfd, info) #undef NE #define NE pe_def_file->num_exports - /* Canonicalize the export list */ + /* Canonicalize the export list. */ if (pe_dll_kill_ats) { @@ -324,8 +332,9 @@ process_def_file (abfd, info) { if (strchr (pe_def_file->exports[i].name, '@')) { - /* This will preserve internal_name, which may have been pointing - to the same memory as name, or might not have */ + /* This will preserve internal_name, which may have been + pointing to the same memory as name, or might not + have. */ char *tmp = xstrdup (pe_def_file->exports[i].name); *(strchr (tmp, '@')) = 0; pe_def_file->exports[i].name = tmp; @@ -350,7 +359,8 @@ process_def_file (abfd, info) } } - e = pe_def_file->exports; /* convenience, but watch out for it changing */ + /* Convenience, but watch out for it changing. */ + e = pe_def_file->exports; exported_symbol_offsets = (bfd_vma *) xmalloc (NE * sizeof (bfd_vma)); exported_symbol_sections = (struct sec **) xmalloc (NE * sizeof (struct sec *)); @@ -374,7 +384,7 @@ process_def_file (abfd, info) { if (pe_dll_warn_dup_exports) /* xgettext:c-format */ - einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"), + einfo (_("%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"), e[j - 1].name, e[j - 1].ordinal, e[i].ordinal); } else @@ -384,7 +394,7 @@ process_def_file (abfd, info) einfo (_("Warning, duplicate EXPORT: %s\n"), e[j - 1].name); } - if (e[i].ordinal) + if (e[i].ordinal != -1) e[j - 1].ordinal = e[i].ordinal; e[j - 1].flag_private |= e[i].flag_private; e[j - 1].flag_constant |= e[i].flag_constant; @@ -416,7 +426,7 @@ process_def_file (abfd, info) false, false, true); if (blhe - && (blhe->type == bfd_link_hash_defined + && (blhe->type == bfd_link_hash_defined || (blhe->type == bfd_link_hash_common))) { count_exported++; @@ -426,11 +436,11 @@ process_def_file (abfd, info) /* Only fill in the sections. The actual offsets are computed in fill_exported_offsets() after common symbols are laid out. */ - if (blhe->type == bfd_link_hash_defined) + if (blhe->type == bfd_link_hash_defined) exported_symbol_sections[i] = blhe->u.def.section; else exported_symbol_sections[i] = blhe->u.c.p->section; - + if (pe_def_file->exports[i].ordinal != -1) { if (max_ordinal < pe_def_file->exports[i].ordinal) @@ -537,7 +547,7 @@ generate_edata (abfd, info) const char *dlnp; /* First, we need to know how many exported symbols there are, - and what the range of ordinals is. */ + and what the range of ordinals is. */ if (pe_def_file->name) { @@ -569,7 +579,7 @@ generate_edata (abfd, info) for (i = 0; i < export_table_size; i++) exported_symbols[i] = -1; - /* Now we need to assign ordinals to those that don't have them */ + /* Now we need to assign ordinals to those that don't have them. */ for (i = 0; i < NE; i++) { if (exported_symbol_sections[i]) @@ -581,7 +591,7 @@ generate_edata (abfd, info) if (pi != -1) { /* xgettext:c-format */ - einfo (_("%XError, oridinal used twice: %d (%s vs %s)\n"), + einfo (_("%XError, ordinal used twice: %d (%s vs %s)\n"), pe_def_file->exports[i].ordinal, pe_def_file->exports[i].name, pe_def_file->exports[pi].name); @@ -603,7 +613,7 @@ generate_edata (abfd, info) pe_def_file->exports[i].ordinal = next_ordinal; } - /* OK, now we can allocate some memory */ + /* OK, now we can allocate some memory. */ edata_sz = (40 /* directory */ + 4 * export_table_size /* addresses */ @@ -622,7 +632,7 @@ fill_exported_offsets (abfd, info) { int i; struct bfd_link_hash_entry *blhe; - + for (i = 0; i < pe_def_file->num_exports; i++) { char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2); @@ -641,7 +651,7 @@ fill_exported_offsets (abfd, info) if (blhe && (blhe->type == bfd_link_hash_defined)) { exported_symbol_offsets[i] = blhe->u.def.value; - } + } free (name); } } @@ -663,7 +673,7 @@ fill_edata (abfd, info) edata_d = (unsigned char *) xmalloc (edata_sz); - /* Note use of array pointer math here */ + /* Note use of array pointer math here. */ edirectory = edata_d; eaddresses = (unsigned long *) (edata_d + 40); enameptrs = eaddresses + export_table_size; @@ -672,7 +682,7 @@ fill_edata (abfd, info) #define ERVA(ptr) (((unsigned char *)(ptr) - edata_d) + edata_s->output_section->vma - image_base) - memset (edata_d, 0, 40); + memset (edata_d, 0, edata_sz); bfd_put_32 (abfd, now, edata_d + 4); if (pe_def_file->version_major != -1) { @@ -691,7 +701,7 @@ fill_edata (abfd, info) fill_exported_offsets (abfd, info); - /* Ok, now for the filling in part */ + /* Ok, now for the filling in part. */ hint = 0; for (i = 0; i < export_table_size; i++) { @@ -702,19 +712,21 @@ fill_edata (abfd, info) unsigned long srva = (exported_symbol_offsets[s] + ssec->output_section->vma + ssec->output_offset); + int ord = pe_def_file->exports[s].ordinal; - bfd_put_32 (abfd, srva - image_base, (void *) (eaddresses + i)); + bfd_put_32 (abfd, srva - image_base, + (void *) (eaddresses + ord - min_ordinal)); if (!pe_def_file->exports[s].flag_noname) { char *ename = pe_def_file->exports[s].name; bfd_put_32 (abfd, ERVA (enamestr), (void *) enameptrs); + enameptrs++; strcpy (enamestr, ename); enamestr += strlen (enamestr) + 1; - bfd_put_16 (abfd, i, (void *) eordinals); - enameptrs++; + bfd_put_16 (abfd, ord - min_ordinal, (void *) eordinals); + eordinals++; pe_def_file->exports[s].hint = hint++; } - eordinals++; } } } @@ -731,7 +743,7 @@ generate_reloc (abfd, info) struct bfd_link_info *info; { - /* for .reloc stuff */ + /* For .reloc stuff. */ reloc_data_type *reloc_data; int total_relocs = 0; int i; @@ -761,18 +773,18 @@ generate_reloc (abfd, info) asymbol **symbols; int nsyms, symsize; - /* if it's not loaded, we don't need to relocate it this way */ + /* If it's not loaded, we don't need to relocate it this way. */ if (!(s->output_section->flags & SEC_LOAD)) continue; /* I don't know why there would be a reloc for these, but I've - seen it happen - DJ */ + seen it happen - DJ */ if (s->output_section == &bfd_abs_section) continue; if (s->output_section->vma == 0) { - /* Huh? Shouldn't happen, but punt if it does */ + /* Huh? Shouldn't happen, but punt if it does. */ einfo ("DJ: zero vma section reloc detected: `%s' #%d f=%d\n", s->output_section->name, s->output_section->index, s->output_section->flags); @@ -800,9 +812,9 @@ generate_reloc (abfd, info) + sym->section->output_offset + sym->section->output_section->vma); reloc_data[total_relocs].vma = sec_vma + relocs[i]->address; - + #define BITS_AND_SHIFT(bits, shift) (bits * 1000 | shift) - + switch BITS_AND_SHIFT (relocs[i]->howto->bitsize, relocs[i]->howto->rightshift) { @@ -816,9 +828,10 @@ generate_reloc (abfd, info) break; case BITS_AND_SHIFT (16, 16): reloc_data[total_relocs].type = 4; - /* FIXME: we can't know the symbol's right value yet, - but we probably can safely assume that CE will relocate - us in 64k blocks, so leaving it zero is safe. */ + /* FIXME: we can't know the symbol's right value + yet, but we probably can safely assume that + CE will relocate us in 64k blocks, so leaving + it zero is safe. */ reloc_data[total_relocs].extra = 0; total_relocs++; break; @@ -835,31 +848,33 @@ generate_reloc (abfd, info) } } free (relocs); - /* Warning: the allocated symbols are remembered in BFD and reused - later, so don't free them! */ - /* free (symbols); */ + /* Warning: the allocated symbols are remembered in BFD and + reused later, so don't free them! */ +#if 0 + free (symbol); +#endif } } /* At this point, we have total_relocs relocation addresses in reloc_addresses, which are all suitable for the .reloc section. - We must now create the new sections. */ + We must now create the new sections. */ qsort (reloc_data, total_relocs, sizeof (*reloc_data), reloc_sort); for (i = 0; i < total_relocs; i++) { unsigned long this_page = (reloc_data[i].vma >> 12); - + if (this_page != sec_page) { reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align */ reloc_sz += 8; sec_page = this_page; } - + reloc_sz += 2; - + if (reloc_data[i].type == 4) reloc_sz += 2; } @@ -887,7 +902,7 @@ generate_reloc (abfd, info) sec_page = this_page; page_count = 0; } - bfd_put_16 (abfd, (rva & 0xfff) + (reloc_data[i].type<<12), + bfd_put_16 (abfd, (rva & 0xfff) + (reloc_data[i].type << 12), reloc_d + reloc_sz); reloc_sz += 2; if (reloc_data[i].type == 4) @@ -915,7 +930,7 @@ generate_reloc (abfd, info) static void quoteput (s, f, needs_quotes) char *s; - FILE * f; + FILE *f; int needs_quotes; { char *cp; @@ -1098,7 +1113,7 @@ static char *dll_symname; #define UNDSEC (asection *) &bfd_und_section static asection * -quick_section(abfd, name, flags, align) +quick_section (abfd, name, flags, align) bfd *abfd; const char *name; int flags; @@ -1108,13 +1123,9 @@ quick_section(abfd, name, flags, align) asymbol *sym; sec = bfd_make_section_old_way (abfd, name); - bfd_set_section_flags (abfd, sec, flags - | SEC_ALLOC - | SEC_LOAD - | SEC_KEEP - ); + bfd_set_section_flags (abfd, sec, flags | SEC_ALLOC | SEC_LOAD | SEC_KEEP); bfd_set_section_alignment (abfd, sec, align); - /* remember to undo this before trying to link internally! */ + /* Remember to undo this before trying to link internally! */ sec->output_section = sec; sym = bfd_make_empty_symbol (abfd); @@ -1160,7 +1171,7 @@ quick_reloc (abfd, address, which_howto, symidx) int which_howto; int symidx; { - if (relcount >= (relsize-1)) + if (relcount >= (relsize - 1)) { relsize += 10; if (reltab) @@ -1181,8 +1192,8 @@ save_relocs (asection *sec) int i; sec->relocation = reltab; sec->reloc_count = relcount; - sec->orelocation = (arelent **) xmalloc ((relcount+1) * sizeof (arelent *)); - for (i=0; i<relcount; i++) + sec->orelocation = (arelent **) xmalloc ((relcount + 1) * sizeof (arelent *)); + for (i = 0; i < relcount; i++) sec->orelocation[i] = sec->relocation + i; sec->orelocation[relcount] = 0; sec->flags |= SEC_RELOC; @@ -1234,14 +1245,14 @@ make_head (parent) id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2); id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2); id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2); - quick_symbol (abfd, U("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0); - quick_symbol (abfd, U(""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0); + quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0); + quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0); /* OK, pay attention here. I got confused myself looking back at it. We create a four-byte section to mark the beginning of the list, and we include an offset of 4 in the section, so that the pointer to the list points to the *end* of this section, which is - the start of the list of sections from other objects. */ + the start of the list of sections from other objects. */ bfd_set_section_size (abfd, id2, 20); d2 = (unsigned char *) xmalloc (20); @@ -1268,7 +1279,7 @@ make_head (parent) bfd_set_section_contents (abfd, id2, d2, 0, 20); bfd_set_section_contents (abfd, id5, d5, 0, 4); bfd_set_section_contents (abfd, id4, d4, 0, 4); - + bfd_make_readable (abfd); return abfd; } @@ -1310,7 +1321,7 @@ make_tail (parent) id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2); id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2); id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2); - quick_symbol (abfd, U(""), dll_symname, "_iname", id7, BSF_GLOBAL, 0); + quick_symbol (abfd, U (""), dll_symname, "_iname", id7, BSF_GLOBAL, 0); bfd_set_section_size (abfd, id4, 4); d4 = (unsigned char *) xmalloc (4); @@ -1322,9 +1333,9 @@ make_tail (parent) id5->contents = d5; memset (d5, 0, 4); - len = strlen (dll_filename)+1; + len = strlen (dll_filename) + 1; if (len & 1) - len ++; + len++; bfd_set_section_size (abfd, id7, len); d7 = (unsigned char *) xmalloc (len); id7->contents = d7; @@ -1399,7 +1410,7 @@ make_one (exp, parent) bfd *parent; { asection *tx, *id7, *id5, *id4, *id6; - unsigned char *td, *d7, *d5, *d4, *d6 = NULL; + unsigned char *td = NULL, *d7, *d5, *d4, *d6 = NULL; int len; char *oname; bfd *abfd; @@ -1441,32 +1452,35 @@ make_one (exp, parent) id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2); id6 = quick_section (abfd, ".idata$6", SEC_HAS_CONTENTS, 2); if (! exp->flag_data) - quick_symbol (abfd, U(""), exp->internal_name, "", tx, BSF_GLOBAL, 0); - quick_symbol (abfd, U("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0); - quick_symbol (abfd, U("__imp_"), exp->internal_name, "", id5, BSF_GLOBAL, 0); + quick_symbol (abfd, U (""), exp->internal_name, "", tx, BSF_GLOBAL, 0); + quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0); + quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL, 0); if (pe_dll_compat_implib) - quick_symbol (abfd, U("__imp_"), exp->internal_name, "", - id5, BSF_GLOBAL, 0); + quick_symbol (abfd, U ("__imp_"), exp->internal_name, "", + id5, BSF_GLOBAL, 0); - bfd_set_section_size (abfd, tx, jmp_byte_count); - td = (unsigned char *) xmalloc (jmp_byte_count); - tx->contents = td; - memcpy (td, jmp_bytes, jmp_byte_count); - switch (pe_details->pe_arch) - { - case PE_ARCH_i386: - quick_reloc (abfd, 2, BFD_RELOC_32, 2); - break; - case PE_ARCH_sh: - quick_reloc (abfd, 8, BFD_RELOC_32, 2); - break; - case PE_ARCH_mips: - quick_reloc (abfd, 0, BFD_RELOC_HI16_S, 2); - quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */ - quick_reloc (abfd, 4, BFD_RELOC_LO16, 2); - break; - } - save_relocs (tx); + if (! exp->flag_data) + { + bfd_set_section_size (abfd, tx, jmp_byte_count); + td = (unsigned char *) xmalloc (jmp_byte_count); + tx->contents = td; + memcpy (td, jmp_bytes, jmp_byte_count); + switch (pe_details->pe_arch) + { + case PE_ARCH_i386: + quick_reloc (abfd, 2, BFD_RELOC_32, 2); + break; + case PE_ARCH_sh: + quick_reloc (abfd, 8, BFD_RELOC_32, 2); + break; + case PE_ARCH_mips: + quick_reloc (abfd, 0, BFD_RELOC_HI16_S, 2); + quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */ + quick_reloc (abfd, 4, BFD_RELOC_LO16, 2); + break; + } + save_relocs (tx); + } bfd_set_section_size (abfd, id7, 4); d7 = (unsigned char *) xmalloc (4); @@ -1497,9 +1511,9 @@ make_one (exp, parent) memset (d4, 0, 4); if (exp->flag_noname) { - d5[0] = exp->ordinal; - d5[1] = exp->ordinal >> 8; - d5[3] = 0x80; + d4[0] = exp->ordinal; + d4[1] = exp->ordinal >> 8; + d4[3] = 0x80; } else { @@ -1523,7 +1537,7 @@ make_one (exp, parent) memset (d6, 0, len); d6[0] = exp->hint & 0xff; d6[1] = exp->hint >> 8; - strcpy (d6+2, exp->name); + strcpy (d6 + 2, exp->name); } bfd_set_symtab (abfd, symtab, symptr); @@ -1552,7 +1566,7 @@ pe_dll_generate_implib (def, impfilename) dll_filename = (def->name) ? def->name : dll_name; dll_symname = xstrdup (dll_filename); - for (i=0; dll_symname[i]; i++) + for (i = 0; dll_symname[i]; i++) if (!isalnum ((unsigned char) dll_symname[i])) dll_symname[i] = '_'; @@ -1569,21 +1583,21 @@ pe_dll_generate_implib (def, impfilename) /* xgettext:c-format */ einfo (_("Creating library file: %s\n"), impfilename); - + bfd_set_format (outarch, bfd_archive); outarch->has_armap = 1; - /* Work out a reasonable size of things to put onto one line. */ + /* Work out a reasonable size of things to put onto one line. */ ar_head = make_head (outarch); - for (i = 0; i<def->num_exports; i++) + for (i = 0; i < def->num_exports; i++) { - /* The import library doesn't know about the internal name */ + /* The import library doesn't know about the internal name. */ char *internal = def->exports[i].internal_name; bfd *n; def->exports[i].internal_name = def->exports[i].name; - n = make_one (def->exports+i, outarch); + n = make_one (def->exports + i, outarch); n->next = head; head = n; def->exports[i].internal_name = internal; @@ -1594,7 +1608,7 @@ pe_dll_generate_implib (def, impfilename) if (ar_head == NULL || ar_tail == NULL) return; - /* Now stick them all into the archive */ + /* Now stick them all into the archive. */ ar_head->next = head; ar_tail->next = ar_head; @@ -1602,7 +1616,7 @@ pe_dll_generate_implib (def, impfilename) if (! bfd_set_archive_head (outarch, head)) einfo ("%Xbfd_set_archive_head: %s\n", bfd_errmsg (bfd_get_error ())); - + if (! bfd_close (outarch)) einfo ("%Xbfd_close %s: %s\n", impfilename, bfd_errmsg (bfd_get_error ())); @@ -1636,7 +1650,7 @@ pe_process_import_defs (output_bfd, link_info) struct bfd_link_info *link_info; { def_file_module *module; - pe_dll_id_target(bfd_get_target (output_bfd)); + pe_dll_id_target (bfd_get_target (output_bfd)); if (!pe_def_file) return; @@ -1647,28 +1661,35 @@ pe_process_import_defs (output_bfd, link_info) dll_filename = module->name; dll_symname = xstrdup (module->name); - for (i=0; dll_symname[i]; i++) + for (i = 0; dll_symname[i]; i++) if (!isalnum (dll_symname[i])) dll_symname[i] = '_'; do_this_dll = 0; - for (i=0; i<pe_def_file->num_imports; i++) + for (i = 0; i < pe_def_file->num_imports; i++) if (pe_def_file->imports[i].module == module) { def_file_export exp; struct bfd_link_hash_entry *blhe; - /* see if we need this import */ - char *name = (char *) xmalloc (strlen (pe_def_file->imports[i].internal_name) + 2); - sprintf (name, "%s%s", U(""), pe_def_file->imports[i].internal_name); + /* See if we need this import. */ + char *name = (char *) xmalloc (strlen (pe_def_file->imports[i].internal_name) + 2 + 6); + sprintf (name, "%s%s", U (""), pe_def_file->imports[i].internal_name); blhe = bfd_link_hash_lookup (link_info->hash, name, false, false, false); + if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined)) + { + sprintf (name, "%s%s", U ("_imp__"), + pe_def_file->imports[i].internal_name); + blhe = bfd_link_hash_lookup (link_info->hash, name, + false, false, false); + } free (name); if (blhe && blhe->type == bfd_link_hash_undefined) { bfd *one; - /* we do */ + /* We do. */ if (!do_this_dll) { bfd *ar_head = make_head (output_bfd); @@ -1713,7 +1734,7 @@ pe_get16 (abfd, where) unsigned char b[2]; bfd_seek (abfd, where, SEEK_SET); bfd_read (b, 1, 2, abfd); - return b[0] + (b[1]<<8); + return b[0] + (b[1] << 8); } static unsigned int @@ -1724,7 +1745,7 @@ pe_get32 (abfd, where) unsigned char b[4]; bfd_seek (abfd, where, SEEK_SET); bfd_read (b, 1, 4, abfd); - return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); + return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24); } #if 0 /* This is not currently used. */ @@ -1734,7 +1755,7 @@ pe_as16 (ptr) void *ptr; { unsigned char *b = ptr; - return b[0] + (b[1]<<8); + return b[0] + (b[1] << 8); } #endif @@ -1744,7 +1765,7 @@ pe_as32 (ptr) void *ptr; { unsigned char *b = ptr; - return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); + return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24); } boolean @@ -1759,7 +1780,7 @@ pe_implied_import_dll (filename) const char *dll_name; /* No, I can't use bfd here. kernel32.dll puts its export table in - the middle of the .rdata section. */ + the middle of the .rdata section. */ dll = bfd_openr (filename, pe_details->target_name); if (!dll) @@ -1767,7 +1788,7 @@ pe_implied_import_dll (filename) einfo ("%Xopen %s: %s\n", filename, bfd_errmsg (bfd_get_error ())); return false; } - /* PEI dlls seem to be bfd_objects */ + /* PEI dlls seem to be bfd_objects. */ if (!bfd_check_format (dll, bfd_object)) { einfo ("%X%s: this doesn't appear to be a DLL\n", filename); @@ -1775,7 +1796,7 @@ pe_implied_import_dll (filename) } dll_name = filename; - for (i=0; filename[i]; i++) + for (i = 0; filename[i]; i++) if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') dll_name = filename + i + 1; @@ -1790,16 +1811,16 @@ pe_implied_import_dll (filename) secptr = (pe_header_offset + 4 + 20 + pe_get16 (dll, pe_header_offset + 4 + 16)); expptr = 0; - for (i=0; i<nsections; i++) + for (i = 0; i < nsections; i++) { char sname[8]; unsigned long secptr1 = secptr + 40 * i; unsigned long vaddr = pe_get32 (dll, secptr1 + 12); unsigned long vsize = pe_get32 (dll, secptr1 + 16); unsigned long fptr = pe_get32 (dll, secptr1 + 20); - bfd_seek(dll, secptr1, SEEK_SET); - bfd_read(sname, 1, 8, dll); - if (vaddr <= export_rva && vaddr+vsize > export_rva) + bfd_seek (dll, secptr1, SEEK_SET); + bfd_read (sname, 1, 8, dll); + if (vaddr <= export_rva && vaddr + vsize > export_rva) { expptr = fptr + (export_rva - vaddr); if (export_rva + export_size > vaddr + vsize) @@ -1814,17 +1835,17 @@ pe_implied_import_dll (filename) erva = expdata - export_rva; if (pe_def_file == 0) - pe_def_file = def_file_empty(); + pe_def_file = def_file_empty (); - nexp = pe_as32 (expdata+24); - name_rvas = pe_as32 (expdata+32); - ordinals = pe_as32 (expdata+36); - ordbase = pe_as32 (expdata+16); - for (i=0; i<nexp; i++) + nexp = pe_as32 (expdata + 24); + name_rvas = pe_as32 (expdata + 32); + ordinals = pe_as32 (expdata + 36); + ordbase = pe_as32 (expdata + 16); + for (i = 0; i < nexp; i++) { - unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); + unsigned long name_rva = pe_as32 (erva + name_rvas + i * 4); def_file_import *imp; - imp = def_file_add_import (pe_def_file, erva+name_rva, dll_name, + imp = def_file_add_import (pe_def_file, erva + name_rva, dll_name, i, 0); } diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot index 6efdf65..584dca5 100644 --- a/contrib/binutils/ld/po/ld.pot +++ b/contrib/binutils/ld/po/ld.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-04-05 14:09+0930\n" +"POT-Creation-Date: 2000-12-26 12:54-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -14,253 +14,287 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -#: emultempl/armcoff.em:69 +#: emultempl/armcoff.em:70 msgid " --support-old-code Support interworking with old code\n" msgstr "" -#: emultempl/armcoff.em:70 +#: emultempl/armcoff.em:71 msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n" msgstr "" -#: emultempl/armcoff.em:139 +#: emultempl/armcoff.em:140 #, c-format msgid "Errors encountered processing file %s" msgstr "" -#: emultempl/armcoff.em:205 emultempl/pe.em:1035 +#: emultempl/armcoff.em:206 emultempl/pe.em:1211 msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n" msgstr "" -#: emultempl/armcoff.em:210 emultempl/pe.em:1040 +#: emultempl/armcoff.em:211 emultempl/pe.em:1216 msgid "%P: warning: connot find thumb start symbol %s\n" msgstr "" -#: emultempl/pe.em:257 +#: emultempl/pe.em:266 msgid "" " --base_file <basefile> Generate a base file for relocatable " "DLLs\n" msgstr "" -#: emultempl/pe.em:258 +#: emultempl/pe.em:267 msgid "" " --dll Set image base to the default for DLLs\n" msgstr "" -#: emultempl/pe.em:259 +#: emultempl/pe.em:268 msgid " --file-alignment <size> Set file alignment\n" msgstr "" -#: emultempl/pe.em:260 +#: emultempl/pe.em:269 msgid " --heap <size> Set initial size of the heap\n" msgstr "" -#: emultempl/pe.em:261 +#: emultempl/pe.em:270 msgid "" " --image-base <address> Set start address of the executable\n" msgstr "" -#: emultempl/pe.em:262 +#: emultempl/pe.em:271 msgid "" " --major-image-version <number> Set version number of the executable\n" msgstr "" -#: emultempl/pe.em:263 +#: emultempl/pe.em:272 msgid " --major-os-version <number> Set minimum required OS version\n" msgstr "" -#: emultempl/pe.em:264 +#: emultempl/pe.em:273 msgid "" " --major-subsystem-version <number> Set minimum required OS subsystem " "version\n" msgstr "" -#: emultempl/pe.em:265 +#: emultempl/pe.em:274 msgid "" " --minor-image-version <number> Set revision number of the executable\n" msgstr "" -#: emultempl/pe.em:266 +#: emultempl/pe.em:275 msgid " --minor-os-version <number> Set minimum required OS revision\n" msgstr "" -#: emultempl/pe.em:267 +#: emultempl/pe.em:276 msgid "" " --minor-subsystem-version <number> Set minimum required OS subsystem " "revision\n" msgstr "" -#: emultempl/pe.em:268 +#: emultempl/pe.em:277 msgid " --section-alignment <size> Set section alignment\n" msgstr "" -#: emultempl/pe.em:269 +#: emultempl/pe.em:278 msgid " --stack <size> Set size of the initial stack\n" msgstr "" -#: emultempl/pe.em:270 +#: emultempl/pe.em:279 msgid "" " --subsystem <name>[:<version>] Set required OS subsystem [& version]\n" msgstr "" -#: emultempl/pe.em:271 +#: emultempl/pe.em:280 msgid "" " --support-old-code Support interworking with old code\n" msgstr "" -#: emultempl/pe.em:272 +#: emultempl/pe.em:281 msgid "" " --thumb-entry=<symbol> Set the entry point to be Thumb " "<symbol>\n" msgstr "" -#: emultempl/pe.em:274 +#: emultempl/pe.em:283 msgid "" " --add-stdcall-alias Export symbols with and without @nn\n" msgstr "" -#: emultempl/pe.em:275 +#: emultempl/pe.em:284 msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n" msgstr "" -#: emultempl/pe.em:276 +#: emultempl/pe.em:285 msgid "" " --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n" msgstr "" -#: emultempl/pe.em:277 +#: emultempl/pe.em:286 msgid "" " --exclude-symbols sym,sym,... Exclude symbols from automatic export\n" msgstr "" -#: emultempl/pe.em:278 +#: emultempl/pe.em:287 msgid "" " --export-all-symbols Automatically export all globals to " "DLL\n" msgstr "" -#: emultempl/pe.em:279 +#: emultempl/pe.em:288 msgid " --kill-at Remove @nn from exported symbols\n" msgstr "" -#: emultempl/pe.em:280 +#: emultempl/pe.em:289 msgid " --out-implib <file> Generate import library\n" msgstr "" -#: emultempl/pe.em:281 +#: emultempl/pe.em:290 msgid "" " --output-def <file> Generate a .DEF file for the built DLL\n" msgstr "" -#: emultempl/pe.em:282 +#: emultempl/pe.em:291 msgid " --warn-duplicate-exports Warn about duplicate exports.\n" msgstr "" -#: emultempl/pe.em:283 +#: emultempl/pe.em:292 msgid "" " --compat-implib Create backward compatible import " "libs;\n" msgstr "" -#: emultempl/pe.em:284 +#: emultempl/pe.em:293 msgid " create __imp_<SYMBOL> as well.\n" msgstr "" -#: emultempl/pe.em:352 +#: emultempl/pe.em:294 +msgid "" +" --enable-auto-image-base Automatically choose image base for " +"DLLs\n" +msgstr "" + +#: emultempl/pe.em:295 +msgid " unless user specifies one\n" +msgstr "" + +#: emultempl/pe.em:296 +msgid "" +" --disable-auto-image-base Do not auto-choose image base. " +"(default)\n" +msgstr "" + +#: emultempl/pe.em:297 +msgid "" +" --dll-search-prefix=<string> When linking dynamically to a dll " +"witout an\n" +msgstr "" + +#: emultempl/pe.em:298 +msgid "" +" importlib, use <string><basename>.dll " +"\n" +msgstr "" + +#: emultempl/pe.em:299 +msgid "" +" in preference to lib<basename>.dll \n" +msgstr "" + +#: emultempl/pe.em:367 msgid "%P: warning: bad version number in -subsystem option\n" msgstr "" -#: emultempl/pe.em:388 +#: emultempl/pe.em:403 msgid "%P%F: invalid subsystem type %s\n" msgstr "" -#: emultempl/pe.em:403 +#: emultempl/pe.em:418 msgid "%P%F: invalid hex number for PE parameter '%s'\n" msgstr "" -#: emultempl/pe.em:421 +#: emultempl/pe.em:436 msgid "%P%F: strange hex info for PE parameter '%s'\n" msgstr "" -#: emultempl/pe.em:460 +#: emultempl/pe.em:475 #, c-format msgid "%s: Can't open base file %s\n" msgstr "" -#: emultempl/pe.em:602 +#: emultempl/pe.em:668 msgid "%P: warning, file alignment > section alignment.\n" msgstr "" -#: emultempl/pe.em:673 emultempl/pe.em:699 +#: emultempl/pe.em:739 emultempl/pe.em:765 #, c-format msgid "Warning: resolving %s by linking to %s\n" msgstr "" -#: emultempl/pe.em:678 emultempl/pe.em:704 +#: emultempl/pe.em:744 emultempl/pe.em:770 msgid "Use --enable-stdcall-fixup to disable these warnings\n" msgstr "" -#: emultempl/pe.em:679 emultempl/pe.em:705 +#: emultempl/pe.em:745 emultempl/pe.em:771 msgid "Use --disable-stdcall-fixup to disable these fixups\n" msgstr "" -#: emultempl/pe.em:722 +#: emultempl/pe.em:788 msgid "%F%P: PE operations on non PE file.\n" msgstr "" -#: emultempl/pe.em:839 +#: emultempl/pe.em:1015 #, c-format msgid "Errors encountered processing file %s\n" msgstr "" -#: emultempl/pe.em:862 +#: emultempl/pe.em:1038 #, c-format msgid "Errors encountered processing file %s for interworking" msgstr "" -#: emultempl/pe.em:918 ldlang.c:1961 ldlang.c:4333 ldlang.c:4367 ldmain.c:996 +#: emultempl/pe.em:1094 ldlang.c:1981 ldlang.c:4347 ldlang.c:4380 +#: ldmain.c:1016 msgid "%P%F: bfd_link_hash_lookup failed: %E\n" msgstr "" -#: ldcref.c:162 +#: ldcref.c:158 msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n" msgstr "" -#: ldcref.c:168 +#: ldcref.c:164 msgid "%X%P: cref_hash_lookup failed: %E\n" msgstr "" -#: ldcref.c:239 +#: ldcref.c:235 msgid "" "\n" "Cross Reference Table\n" "\n" msgstr "" -#: ldcref.c:240 +#: ldcref.c:236 msgid "Symbol" msgstr "" -#: ldcref.c:248 +#: ldcref.c:244 msgid "File\n" msgstr "" -#: ldcref.c:252 +#: ldcref.c:248 msgid "No symbols\n" msgstr "" -#: ldcref.c:369 +#: ldcref.c:364 msgid "%P: symbol `%T' missing from main hash table\n" msgstr "" -#: ldcref.c:441 +#: ldcref.c:435 msgid "%B%F: could not read symbols; %E\n" msgstr "" -#: ldcref.c:445 ldmain.c:1064 ldmain.c:1068 +#: ldcref.c:439 ldmain.c:1082 ldmain.c:1086 msgid "%B%F: could not read symbols: %E\n" msgstr "" -#: ldcref.c:517 ldcref.c:524 ldmain.c:1114 ldmain.c:1121 +#: ldcref.c:511 ldcref.c:518 ldmain.c:1132 ldmain.c:1139 msgid "%B%F: could not read relocs: %E\n" msgstr "" @@ -268,7 +302,7 @@ msgstr "" #. in OUTSECNAME. This reloc is from a section which is #. mapped into a section from which references to OUTSECNAME #. are prohibited. We must report an error. -#: ldcref.c:542 +#: ldcref.c:536 msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n" msgstr "" @@ -276,86 +310,86 @@ msgstr "" msgid "%P%X: Different relocs used in set %s\n" msgstr "" -#: ldctor.c:106 +#: ldctor.c:107 msgid "%P%X: Different object file formats composing set %s\n" msgstr "" -#: ldctor.c:288 ldctor.c:302 +#: ldctor.c:289 ldctor.c:303 msgid "%P%X: %s does not support reloc %s for set %s\n" msgstr "" -#: ldctor.c:323 +#: ldctor.c:324 msgid "%P%X: Unsupported size %d for set %s\n" msgstr "" -#: ldctor.c:344 +#: ldctor.c:345 msgid "" "\n" "Set Symbol\n" "\n" msgstr "" -#: ldemul.c:224 +#: ldemul.c:220 msgid "%S SYSLIB ignored\n" msgstr "" -#: ldemul.c:232 +#: ldemul.c:227 msgid "%S HLL ignored\n" msgstr "" -#: ldemul.c:253 +#: ldemul.c:248 msgid "%P: unrecognised emulation mode: %s\n" msgstr "" -#: ldemul.c:254 +#: ldemul.c:249 msgid "Supported emulations: " msgstr "" -#: ldemul.c:298 +#: ldemul.c:293 msgid " no emulation specific options.\n" msgstr "" -#: ldexp.c:157 +#: ldexp.c:154 msgid "%F%P: %s uses undefined section %s\n" msgstr "" -#: ldexp.c:159 +#: ldexp.c:156 msgid "%F%P: %s forward reference of section %s\n" msgstr "" -#: ldexp.c:271 +#: ldexp.c:268 msgid "%F%S %% by zero\n" msgstr "" -#: ldexp.c:278 +#: ldexp.c:275 msgid "%F%S / by zero\n" msgstr "" -#: ldexp.c:401 +#: ldexp.c:398 msgid "%X%S: unresolvable symbol `%s' referenced in expression\n" msgstr "" -#: ldexp.c:420 +#: ldexp.c:417 msgid "%F%S: undefined symbol `%s' referenced in expression\n" msgstr "" -#: ldexp.c:602 +#: ldexp.c:600 msgid "%F%S can not PROVIDE assignment to location counter\n" msgstr "" -#: ldexp.c:612 +#: ldexp.c:610 msgid "%F%S invalid assignment to location counter\n" msgstr "" -#: ldexp.c:616 +#: ldexp.c:614 msgid "%F%S assignment to location counter invalid outside of SECTION\n" msgstr "" -#: ldexp.c:626 +#: ldexp.c:624 msgid "%F%S cannot move location counter backwards (from %V to %V)\n" msgstr "" -#: ldexp.c:654 +#: ldexp.c:652 msgid "%P%F:%s: hash creation failed\n" msgstr "" @@ -367,55 +401,55 @@ msgstr "" msgid "%F%S non constant expression for %s\n" msgstr "" -#: ldfile.c:108 +#: ldfile.c:102 #, c-format msgid "attempt to open %s failed\n" msgstr "" -#: ldfile.c:110 +#: ldfile.c:104 #, c-format msgid "attempt to open %s succeeded\n" msgstr "" -#: ldfile.c:116 +#: ldfile.c:110 msgid "%F%P: invalid BFD target `%s'\n" msgstr "" -#: ldfile.c:140 -msgid "%P: skipping incompatible %s when searching for %s" +#: ldfile.c:134 +msgid "%P: skipping incompatible %s when searching for %s\n" msgstr "" -#: ldfile.c:232 +#: ldfile.c:226 msgid "%F%P: cannot open %s for %s: %E\n" msgstr "" -#: ldfile.c:235 +#: ldfile.c:229 msgid "%F%P: cannot open %s: %E\n" msgstr "" -#: ldfile.c:255 +#: ldfile.c:250 msgid "%F%P: cannot find %s\n" msgstr "" -#: ldfile.c:273 ldfile.c:288 +#: ldfile.c:269 ldfile.c:285 #, c-format msgid "cannot find script file %s\n" msgstr "" -#: ldfile.c:275 ldfile.c:290 +#: ldfile.c:271 ldfile.c:287 #, c-format msgid "opened script file %s\n" msgstr "" -#: ldfile.c:333 +#: ldfile.c:336 msgid "%P%F: cannot open linker script file %s: %E\n" msgstr "" -#: ldfile.c:374 +#: ldfile.c:373 msgid "%P%F: unknown architecture: %s\n" msgstr "" -#: ldfile.c:391 +#: ldfile.c:389 msgid "%P%F: target architecture respecified\n" msgstr "" @@ -461,162 +495,162 @@ msgstr "" msgid "%P%F: output format %s cannot represent section called %s\n" msgstr "" -#: ldlang.c:970 +#: ldlang.c:969 msgid "%P: %B: warning: ignoring duplicate section `%s'\n" msgstr "" -#: ldlang.c:973 +#: ldlang.c:972 msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n" msgstr "" -#: ldlang.c:987 +#: ldlang.c:986 msgid "%P: %B: warning: duplicate section `%s' has different size\n" msgstr "" -#: ldlang.c:1039 +#: ldlang.c:1037 msgid "%P%F: Failed to create hash table\n" msgstr "" -#: ldlang.c:1422 +#: ldlang.c:1427 msgid "%B: file not recognized: %E\n" msgstr "" -#: ldlang.c:1423 +#: ldlang.c:1428 msgid "%B: matching formats:" msgstr "" -#: ldlang.c:1430 +#: ldlang.c:1435 msgid "%F%B: file not recognized: %E\n" msgstr "" -#: ldlang.c:1483 +#: ldlang.c:1488 msgid "%F%B: object %B in archive is not object\n" msgstr "" -#: ldlang.c:1489 ldlang.c:1501 +#: ldlang.c:1494 ldlang.c:1506 msgid "%F%B: could not read symbols: %E\n" msgstr "" -#: ldlang.c:1747 +#: ldlang.c:1766 msgid "" "%P: warning: could not find any targets that match endianness requirement\n" msgstr "" -#: ldlang.c:1759 +#: ldlang.c:1779 msgid "%P%F: target %s not found\n" msgstr "" -#: ldlang.c:1761 +#: ldlang.c:1781 msgid "%P%F: cannot open output file %s: %E\n" msgstr "" -#: ldlang.c:1769 +#: ldlang.c:1791 msgid "%P%F:%s: can not make object file: %E\n" msgstr "" -#: ldlang.c:1773 +#: ldlang.c:1795 msgid "%P%F:%s: can not set architecture: %E\n" msgstr "" -#: ldlang.c:1777 +#: ldlang.c:1799 msgid "%P%F: can not create link hash table: %E\n" msgstr "" -#: ldlang.c:2084 +#: ldlang.c:2104 msgid " load address 0x%V" msgstr "" -#: ldlang.c:2214 +#: ldlang.c:2234 msgid "%W (size before relaxing)\n" msgstr "" -#: ldlang.c:2296 +#: ldlang.c:2316 #, c-format msgid "Address of section %s set to " msgstr "" -#: ldlang.c:2445 +#: ldlang.c:2465 #, c-format msgid "Fail with %d\n" msgstr "" -#: ldlang.c:2684 +#: ldlang.c:2703 msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n" msgstr "" -#: ldlang.c:2718 +#: ldlang.c:2737 msgid "%X%P: address 0x%v of %B section %s is not within region %s\n" msgstr "" -#: ldlang.c:2726 +#: ldlang.c:2745 msgid "%X%P: region %s is full (%B section %s)\n" msgstr "" -#: ldlang.c:2775 +#: ldlang.c:2794 msgid "%P%X: Internal error on COFF shared library section %s\n" msgstr "" -#: ldlang.c:2816 +#: ldlang.c:2835 msgid "%P: warning: no memory region specified for section `%s'\n" msgstr "" -#: ldlang.c:2829 +#: ldlang.c:2848 msgid "%P: warning: changing start of section %s by %u bytes\n" msgstr "" -#: ldlang.c:2843 +#: ldlang.c:2862 msgid "%F%S: non constant address expression for section %s\n" msgstr "" -#: ldlang.c:2907 +#: ldlang.c:2927 msgid "%X%P: use an absolute load address or a load memory region, not both\n" msgstr "" -#: ldlang.c:3020 +#: ldlang.c:3043 msgid "%P%F: can't relax section: %E\n" msgstr "" -#: ldlang.c:3185 +#: ldlang.c:3210 msgid "%F%P: invalid data statement\n" msgstr "" -#: ldlang.c:3222 +#: ldlang.c:3247 msgid "%F%P: invalid reloc statement\n" msgstr "" -#: ldlang.c:3358 +#: ldlang.c:3383 msgid "%P%F:%s: can't set start address\n" msgstr "" -#: ldlang.c:3371 ldlang.c:3388 +#: ldlang.c:3396 ldlang.c:3413 msgid "%P%F: can't set start address\n" msgstr "" -#: ldlang.c:3383 +#: ldlang.c:3408 msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n" msgstr "" -#: ldlang.c:3393 +#: ldlang.c:3418 msgid "%P: warning: cannot find entry symbol %s; not setting start address\n" msgstr "" -#: ldlang.c:3435 +#: ldlang.c:3460 msgid "" "%P: warning: %s architecture of input file `%B' is incompatible with %s " "output\n" msgstr "" -#: ldlang.c:3453 +#: ldlang.c:3478 msgid "%E%X: failed to merge target specific data of file %B\n" msgstr "" -#: ldlang.c:3540 +#: ldlang.c:3565 msgid "" "\n" "Allocating common symbols\n" msgstr "" -#: ldlang.c:3541 +#: ldlang.c:3566 msgid "" "Common symbol size file\n" "\n" @@ -625,43 +659,43 @@ msgstr "" #. This message happens when using the #. svr3.ifile linker script, so I have #. disabled it. -#: ldlang.c:3626 +#: ldlang.c:3648 msgid "%P: no [COMMON] command, defaulting to .bss\n" msgstr "" -#: ldlang.c:3686 +#: ldlang.c:3707 msgid "%P%F: invalid syntax in flags\n" msgstr "" -#: ldlang.c:4281 +#: ldlang.c:4296 msgid "%P%Fmultiple STARTUP files\n" msgstr "" -#: ldlang.c:4553 +#: ldlang.c:4566 msgid "%F%P: bfd_record_phdr failed: %E\n" msgstr "" -#: ldlang.c:4572 +#: ldlang.c:4585 msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n" msgstr "" -#: ldlang.c:4881 +#: ldlang.c:4893 msgid "%X%P: unknown language `%s' in version information\n" msgstr "" -#: ldlang.c:4930 +#: ldlang.c:4942 msgid "%X%P: duplicate version tag `%s'\n" msgstr "" -#: ldlang.c:4943 ldlang.c:4956 +#: ldlang.c:4955 ldlang.c:4968 msgid "%X%P: duplicate expression `%s' in version information\n" msgstr "" -#: ldlang.c:4993 +#: ldlang.c:5005 msgid "%X%P: unable to find version dependency `%s'\n" msgstr "" -#: ldlang.c:5015 +#: ldlang.c:5027 msgid "%X%P: unable to read .exports section contents" msgstr "" @@ -669,195 +703,199 @@ msgstr "" msgid "%X%P: can't set BFD default target to `%s': %E\n" msgstr "" -#: ldmain.c:262 +#: ldmain.c:268 msgid "%P%F: -r and --mpc860c0 may not be used together\n" msgstr "" -#: ldmain.c:264 +#: ldmain.c:270 msgid "%P%F: --relax and -r may not be used together\n" msgstr "" -#: ldmain.c:266 +#: ldmain.c:272 msgid "%P%F: -r and -shared may not be used together\n" msgstr "" -#: ldmain.c:295 +#: ldmain.c:301 msgid "using internal linker script:\n" msgstr "" -#: ldmain.c:314 +#: ldmain.c:320 msgid "%P%F: no input files\n" msgstr "" -#: ldmain.c:319 +#: ldmain.c:325 msgid "%P: mode %s\n" msgstr "" -#: ldmain.c:337 +#: ldmain.c:342 msgid "%P%F: cannot open map file %s: %E\n" msgstr "" -#: ldmain.c:383 +#: ldmain.c:389 msgid "%P: link errors found, deleting executable `%s'\n" msgstr "" -#: ldmain.c:394 +#: ldmain.c:400 msgid "%F%B: final close failed: %E\n" msgstr "" -#: ldmain.c:418 +#: ldmain.c:424 msgid "%X%P: unable to open for source of copy `%s'\n" msgstr "" -#: ldmain.c:420 +#: ldmain.c:426 msgid "%X%P: unable to open for destination of copy `%s'\n" msgstr "" -#: ldmain.c:426 +#: ldmain.c:432 msgid "%P: Error writing file `%s'\n" msgstr "" -#: ldmain.c:432 pe-dll.c:1082 +#: ldmain.c:438 pe-dll.c:1097 #, c-format msgid "%P: Error closing file `%s'\n" msgstr "" -#: ldmain.c:449 +#: ldmain.c:455 #, c-format msgid "%s: total time in link: %ld.%06ld\n" msgstr "" -#: ldmain.c:452 +#: ldmain.c:458 #, c-format msgid "%s: data size %ld\n" msgstr "" -#: ldmain.c:493 +#: ldmain.c:499 msgid "%P%F: missing argument to -m\n" msgstr "" -#: ldmain.c:607 ldmain.c:628 ldmain.c:659 +#: ldmain.c:624 ldmain.c:645 ldmain.c:676 msgid "%P%F: bfd_hash_table_init failed: %E\n" msgstr "" -#: ldmain.c:612 ldmain.c:631 +#: ldmain.c:629 ldmain.c:648 msgid "%P%F: bfd_hash_lookup failed: %E\n" msgstr "" -#: ldmain.c:646 +#: ldmain.c:663 msgid "%X%P: error: duplicate retain-symbols-file\n" msgstr "" -#: ldmain.c:690 +#: ldmain.c:707 msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n" msgstr "" -#: ldmain.c:695 +#: ldmain.c:712 msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n" msgstr "" -#: ldmain.c:772 +#: ldmain.c:788 msgid "Archive member included" msgstr "" -#: ldmain.c:773 +#: ldmain.c:789 msgid "because of file (symbol)" msgstr "" -#: ldmain.c:845 +#: ldmain.c:860 msgid "%X%C: multiple definition of `%T'\n" msgstr "" -#: ldmain.c:848 +#: ldmain.c:863 msgid "%D: first defined here\n" msgstr "" -#: ldmain.c:877 +#: ldmain.c:867 +msgid "%P: Disabling relaxation: it will not work with multiple definitions\n" +msgstr "" + +#: ldmain.c:898 msgid "%B: warning: definition of `%T' overriding common\n" msgstr "" -#: ldmain.c:880 +#: ldmain.c:901 msgid "%B: warning: common is here\n" msgstr "" -#: ldmain.c:887 +#: ldmain.c:908 msgid "%B: warning: common of `%T' overridden by definition\n" msgstr "" -#: ldmain.c:890 +#: ldmain.c:911 msgid "%B: warning: defined here\n" msgstr "" -#: ldmain.c:897 +#: ldmain.c:918 msgid "%B: warning: common of `%T' overridden by larger common\n" msgstr "" -#: ldmain.c:900 +#: ldmain.c:921 msgid "%B: warning: larger common is here\n" msgstr "" -#: ldmain.c:904 +#: ldmain.c:925 msgid "%B: warning: common of `%T' overriding smaller common\n" msgstr "" -#: ldmain.c:907 +#: ldmain.c:928 msgid "%B: warning: smaller common is here\n" msgstr "" -#: ldmain.c:911 +#: ldmain.c:932 msgid "%B: warning: multiple common of `%T'\n" msgstr "" -#: ldmain.c:913 +#: ldmain.c:934 msgid "%B: warning: previous common is here\n" msgstr "" -#: ldmain.c:935 ldmain.c:974 +#: ldmain.c:955 ldmain.c:994 msgid "%P: warning: global constructor %s used\n" msgstr "" -#: ldmain.c:984 +#: ldmain.c:1004 msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n" msgstr "" -#: ldmain.c:1171 +#: ldmain.c:1188 msgid "%F%P: bfd_hash_table_init failed: %E\n" msgstr "" -#: ldmain.c:1178 +#: ldmain.c:1195 msgid "%F%P: bfd_hash_lookup failed: %E\n" msgstr "" -#: ldmain.c:1198 +#: ldmain.c:1215 msgid "%C: undefined reference to `%T'\n" msgstr "" -#: ldmain.c:1204 +#: ldmain.c:1221 msgid "%D: more undefined references to `%T' follow\n" msgstr "" -#: ldmain.c:1211 +#: ldmain.c:1228 msgid "%B: undefined reference to `%T'\n" msgstr "" -#: ldmain.c:1217 +#: ldmain.c:1234 msgid "%B: more undefined references to `%T' follow\n" msgstr "" -#: ldmain.c:1238 ldmain.c:1260 ldmain.c:1280 +#: ldmain.c:1254 ldmain.c:1275 ldmain.c:1294 msgid "%P%X: generated" msgstr "" -#: ldmain.c:1241 +#: ldmain.c:1257 msgid " relocation truncated to fit: %s %T" msgstr "" -#: ldmain.c:1263 +#: ldmain.c:1278 #, c-format msgid "dangerous relocation: %s\n" msgstr "" -#: ldmain.c:1283 +#: ldmain.c:1297 msgid " reloc refers to symbol `%T' which is not being output\n" msgstr "" @@ -897,12 +935,12 @@ msgstr "" msgid "%P%F: please report this bug\n" msgstr "" -#: ldver.c:35 +#: ldver.c:39 #, c-format msgid "GNU ld version %s (with BFD %s)\n" msgstr "" -#: ldver.c:42 lexsup.c:887 +#: ldver.c:46 lexsup.c:961 msgid " Supported emulations:\n" msgstr "" @@ -910,593 +948,635 @@ msgstr "" msgid "%P%F: bfd_new_link_order failed\n" msgstr "" -#: ldwrite.c:365 +#: ldwrite.c:321 +msgid "%F%P: clone section failed: %E\n" +msgstr "" + +#: ldwrite.c:360 #, c-format msgid "%8x something else\n" msgstr "" -#: ldwrite.c:526 +#: ldwrite.c:543 msgid "%F%P: final link failed: %E\n" msgstr "" -#: lexsup.c:155 lexsup.c:238 lexsup.c:244 +#: lexsup.c:159 lexsup.c:250 msgid "KEYWORD" msgstr "" -#: lexsup.c:155 +#: lexsup.c:159 msgid "Shared library control for HP/UX compatibility" msgstr "" -#: lexsup.c:158 +#: lexsup.c:162 msgid "ARCH" msgstr "" -#: lexsup.c:158 +#: lexsup.c:162 msgid "Set architecture" msgstr "" -#: lexsup.c:160 lexsup.c:307 +#: lexsup.c:164 lexsup.c:315 msgid "TARGET" msgstr "" -#: lexsup.c:160 +#: lexsup.c:164 msgid "Specify target for following input files" msgstr "" -#: lexsup.c:162 lexsup.c:201 lexsup.c:211 lexsup.c:220 lexsup.c:291 -#: lexsup.c:314 lexsup.c:348 +#: lexsup.c:166 lexsup.c:205 lexsup.c:217 lexsup.c:226 lexsup.c:297 +#: lexsup.c:322 lexsup.c:360 msgid "FILE" msgstr "" -#: lexsup.c:162 +#: lexsup.c:166 msgid "Read MRI format linker script" msgstr "" -#: lexsup.c:164 +#: lexsup.c:168 msgid "Force common symbols to be defined" msgstr "" -#: lexsup.c:168 lexsup.c:338 lexsup.c:340 lexsup.c:342 +#: lexsup.c:172 lexsup.c:350 lexsup.c:352 lexsup.c:354 msgid "ADDRESS" msgstr "" -#: lexsup.c:168 +#: lexsup.c:172 msgid "Set start address" msgstr "" -#: lexsup.c:170 +#: lexsup.c:174 msgid "Export all dynamic symbols" msgstr "" -#: lexsup.c:172 +#: lexsup.c:176 msgid "Link big-endian objects" msgstr "" -#: lexsup.c:174 +#: lexsup.c:178 msgid "Link little-endian objects" msgstr "" -#: lexsup.c:176 lexsup.c:179 +#: lexsup.c:180 lexsup.c:183 msgid "SHLIB" msgstr "" -#: lexsup.c:176 +#: lexsup.c:180 msgid "Auxiliary filter for shared object symbol table" msgstr "" -#: lexsup.c:179 +#: lexsup.c:183 msgid "Filter for shared object symbol table" msgstr "" -#: lexsup.c:181 +#: lexsup.c:185 msgid "Ignored" msgstr "" -#: lexsup.c:183 +#: lexsup.c:187 msgid "SIZE" msgstr "" -#: lexsup.c:183 +#: lexsup.c:187 msgid "Small data size (if no size, same as --shared)" msgstr "" -#: lexsup.c:186 +#: lexsup.c:190 msgid "FILENAME" msgstr "" -#: lexsup.c:186 +#: lexsup.c:190 msgid "Set internal name of shared library" msgstr "" -#: lexsup.c:188 +#: lexsup.c:192 msgid "LIBNAME" msgstr "" -#: lexsup.c:188 +#: lexsup.c:192 msgid "Search for library LIBNAME" msgstr "" -#: lexsup.c:190 +#: lexsup.c:194 msgid "DIRECTORY" msgstr "" -#: lexsup.c:190 +#: lexsup.c:194 msgid "Add DIRECTORY to library search path" msgstr "" -#: lexsup.c:192 +#: lexsup.c:196 msgid "EMULATION" msgstr "" -#: lexsup.c:192 +#: lexsup.c:196 msgid "Set emulation" msgstr "" -#: lexsup.c:194 +#: lexsup.c:198 msgid "Print map file on standard output" msgstr "" -#: lexsup.c:196 +#: lexsup.c:200 msgid "Do not page align data" msgstr "" -#: lexsup.c:198 +#: lexsup.c:202 msgid "Do not page align data, do not make text readonly" msgstr "" -#: lexsup.c:201 +#: lexsup.c:205 msgid "Set output file name" msgstr "" -#: lexsup.c:203 +#: lexsup.c:207 msgid "Optimize output file" msgstr "" -#: lexsup.c:205 +#: lexsup.c:209 msgid "Ignored for SVR4 compatibility" msgstr "" -#: lexsup.c:207 +#: lexsup.c:213 msgid "Generate relocateable output" msgstr "" -#: lexsup.c:211 +#: lexsup.c:217 msgid "Just link symbols (if directory, same as --rpath)" msgstr "" -#: lexsup.c:214 +#: lexsup.c:220 msgid "Strip all symbols" msgstr "" -#: lexsup.c:216 +#: lexsup.c:222 msgid "Strip debugging symbols" msgstr "" -#: lexsup.c:218 +#: lexsup.c:224 msgid "Trace file opens" msgstr "" -#: lexsup.c:220 +#: lexsup.c:226 msgid "Read linker script" msgstr "" -#: lexsup.c:222 lexsup.c:234 lexsup.c:277 lexsup.c:289 lexsup.c:334 -#: lexsup.c:351 lexsup.c:368 +#: lexsup.c:228 lexsup.c:242 lexsup.c:283 lexsup.c:295 lexsup.c:344 +#: lexsup.c:363 lexsup.c:380 msgid "SYMBOL" msgstr "" -#: lexsup.c:222 +#: lexsup.c:228 msgid "Start with undefined reference to SYMBOL" msgstr "" -#: lexsup.c:224 +#: lexsup.c:230 +msgid "Don't merge orphan sections with the same name" +msgstr "" + +#: lexsup.c:232 msgid "Build global constructor/destructor tables" msgstr "" -#: lexsup.c:226 +#: lexsup.c:234 msgid "Print version information" msgstr "" -#: lexsup.c:228 +#: lexsup.c:236 msgid "Print version and emulation information" msgstr "" -#: lexsup.c:230 +#: lexsup.c:238 msgid "Discard all local symbols" msgstr "" -#: lexsup.c:232 +#: lexsup.c:240 msgid "Discard temporary local symbols" msgstr "" -#: lexsup.c:234 +#: lexsup.c:242 msgid "Trace mentions of SYMBOL" msgstr "" -#: lexsup.c:236 lexsup.c:316 lexsup.c:318 +#: lexsup.c:244 lexsup.c:324 lexsup.c:326 msgid "PATH" msgstr "" -#: lexsup.c:236 +#: lexsup.c:244 msgid "Default search path for Solaris compatibility" msgstr "" -#: lexsup.c:238 -msgid "Ignored for Solaris compatibility" -msgstr "" - -#: lexsup.c:240 +#: lexsup.c:246 msgid "Start a group" msgstr "" -#: lexsup.c:242 +#: lexsup.c:248 msgid "End a group" msgstr "" -#: lexsup.c:244 +#: lexsup.c:250 msgid "Ignored for SunOS compatibility" msgstr "" -#: lexsup.c:246 +#: lexsup.c:252 msgid "Link against shared libraries" msgstr "" -#: lexsup.c:252 +#: lexsup.c:258 msgid "Do not link against shared libraries" msgstr "" -#: lexsup.c:260 +#: lexsup.c:266 msgid "Bind global references locally" msgstr "" -#: lexsup.c:262 +#: lexsup.c:268 msgid "Check section addresses for overlaps (default)" msgstr "" -#: lexsup.c:264 +#: lexsup.c:270 msgid "Do not check section addresses for overlaps" msgstr "" -#: lexsup.c:267 +#: lexsup.c:273 msgid "Output cross reference table" msgstr "" -#: lexsup.c:269 +#: lexsup.c:275 msgid "SYMBOL=EXPRESSION" msgstr "" -#: lexsup.c:269 +#: lexsup.c:275 msgid "Define a symbol" msgstr "" -#: lexsup.c:271 -msgid "Demangle symbol names" +#: lexsup.c:277 +msgid "[=STYLE]" msgstr "" -#: lexsup.c:273 +#: lexsup.c:277 +msgid "Demangle symbol names [using STYLE]" +msgstr "" + +#: lexsup.c:279 msgid "PROGRAM" msgstr "" -#: lexsup.c:273 +#: lexsup.c:279 msgid "Set the dynamic linker to use" msgstr "" -#: lexsup.c:275 +#: lexsup.c:281 msgid "Generate embedded relocs" msgstr "" -#: lexsup.c:277 +#: lexsup.c:283 msgid "Call SYMBOL at unload-time" msgstr "" -#: lexsup.c:279 +#: lexsup.c:285 msgid "Force generation of file with .exe suffix" msgstr "" -#: lexsup.c:281 +#: lexsup.c:287 msgid "Remove unused sections (on some targets)" msgstr "" -#: lexsup.c:284 +#: lexsup.c:290 msgid "Don't remove unused sections (default)" msgstr "" -#: lexsup.c:287 +#: lexsup.c:293 msgid "Print option help" msgstr "" -#: lexsup.c:289 +#: lexsup.c:295 msgid "Call SYMBOL at load-time" msgstr "" -#: lexsup.c:291 +#: lexsup.c:297 msgid "Write a map file" msgstr "" -#: lexsup.c:293 +#: lexsup.c:299 msgid "Do not demangle symbol names" msgstr "" -#: lexsup.c:295 +#: lexsup.c:301 msgid "Use less memory and more disk I/O" msgstr "" -#: lexsup.c:297 +#: lexsup.c:303 msgid "Allow no undefined symbols" msgstr "" -#: lexsup.c:299 +#: lexsup.c:305 +msgid "Allow undefined symbols in shared objects" +msgstr "" + +#: lexsup.c:307 msgid "Don't warn about mismatched input files" msgstr "" -#: lexsup.c:301 +#: lexsup.c:309 msgid "Turn off --whole-archive" msgstr "" -#: lexsup.c:303 +#: lexsup.c:311 msgid "Create an output file even if errors occur" msgstr "" -#: lexsup.c:307 +#: lexsup.c:315 msgid "Specify target of output file" msgstr "" -#: lexsup.c:309 +#: lexsup.c:317 msgid "Ignored for Linux compatibility" msgstr "" -#: lexsup.c:311 +#: lexsup.c:319 msgid "Relax branches on certain targets" msgstr "" -#: lexsup.c:314 +#: lexsup.c:322 msgid "Keep only symbols listed in FILE" msgstr "" -#: lexsup.c:316 +#: lexsup.c:324 msgid "Set runtime shared library search path" msgstr "" -#: lexsup.c:318 +#: lexsup.c:326 msgid "Set link time shared library search path" msgstr "" -#: lexsup.c:320 +#: lexsup.c:328 msgid "Create a shared library" msgstr "" -#: lexsup.c:324 +#: lexsup.c:332 msgid "Sort common symbols by size" msgstr "" -#: lexsup.c:328 -msgid "Split output sections for each file" +#: lexsup.c:336 +msgid "[=SIZE]" msgstr "" -#: lexsup.c:330 -msgid "COUNT" +#: lexsup.c:336 +msgid "Split output sections every SIZE octets" msgstr "" -#: lexsup.c:330 +#: lexsup.c:338 +msgid "[=COUNT]" +msgstr "" + +#: lexsup.c:338 msgid "Split output sections every COUNT relocs" msgstr "" -#: lexsup.c:332 +#: lexsup.c:340 msgid "Print memory usage statistics" msgstr "" -#: lexsup.c:334 +#: lexsup.c:342 +msgid "Display target specific options" +msgstr "" + +#: lexsup.c:344 msgid "Do task level linking" msgstr "" -#: lexsup.c:336 +#: lexsup.c:346 msgid "Use same format as native linker" msgstr "" -#: lexsup.c:338 +#: lexsup.c:348 +msgid "SECTION=ADDRESS" +msgstr "" + +#: lexsup.c:348 +msgid "Set address of named section" +msgstr "" + +#: lexsup.c:350 msgid "Set address of .bss section" msgstr "" -#: lexsup.c:340 +#: lexsup.c:352 msgid "Set address of .data section" msgstr "" -#: lexsup.c:342 +#: lexsup.c:354 msgid "Set address of .text section" msgstr "" -#: lexsup.c:344 +#: lexsup.c:356 msgid "Output lots of information during link" msgstr "" -#: lexsup.c:348 +#: lexsup.c:360 msgid "Read version information script" msgstr "" -#: lexsup.c:351 +#: lexsup.c:363 msgid "" "Take export symbols list from .exports, using\n" "\t\t\t\tSYMBOL as the version." msgstr "" -#: lexsup.c:354 +#: lexsup.c:366 msgid "Warn about duplicate common symbols" msgstr "" -#: lexsup.c:356 +#: lexsup.c:368 msgid "Warn if global constructors/destructors are seen" msgstr "" -#: lexsup.c:359 +#: lexsup.c:371 msgid "Warn if the multiple GP values are used" msgstr "" -#: lexsup.c:361 +#: lexsup.c:373 msgid "Warn only once per undefined symbol" msgstr "" -#: lexsup.c:363 +#: lexsup.c:375 msgid "Warn if start of section changes due to alignment" msgstr "" -#: lexsup.c:366 +#: lexsup.c:378 msgid "Include all objects from following archives" msgstr "" -#: lexsup.c:368 +#: lexsup.c:380 msgid "Use wrapper functions for SYMBOL" msgstr "" -#: lexsup.c:370 +#: lexsup.c:382 msgid "[=WORDS]" msgstr "" -#: lexsup.c:370 +#: lexsup.c:382 msgid "" "Modify problematic branches in last WORDS (1-10,\n" "\t\t\t\tdefault 5) words of a page" msgstr "" -#: lexsup.c:520 +#: lexsup.c:532 #, c-format msgid "%s: use the --help option for usage information\n" msgstr "" -#: lexsup.c:540 +#: lexsup.c:552 msgid "%P%F: unrecognized -a option `%s'\n" msgstr "" -#: lexsup.c:553 +#: lexsup.c:565 msgid "%P%F: unrecognized -assert option `%s'\n" msgstr "" -#: lexsup.c:644 +#: lexsup.c:608 +msgid "%F%P: unknown demangling style `%s'" +msgstr "" + +#: lexsup.c:667 msgid "%P%F: invalid number `%s'\n" msgstr "" -#: lexsup.c:816 +#: lexsup.c:845 msgid "%P%F: -shared not supported\n" msgstr "" -#: lexsup.c:880 -msgid "Copyright 1997 Free Software Foundation, Inc.\n" +#: lexsup.c:879 +#, c-format +msgid "%s: Invalid argument to option \"--section-start\"\n" +msgstr "" + +#: lexsup.c:890 +#, c-format +msgid "%s: Missing argument(s) to option \"--section-start\"\n" +msgstr "" + +#: lexsup.c:954 +msgid "Copyright 2000 Free Software Foundation, Inc.\n" msgstr "" -#: lexsup.c:881 +#: lexsup.c:955 msgid "" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty.\n" msgstr "" -#: lexsup.c:972 +#: lexsup.c:1047 #, c-format msgid "%s: may not nest groups (--help for usage)\n" msgstr "" -#: lexsup.c:983 +#: lexsup.c:1058 #, c-format msgid "%s: group ended before it began (--help for usage)\n" msgstr "" -#: lexsup.c:1000 +#: lexsup.c:1075 #, c-format msgid "%s: Invalid argument to option \"mpc860c0\"\n" msgstr "" -#: lexsup.c:1056 +#: lexsup.c:1131 msgid "%P%F: invalid hex number `%s'\n" msgstr "" -#: lexsup.c:1068 +#: lexsup.c:1143 #, c-format msgid "Usage: %s [options] file...\n" msgstr "" -#: lexsup.c:1070 +#: lexsup.c:1145 msgid "Options:\n" msgstr "" #. Note: Various tools (such as libtool) depend upon the #. format of the listings below - do not change them. -#: lexsup.c:1149 +#: lexsup.c:1224 #, c-format msgid "%s: supported targets:" msgstr "" -#: lexsup.c:1157 +#: lexsup.c:1232 #, c-format msgid "%s: supported emulations: " msgstr "" -#: lexsup.c:1162 +#: lexsup.c:1237 #, c-format msgid "%s: emulation specific options:\n" msgstr "" -#: lexsup.c:1166 +#: lexsup.c:1241 #, c-format msgid "Report bugs to %s\n" msgstr "" -#: mri.c:343 +#: mri.c:321 msgid "%P%F: unknown format type %s\n" msgstr "" -#: pe-dll.c:144 +#: pe-dll.c:146 #, c-format msgid "%XUnsupported PEI architecture: %s\n" msgstr "" -#: pe-dll.c:377 +#: pe-dll.c:387 #, c-format -msgid "%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n" +msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n" msgstr "" -#: pe-dll.c:384 +#: pe-dll.c:394 #, c-format msgid "Warning, duplicate EXPORT: %s\n" msgstr "" -#: pe-dll.c:446 +#: pe-dll.c:456 #, c-format msgid "%XCannot export %s: symbol not defined\n" msgstr "" -#: pe-dll.c:452 +#: pe-dll.c:462 #, c-format msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n" msgstr "" -#: pe-dll.c:459 +#: pe-dll.c:469 #, c-format msgid "%XCannot export %s: symbol not found\n" msgstr "" -#: pe-dll.c:584 +#: pe-dll.c:594 #, c-format -msgid "%XError, oridinal used twice: %d (%s vs %s)\n" +msgid "%XError, ordinal used twice: %d (%s vs %s)\n" msgstr "" -#: pe-dll.c:831 +#: pe-dll.c:844 #, c-format msgid "%XError: %d-bit reloc in dll\n" msgstr "" -#: pe-dll.c:955 +#: pe-dll.c:970 #, c-format msgid "%s: Can't open output def file %s\n" msgstr "" -#: pe-dll.c:1077 +#: pe-dll.c:1092 msgid "; no contents available\n" msgstr "" -#: pe-dll.c:1566 +#: pe-dll.c:1580 #, c-format msgid "%XCan't open .lib file: %s\n" msgstr "" -#: pe-dll.c:1571 +#: pe-dll.c:1585 #, c-format msgid "Creating library file: %s\n" msgstr "" diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc index 6c4741b..3c1bfb4 100644 --- a/contrib/binutils/ld/scripttempl/elf.sc +++ b/contrib/binutils/ld/scripttempl/elf.sc @@ -21,6 +21,7 @@ # OTHER_BSS_SYMBOLS - symbols that appear at the start of the # .bss section besides __bss_start. # DATA_PLT - .plt should be in data segment, not text segment. +# BSS_PLT - .plt should be in bss segment # TEXT_DYNAMIC - .dynamic in text segment, not data segment. # EMBEDDED - whether this is for an embedded system. # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set @@ -36,6 +37,26 @@ # when specifying the start address of the next. # +# Many sections come in three flavours. There is the 'real' section, +# like ".data". Then there are the per-procedure or per-variable +# sections, generated by -ffunction-sections and -fdata-sections in GCC, +# and useful for --gc-sections, which for a variable "foo" might be +# ".data.foo". Then there are the linkonce sections, for which the linker +# eliminates duplicates, which are named like ".gnu.linkonce.d.foo". +# The exact correspondences are: +# +# Section Linkonce section +# .text .gnu.linkonce.t.foo +# .rodata .gnu.linkonce.r.foo +# .data .gnu.linkonce.d.foo +# .bss .gnu.linkonce.b.foo +# .sdata .gnu.linkonce.s.foo +# .sbss .gnu.linkonce.sb.foo +# .sdata2 .gnu.linkonce.s2.foo +# .sbss2 .gnu.linkonce.sb2.foo +# +# Each of these can also have corresponding .rel.* and .rela.* sections. + test -z "$ENTRY" && ENTRY=_start test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} @@ -46,7 +67,9 @@ test "$LD_FLAG" = "N" && DATA_ADDR=. INTERP=".interp ${RELOCATING-0} : { *(.interp) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }" DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" -RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} }" +RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }" +SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }" +SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }" CTOR=".ctors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${CTOR_START}} @@ -127,13 +150,13 @@ SECTIONS { *(.rel.text) ${RELOCATING+*(.rel.text.*)} - ${RELOCATING+*(.rel.gnu.linkonce.t*)} + ${RELOCATING+*(.rel.gnu.linkonce.t.*)} } .rela.text ${RELOCATING-0} : { *(.rela.text) ${RELOCATING+*(.rela.text.*)} - ${RELOCATING+*(.rela.gnu.linkonce.t*)} + ${RELOCATING+*(.rela.gnu.linkonce.t.*)} } .rel.fini ${RELOCATING-0} : { *(.rel.fini) } .rela.fini ${RELOCATING-0} : { *(.rela.fini) } @@ -141,26 +164,26 @@ SECTIONS { *(.rel.rodata) ${RELOCATING+*(.rel.rodata.*)} - ${RELOCATING+*(.rel.gnu.linkonce.r*)} + ${RELOCATING+*(.rel.gnu.linkonce.r.*)} } .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) ${RELOCATING+*(.rela.rodata.*)} - ${RELOCATING+*(.rela.gnu.linkonce.r*)} + ${RELOCATING+*(.rela.gnu.linkonce.r.*)} } ${OTHER_READONLY_RELOC_SECTIONS} .rel.data ${RELOCATING-0} : { *(.rel.data) ${RELOCATING+*(.rel.data.*)} - ${RELOCATING+*(.rel.gnu.linkonce.d*)} + ${RELOCATING+*(.rel.gnu.linkonce.d.*)} } .rela.data ${RELOCATING-0} : { *(.rela.data) ${RELOCATING+*(.rela.data.*)} - ${RELOCATING+*(.rela.gnu.linkonce.d*)} + ${RELOCATING+*(.rela.gnu.linkonce.d.*)} } .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } @@ -173,30 +196,74 @@ SECTIONS { *(.rel.sdata) ${RELOCATING+*(.rel.sdata.*)} - ${RELOCATING+*(.rel.gnu.linkonce.s*)} + ${RELOCATING+*(.rel.gnu.linkonce.s.*)} } .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) ${RELOCATING+*(.rela.sdata.*)} - ${RELOCATING+*(.rela.gnu.linkonce.s*)} + ${RELOCATING+*(.rela.gnu.linkonce.s.*)} + } + .rel.sbss ${RELOCATING-0} : + { + *(.rel.sbss) + ${RELOCATING+*(.rel.sbss.*)} + ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} + } + .rela.sbss ${RELOCATING-0} : + { + *(.rela.sbss) + ${RELOCATING+*(.rela.sbss.*)} + ${RELOCATING+*(.rel.gnu.linkonce.sb.*)} + } + .rel.sdata2 ${RELOCATING-0} : + { + *(.rel.sdata2) + ${RELOCATING+*(.rel.sdata2.*)} + ${RELOCATING+*(.rel.gnu.linkonce.s2.*)} + } + .rela.sdata2 ${RELOCATING-0} : + { + *(.rela.sdata2) + ${RELOCATING+*(.rela.sdata2.*)} + ${RELOCATING+*(.rela.gnu.linkonce.s2.*)} + } + .rel.sbss2 ${RELOCATING-0} : + { + *(.rel.sbss2) + ${RELOCATING+*(.rel.sbss2.*)} + ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)} + } + .rela.sbss2 ${RELOCATING-0} : + { + *(.rela.sbss2) + ${RELOCATING+*(.rela.sbss2.*)} + ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)} + } + .rel.bss ${RELOCATING-0} : + { + *(.rel.bss) + ${RELOCATING+*(.rel.bss.*)} + ${RELOCATING+*(.rel.gnu.linkonce.b.*)} + } + .rela.bss ${RELOCATING-0} : + { + *(.rela.bss) + ${RELOCATING+*(.rela.bss.*)} + ${RELOCATING+*(.rela.gnu.linkonce.b.*)} } - .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) } - .rel.bss ${RELOCATING-0} : { *(.rel.bss) } - .rela.bss ${RELOCATING-0} : { *(.rela.bss) } .rel.plt ${RELOCATING-0} : { *(.rel.plt) } .rela.plt ${RELOCATING-0} : { *(.rela.plt) } ${OTHER_PLT_RELOC_SECTIONS} .init ${RELOCATING-0} : { - ${INIT_START} + ${RELOCATING+${INIT_START}} KEEP (*(.init)) - ${INIT_END} + ${RELOCATING+${INIT_END}} } =${NOP-0} - ${DATA_PLT-${PLT}} + ${DATA_PLT-${BSS_PLT-${PLT}}} .text ${RELOCATING-0} : { ${RELOCATING+${TEXT_START_SYMBOLS}} @@ -205,19 +272,22 @@ SECTIONS *(.stub) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - ${RELOCATING+*(.gnu.linkonce.t*)} + ${RELOCATING+*(.gnu.linkonce.t.*)} ${RELOCATING+${OTHER_TEXT_SECTIONS}} } =${NOP-0} - ${RELOCATING+_etext = .;} - ${RELOCATING+PROVIDE (etext = .);} .fini ${RELOCATING-0} : { - ${FINI_START} + ${RELOCATING+${FINI_START}} KEEP (*(.fini)) - ${FINI_END} + ${RELOCATING+${FINI_END}} } =${NOP-0} + ${RELOCATING+PROVIDE (__etext = .);} + ${RELOCATING+PROVIDE (_etext = .);} + ${RELOCATING+PROVIDE (etext = .);} ${WRITABLE_RODATA-${RODATA}} .rodata1 ${RELOCATING-0} : { *(.rodata1) } + ${CREATE_SHLIB-${SDATA2}} + ${CREATE_SHLIB-${SBSS2}} ${RELOCATING+${OTHER_READONLY_SECTIONS}} /* Adjust the address for the data segment. We want to adjust up to @@ -230,7 +300,7 @@ SECTIONS ${RELOCATING+${DATA_START_SYMBOLS}} *(.data) ${RELOCATING+*(.data.*)} - ${RELOCATING+*(.gnu.linkonce.d*)} + ${RELOCATING+*(.gnu.linkonce.d.*)} ${CONSTRUCTING+SORT(CONSTRUCTORS)} } .data1 ${RELOCATING-0} : { *(.data1) } @@ -243,6 +313,8 @@ SECTIONS ${DATA_PLT+${PLT}} ${RELOCATING+${OTHER_GOT_SYMBOLS}} .got ${RELOCATING-0} : { *(.got.plt) *(.got) } + ${CREATE_SHLIB+${SDATA2}} + ${CREATE_SHLIB+${SBSS2}} ${TEXT_DYNAMIC-${DYNAMIC}} /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so @@ -261,16 +333,23 @@ SECTIONS ${RELOCATING+${OTHER_BSS_SYMBOLS}} .sbss ${RELOCATING-0} : { + ${RELOCATING+PROVIDE (__sbss_start = .);} + ${RELOCATING+PROVIDE (___sbss_start = .);} *(.dynsbss) *(.sbss) ${RELOCATING+*(.sbss.*)} + ${RELOCATING+*(.gnu.linkonce.sb.*)} *(.scommon) + ${RELOCATING+PROVIDE (__sbss_end = .);} + ${RELOCATING+PROVIDE (___sbss_end = .);} } + ${BSS_PLT+${PLT}} .bss ${RELOCATING-0} : { *(.dynbss) *(.bss) ${RELOCATING+*(.bss.*)} + ${RELOCATING+*(.gnu.linkonce.b.*)} *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the @@ -310,7 +389,7 @@ SECTIONS .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } diff --git a/contrib/binutils/ld/scripttempl/v850.sc b/contrib/binutils/ld/scripttempl/v850.sc index 0a20954..90731de 100644 --- a/contrib/binutils/ld/scripttempl/v850.sc +++ b/contrib/binutils/ld/scripttempl/v850.sc @@ -4,13 +4,13 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850", OUTPUT_ARCH(v850) ENTRY(_start) SEARCH_DIR(.); -/*/critters/slug/grossman/install/sun4/v850-elf/lib*/ SECTIONS { /* This saves a little space in the ELF file, since the zda starts at a higher location that the ELF headers take up. */ - .zdata ${ZDATA_START_ADDR} : { + .zdata ${ZDATA_START_ADDR} : + { *(.zdata) *(.zbss) *(reszdata) @@ -23,13 +23,14 @@ SECTIONS section. Specifically it prevents the zdata section from being marked READONLY. */ - .rozdata ${ROZDATA_START_ADDR} : { + .rozdata ${ROZDATA_START_ADDR} : + { *(.rozdata) *(romzdata) *(romzbss) } - /* Read-only sections, merged into text segment: */ + /* Read-only sections, merged into text segment. */ . = ${TEXT_START_ADDR}; .interp : { *(.interp) } .hash : { *(.hash) } @@ -58,9 +59,11 @@ SECTIONS .init : { KEEP (*(.init)) } =0 .plt : { *(.plt) } - .text : { + .text : + { *(.text) ${RELOCATING+*(.text.*)} + /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t*) @@ -73,45 +76,51 @@ SECTIONS It contains a small lookup table at the start followed by the code pointed to by entries in the lookup table. */ - .call_table_data ${CALL_TABLE_START_ADDR} : { + .call_table_data ${CALL_TABLE_START_ADDR} : + { ${RELOCATING+PROVIDE(__ctbp = .);} *(.call_table_data) - } = 0xff /* fill gaps with 0xff */ - .call_table_text : { + } = 0xff /* Fill gaps with 0xff. */ + + .call_table_text : + { *(.call_table_text) } - .fini : { KEEP (*(.fini)) } =0 + .fini : { KEEP (*(.fini)) } =0 .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) } .rodata1 : { *(.rodata1) } - .data : { + .data : + { *(.data) ${RELOCATING+*(.data.*)} *(.gnu.linkonce.d*) CONSTRUCTORS } .data1 : { *(.data1) } - .ctors : { - ${RELOCATING+___ctors = .;} + .ctors : + { + ${CONSTRUCTING+___ctors = .;} KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*crtend(.ctors)) - ${RELOCATING+___ctors_end = .;} + ${CONSTRUCTING+___ctors_end = .;} } - - .dtors : { - ${RELOCATING+___dtors = .;} + .dtors : + { + ${CONSTRUCTING+___dtors = .;} KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*crtend.o(.dtors)) - ${RELOCATING+___dtors_end = .;} + ${CONSTRUCTING+___dtors_end = .;} } .got : { *(.got.plt) *(.got) } .dynamic : { *(.dynamic) } - .tdata ${TDATA_START_ADDR} : { + .tdata ${TDATA_START_ADDR} : + { ${RELOCATING+PROVIDE (__ep = .);} *(.tbyte) *(.tcommon_byte) @@ -123,21 +132,26 @@ SECTIONS /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata ${SDATA_START_ADDR} : { + + .sdata ${SDATA_START_ADDR} : + { ${RELOCATING+PROVIDE (__gp = . + 0x8000);} *(.sdata) } /* See comment about .rozdata. */ - .rosdata ${ROSDATA_START_ADDR} : { + .rosdata ${ROSDATA_START_ADDR} : + { *(.rosdata) } /* We place the .sbss data section AFTER the .rosdata section, so that it can directly preceed the .bss section. This allows runtime startup code to initialise all the zero-data sections by simply taking the - value of '_edata' and zeroing until it reaches '_end' */ - .sbss : { + value of '_edata' and zeroing until it reaches '_end'. */ + + .sbss : + { ${RELOCATING+__sbss_start = .;} *(.sbss) *(.scommon) @@ -184,7 +198,7 @@ SECTIONS .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } @@ -192,17 +206,17 @@ SECTIONS .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ + /* SGI/MIPS DWARF 2 extensions. */ .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* User stack */ - .stack 0x200000 : { + /* User stack. */ + .stack 0x200000 : + { ${RELOCATING+__stack = .;} *(.stack) } - /* These must appear regardless of . */ } EOF diff --git a/contrib/binutils/ld/scripttempl/z8000.sc b/contrib/binutils/ld/scripttempl/z8000.sc index 2b87930..646c880 100644 --- a/contrib/binutils/ld/scripttempl/z8000.sc +++ b/contrib/binutils/ld/scripttempl/z8000.sc @@ -5,7 +5,8 @@ ENTRY(_start) SECTIONS { -.text ${BIG+ ${RELOCATING+ 0x0000000}} : { +.text ${BIG+ ${RELOCATING+ 0x0000000}} : + { *(.text) *(.strings) *(.rdata) @@ -13,38 +14,40 @@ SECTIONS .ctors ${BIG+ ${RELOCATING+ 0x2000000}} : { - ${RELOCATING+ ___ctors = . ; } + ${CONSTRUCTING+ ___ctors = . ; } *(.ctors); - ${RELOCATING+ ___ctors_end = . ; } + ${CONSTRUCTING+ ___ctors_end = . ; } ___dtors = . ; *(.dtors); - ${RELOCATING+ ___dtors_end = . ; } + ${CONSTRUCTING+ ___dtors_end = . ; } } -.data ${BIG+ ${RELOCATING+ 0x3000000}} : { - *(.data) +.data ${BIG+ ${RELOCATING+ 0x3000000}} : + { + *(.data) } .bss ${BIG+ ${RELOCATING+ 0x4000000}} : - { - ${RELOCATING+ __start_bss = . ; } - *(.bss); - *(COMMON); - ${RELOCATING+ __end_bss = . ; } - } - -.heap ${BIG+ ${RELOCATING+ 0x5000000}} : { - ${RELOCATING+ __start_heap = . ; } - ${RELOCATING+ . = . + 20k ; } - ${RELOCATING+ __end_heap = . ; } + { + ${RELOCATING+ __start_bss = . ; } + *(.bss); + *(COMMON); + ${RELOCATING+ __end_bss = . ; } + } + +.heap ${BIG+ ${RELOCATING+ 0x5000000}} : + { + ${RELOCATING+ __start_heap = . ; } + ${RELOCATING+ . = . + 20k ; } + ${RELOCATING+ __end_heap = . ; } } .stack ${RELOCATING+ 0xf000 } : { - ${RELOCATING+ _stack = . ; } - *(.stack) - ${RELOCATING+ __stack_top = . ; } - } + ${RELOCATING+ _stack = . ; } + *(.stack) + ${RELOCATING+ __stack_top = . ; } + } } EOF |