Commit Graph

1315 Commits

Author SHA1 Message Date
Ian Lance Taylor
55745b34b0 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.
1996-06-20 18:23:24 +00:00
Jeff Law
71415be57c * 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.
H8/S linker stuff.  Sanitized until status of this code is known.
1996-06-18 22:55:30 +00:00
Ian Lance Taylor
2e71dfc02c * configure.tgt (i[345]86*-*-isc*): New target. From
<uddeborg@carmen.se>.
1996-06-18 21:58:52 +00:00
Jim Wilson
f98286385f Kill r16/rce/acp stuff. 1996-06-08 03:52:13 +00:00
Jim Wilson
ed381b6719 Kill r16/rce/acp stuff. 1996-06-08 03:18:15 +00:00
Ian Lance Taylor
b72b1a0c52 * 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.
1996-06-07 15:29:36 +00:00
Ian Lance Taylor
1760b4aeab * 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.
1996-06-06 16:23:04 +00:00
Ian Lance Taylor
39e6bc339f * 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.
1996-06-06 16:07:23 +00:00
Ian Lance Taylor
07acd23b77 * 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.
1996-06-04 23:37:13 +00:00
Tom Tromey
2c7aeec634 * Makefile.in (install): Don't check to see if tooldir exists.
Make $(tooldir) and $(tooldir)/bin.
1996-06-04 22:16:01 +00:00
Ian Lance Taylor
e5ca07bfae * emultempl/pe.em (sort_sections): Don't assume that a
wild_statement has a section name.
1996-05-31 16:43:12 +00:00
Ian Lance Taylor
90557a6aea * scripttempl/elfmips.sc: Quote test -z argument. 1996-05-29 20:10:22 +00:00
Ian Lance Taylor
a1d393cfb9 * ld.texinfo: Clarify the CONSTRUCTORS command. 1996-05-29 17:14:24 +00:00
Ian Lance Taylor
64a37d3cfc * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize
file, not impfile.
PR 9759.
1996-05-23 23:09:44 +00:00
David Edelsohn
fe6e29571a * 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.
1996-05-22 19:09:32 +00:00
Stan Shebs
3d6ee1b961 * mpw-eppcmac.c: Update to reflect changes to aix.em. 1996-05-21 21:36:46 +00:00
David Edelsohn
4242ac27a5 * ldlang.c (dprint_statement): Stop printing at end of list. 1996-05-20 00:01:03 +00:00
Steve Chamberlain
de7c7482b1 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.
1996-05-18 20:28:30 +00:00
Jim Wilson
b3319029ac * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call. 1996-05-15 19:53:31 +00:00
Michael Meissner
fb2a7661fb Set __stack = 0 if it is referenced and not defined. 1996-05-10 20:32:07 +00:00
Rob Savoye
01d8a35928 * 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.
1996-05-09 15:56:58 +00:00
Jeff Law
00e6a1b14d * scripttempl/h8300.sc: Place ".tiny" sections right
after ".data" sections.
        * scripttempl/h8300h.sc: Place ".tiny" sections into
        the "tiny" memory region, 0xff8000 through 0xffff00.
HMSE.
1996-05-07 21:26:58 +00:00
Jeff Law
12688490b2 * scripttempl/h8300.sc: Set the entry point to the value of
"_start" rather than the start of the text segment.
        * scripttempl/h8300h.sc: Likewise.
So we can have data at the start of the text space.
1996-05-07 19:36:38 +00:00
David Edelsohn
67afbceace Document semicolon usage. 1996-05-07 18:29:22 +00:00
David Edelsohn
7248b4e2d2 * 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.
1996-05-07 18:04:07 +00:00
David Edelsohn
a1613b5f35 * 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.
1996-05-07 17:58:43 +00:00
Jeff Law
d38d6b7a85 * scripttempl (h8300.sc, h8300h.sc): Place .rodata sections
before .text sections in main ram.
Gets "read only" data out of the instruction stream -- improves
relaxing linker.  HMSE.
1996-05-07 17:33:17 +00:00
Jeff Law
4015337ec7 * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the
8-bit region and 8-bit sections.
HMSE.
1996-05-07 05:30:14 +00:00
David Edelsohn
0a0d1bdd6e * ldlang.c (section_already_linked): Fix typos. 1996-05-02 00:51:15 +00:00
David Edelsohn
f2618f8252 * scripttempl/pe.sc (.endjunk): Define __end__. 1996-04-30 03:33:23 +00:00
Ian Lance Taylor
0cacbcbe6e * 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.
1996-04-29 21:12:49 +00:00
Ian Lance Taylor
ec7d9f3d3c Mon Apr 29 10:33:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* ld-shared/shared.exp: Run the shared library tests on
 	Linux/m68k.
1996-04-29 14:34:44 +00:00
Ian Lance Taylor
df872c9ea4 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.
1996-04-29 14:34:14 +00:00
Ian Lance Taylor
efa6c49704 * 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.
1996-04-26 22:15:10 +00:00
Ian Lance Taylor
f0f80b13f8 * ldmisc.c (vfinfo): Reindent. 1996-04-26 18:42:55 +00:00
Ian Lance Taylor
6799c638e5 * 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.
1996-04-22 21:32:58 +00:00
Ian Lance Taylor
6429ad7e58 * ldlang.c (wild_doit): Discard debugging sections if we are
stripping debugging information.
1996-04-22 16:22:52 +00:00
Ian Lance Taylor
14706a96af * emulparams/z8002.sh (ARCH): Set to z8002, not z8k. 1996-04-22 16:08:18 +00:00
Ian Lance Taylor
e3e69b1328 * ldexp.c (fold_binary): Correct handling of subtraction with
absolute values.
	(fold_name): Permit symbols in lang_allocating_phase_enum.
1996-04-16 20:53:55 +00:00
Michael Meissner
56074c5569 Add Solaris/linux support 1996-04-16 14:48:02 +00:00
Rob Savoye
10533b5b48 * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it
in m68k/crt0.S without things blowing up.
1996-04-15 20:53:00 +00:00
Rob Savoye
07f48792d2 * scripttempl/m68kcoff.sc: Remove default address for .data so
.text, .data, and .bss are all sequential.
1996-04-12 22:47:01 +00:00
Ian Lance Taylor
aa59d90e55 * scripttempl/m68kcoff.sc: Remove regions and simplify. 1996-04-11 16:07:40 +00:00
Jeff Law
d26c498b31 * 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.
8-bit area changes for hmse.
1996-04-10 20:40:24 +00:00
David Edelsohn
b279f82e00 * emultempl/generic.em (gld${EMULATION_NAME}_before_parse):
Pass $ARCH to ldfile_set_output_arch instead of setting
	ldfile_output_architecture directly.
1996-04-09 21:11:51 +00:00
Ian Lance Taylor
517a7cafec * ld.texinfo: Rearrange option documentation. 1996-04-09 20:36:27 +00:00
Ian Lance Taylor
bf7198b36c tweak last change 1996-04-09 19:30:06 +00:00
Ian Lance Taylor
1ffec9e606 * 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.
1996-04-09 19:20:04 +00:00
Michael Meissner
28ad0357c6 Put .init/.fini in correct places. 1996-04-09 18:23:54 +00:00
Ian Lance Taylor
7ec9d82515 * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic. 1996-04-09 16:19:51 +00:00