Commit Graph

1144 Commits

Author SHA1 Message Date
Kim Knuttila
b2306582e3 added PowerPC PE targetting stuff 1995-11-07 22:20:00 +00:00
Kim Knuttila
070eddd986 New PowerPC Portable Executable stuff 1995-11-07 22:14:23 +00:00
Ian Lance Taylor
e2ce2da872 * ld.texinfo: The linker does not use _main as an entry point. 1995-11-07 16:48:29 +00:00
Ian Lance Taylor
36b72df3de 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.
1995-11-07 16:47:19 +00:00
Ian Lance Taylor
92c71a0b0d * 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.
1995-11-06 20:59:44 +00:00
Ian Lance Taylor
219555a64d * ld-empic/empic.exp: Accept a . in the address symbol. 1995-11-06 20:24:57 +00:00
Ian Lance Taylor
1bc9204d5b * ld-shared/shared.exp: Run tests on rs6000*-*-aix* and
powerpc*-*-aix*.  Add code to create appropriate exports files,
	and pass appropriate compilation flags, and test against
	appropriate expected output.
	* ld-shared/xcoff.dat: New file.
	* ld-shared/main.c: Put #ifndef XCOFF_TEST around tests that can
	not be linked using XCOFF.  Use shlib_shlibvar1 as a sample
	function pointer, rather than shlib_mainvar.
	* ld-shared/sh1.c: Likewise.
	* ld-shared/shared.dat: Update for change from using shlib_mainvar
	to using shlib_shlibvar1.
	* ld-shared/sun4.dat: Likewise.
1995-11-06 19:44:43 +00:00
Ian Lance Taylor
7ae3065c8f * lexsup.c (parse_args): Take B:: out of shortopts. 1995-11-06 16:00:00 +00:00
Ken Raeburn
bd329d41ca some i386-netbsd cleanup 1995-11-05 10:14:28 +00:00
Ian Lance Taylor
92188bd2d6 use motorola-sysv*, not sysv3* 1995-11-03 20:10:50 +00:00
Ian Lance Taylor
6398299816 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-sysv3*): New target.
	* emulparams/delta68.sh: New file.
	* scripttempl/delta68.sc: New file.

	* scripttempl/m88kbcs.sc: Handle .init and .fini.  Change section
	addresses.
1995-11-01 20:52:10 +00:00
Ian Lance Taylor
ef51e36abc * ldgram.y (mri_script_command): Accept ',' as well as '=' in
ALIGN and ALIGNMOD statements.
1995-11-01 17:31:58 +00:00
Ian Lance Taylor
2a80ec10a8 * 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.
1995-11-01 16:46:19 +00:00
Ian Lance Taylor
02a5d23525 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.
1995-10-31 23:23:48 +00:00
Ian Lance Taylor
d29120d2ff really make import_file static 1995-10-31 20:28:25 +00:00
Ian Lance Taylor
5666490bee * 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.
1995-10-31 17:39:55 +00:00
Ken Raeburn
e295a90d12 keep files added by Niklas Hallqvist 1995-10-31 07:43:58 +00:00
Steve Chamberlain
2543860d19 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.
1995-10-28 07:26:10 +00:00
Ian Lance Taylor
9145928587 * ld-scripts/script.t: Put .pr in .text, and .rw in .data, for
convenience when testing XCOFF.
1995-10-28 05:55:00 +00:00
Niklas Hallqvist
d0ae7d95f7 * 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,rce,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.
1995-10-28 01:40:02 +00:00
Ian Lance Taylor
cf79773cb1 * 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.
1995-10-27 22:21:43 +00:00
Stan Shebs
aacc02d70f Reflect updates to Mac support 1995-10-27 05:30:14 +00:00
Stan Shebs
49af8a4ec7 * 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.
1995-10-27 05:28:17 +00:00
Ian Lance Taylor
27b4433688 * ld-bootstrap/bootstrap.exp: On AIX, pass -bI/lib/syscalls.exp
along with --static.
1995-10-27 03:30:15 +00:00
Ian Lance Taylor
b18896d9bd * ld-scripts/script.s: Make symbols global. 1995-10-27 02:53:47 +00:00
Ian Lance Taylor
c7c8b500b9 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat
-static as a synonym for -bnso.
1995-10-27 01:59:30 +00:00
Ian Lance Taylor
328e5a48e8 * scripttempl/aix.sc: Move special symbols inside sections.
Always start .data at 0.
1995-10-26 18:12:41 +00:00
Ken Raeburn
b008b7bf76 updated for jsmith's file renaming 1995-10-25 22:07:38 +00:00
Per Bothner
8a8965f1c0 * Makefile.in (diststuff): Also make info.
(maintainer-clean realclean):  Also delete *.info*.
1995-10-25 18:51:37 +00:00
Ian Lance Taylor
585c92fe44 add OUTPUT_FORMAT and LIB_SEARCH_DIRS 1995-10-25 17:51:13 +00:00
Ian Lance Taylor
1764521ffe tweak option handling 1995-10-25 17:37:35 +00:00
Ian Lance Taylor
57fc1e90b7 * 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.
1995-10-25 15:49:27 +00:00
Ian Lance Taylor
7d6439d974 * 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.
1995-10-25 15:48:53 +00:00
Ian Lance Taylor
e54bf1c1a4 * ld.texinfo: The MRI ALIGN directive is supported. 1995-10-25 15:28:28 +00:00
Jackie Smith Cashion
bef5440479 Renamed the VR4300 specific emulparams files to 8.3 unique names,
since the old names could cause problems when hosting the source tree
on non-Un*x systems.
1995-10-23 11:56:50 +00:00
Ian Lance Taylor
5e8e7e6680 * ldlex.l: Treat PROVIDE as a keyword in expression state. 1995-10-19 21:42:41 +00:00
Steve Chamberlain
9c284f3f98 * scripttempl/pe.sc (.bss): Move to be after .text 1995-10-19 00:35:37 +00:00
Ian Lance Taylor
5df68a88c4 * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment):
Search trinary.cond rather than searching trinary.lhs twice.  From
	linli@ihp.PHys.ethz.CH.
1995-10-17 22:38:50 +00:00
Ian Lance Taylor
235c6a672f * 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.
1995-10-17 22:36:25 +00:00
Ian Lance Taylor
03165292c0 * 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.
1995-10-17 16:23:59 +00:00
Ian Lance Taylor
b5f076d4aa * 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.
1995-10-16 23:19:04 +00:00
Ian Lance Taylor
091824ebcd * ldlang.c (lang_finish): Don't try to use an entry_symbol from a
section which was not linked into the final output.
PR 8172.
1995-10-10 21:54:24 +00:00
Steve Chamberlain
ef1d2d2ebf * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix
fatal typos.
1995-10-10 17:21:18 +00:00
Ian Lance Taylor
5caef232bd * 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.
1995-10-10 05:05:18 +00:00
Ian Lance Taylor
776f259038 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
bother searching for needed libraries unless doing a final link.
1995-10-07 21:09:57 +00:00
Ken Raeburn
8016553585 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* ld/ld.1: Fix formatting bugs.
1995-10-06 20:46:02 +00:00
Ian Lance Taylor
f054ce204a * 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.
PR 8142.
1995-10-04 21:39:29 +00:00
Ian Lance Taylor
8055e7a883 * 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.
1995-10-02 17:59:14 +00:00
Ian Lance Taylor
0b0642d6eb * 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.
1995-09-29 22:37:36 +00:00
Ian Lance Taylor
dd16b6557e * 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.
1995-09-29 15:33:29 +00:00