Commit graph

19570 commits

Author SHA1 Message Date
Ian Lance Taylor
a90f6864be * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
file, not aoutsz bytes (they are different in XCOFF .o files).
1997-06-24 15:22:35 +00:00
Ian Lance Taylor
862eaedc1a comment fix 1997-06-24 14:34:47 +00:00
Ian Lance Taylor
541a4b5425 * elflink.h (elf_merge_symbol): In the case of a new defined
symbol overriding an old defined symbol, return the hash table
	entry which we modify, even if it is the target of an
	indirection.
	(elf_link_add_object_symbols): If the real name of the symbol gets
	overridden, convert the versioned symbol into an indirect symbol
	to the real symbol.
1997-06-24 02:28:03 +00:00
Ian Lance Taylor
044d7d4944 * elflink.h (elf_merge_symbol): New static function, broken out of
elf_link_add_object_symbols.
	(elf_link_add_object_symbols): Call it.
1997-06-23 22:06:29 +00:00
Jeff Law
5b1875c694 Remove CYGNUS LOCAL markers for mn10200. 1997-06-23 17:56:05 +00:00
Ian Lance Taylor
e4486bdf9f Another windres snapshot. Can now read the COFF resources directory,
although it doesn't yet parse out the binary format.
1997-06-23 00:08:54 +00:00
Ian Lance Taylor
3ce6d9410c * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
handle case where COFF filehdr does not immediately follow PE
	header.
	* coffgen.c (coff_object_p): Remove useless seek to current
	location.
1997-06-22 23:41:55 +00:00
Ian Lance Taylor
1d371d35ee First stab at Windows resource compiler:
* windres.h: New file.
	* windres.c: New file.
	* resrc.c: New file.
	* rcparse.y: New file.
	* rclex.l: New file.
	* configure.in: Define and substitute BUILD_WINDRES.
	* configure: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(WINDRES_PROG): New variable.
	(PROGS): Add @BUILD_WINDRES@.
	(HFILES): Add dlltool.h and windres.h.
	(CFILES): Add windres.c and resrc.c.
	(GENERATED_CFILES): Add rcparse.c and rclex.c.
	(WINDRES_OBJS): New variable.
	$(WINDRES_PROG): New target.
	(rcparse.c, rcparse.h, rclex.c): New targets.
Snapshot.  windres can parse and print rc files.
1997-06-22 21:35:35 +00:00
Fred Fish
677a92a07d Fix a "ninemoons" email address that slipped in. 1997-06-22 16:40:16 +00:00
Fred Fish
7c0cb2b726 Fix one of my "ninemoons" email addresses that slipped in. 1997-06-22 16:32:18 +00:00
Fred Fish
41438a392a * gdb.base/printcmds.exp: Fix "check for floating addition"
regexp to accept results within approx +/- .01 of exact value.
	* lib/gdb.exp (gdb_test): Remove unused expect_out global decl.
1997-06-22 16:17:49 +00:00
Fred Fish
4a9d4495eb * sh-tdep.c (sh_skip_prologue): Also recognize fmov insns.
(sh_frame_find_saved_regs): Recognize fmov insns and adjust
	stack push count accordingly.
	* sh-tdep.c (IS_FMOV, FPSCR_SZ): New defines
1997-06-21 03:50:11 +00:00
Fred Fish
73bb488673 Sanitize away sh4 stuff for now. 1997-06-21 03:48:48 +00:00
Fred Fish
b25b1c62b0 Minor formatting change (whitespace only). 1997-06-21 03:42:10 +00:00
Brendan Kehoe
c80c4a58df * configure.in: Don't set ENABLE_MULTILIB, so we'll be passing
--enable-multilib down to subdirs; setting TARGET_SUBDIR was enough.
1997-06-19 21:17:20 +00:00
Mark Alexander
9b91bc2295 * utils.c (floatformat_from_doublest): Improve test for infinity. 1997-06-19 15:18:13 +00:00
Bob Manson
283e535d3f (gdb_expect): Add optional timeout parameter, and add timeout
value to various calls.
	(gdb_suppress_tests): Only give one warning message per group.
1997-06-19 04:36:04 +00:00
Ian Lance Taylor
ba0e3b78dc * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
REFC.
1997-06-18 23:04:29 +00:00
Ian Lance Taylor
c4badc83ec revert last patch 1997-06-18 23:02:58 +00:00
Fred Fish
705ebd9239 * dwarfread.c (isreg, optimized_out, offreg, basereg): Move
global variables into the struct dieinfo structure.
	(locval): Pass pointer to a dieinfo struct rather than a
	pointer to the raw location information.  Change prototype.
	Set isreg, optimized_out, offreg and basereg as appropriate.
	(struct_type): Call locval with dieinfo struct pointer.
	(new_symbol): Ditto.
	(new_symbol): Call locval and save location before testing
	the values of the new dieinfo struct flags, set by locval.
1997-06-18 21:38:57 +00:00
Bob Manson
585a4b7b35 * lib/gdb.exp(gdb_init): Pass our arguments to default_gdb_init
properly.
1997-06-18 18:13:19 +00:00
Ian Lance Taylor
c68867051c * elflink.h (elf_link_add_object_symbols): Don't let a common
symbol in a regular object override a common symbol in a shared
	object if the latter was found via an indirect symbol.
1997-06-18 15:36:33 +00:00
Bob Manson
66e38fb282 lib/gdb.exp(gdb_expect): Handle getting a value for $timeout
more gracefully.
1997-06-18 05:10:11 +00:00
Brendan Kehoe
3c4e3186a4 * configure.in (is_cross_compiler): If we're building
mips-sgi-irix6* native, turn on ENABLE_MULTILIB and set TARGET_SUBDIR.

forces it to build libiberty w/ the newly built compiler, solving the
n32 vs o32 problem doing the tests
1997-06-17 22:31:59 +00:00
Ian Lance Taylor
3d116ccd46 * sparc-opc.c: The fcmp v9a instructions take an integer register
as a destination, not a floating point register.  From Christian
	Kuehnke <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE>.
1997-06-17 21:03:18 +00:00
Peter Schauer
b682323727 * procfs.c (proc_set_exec_trap, procfs_init_inferior, procfs_wait,
unconditionally_kill_inferior):  Undo Oct 26 1996 and Apr 26 1997
	changes to trace PRFS_STOPTERM and handle PR_DEAD.
	These changes tried to work around a problem with an early DU 4.0
	release, but they trigger subtle timing dependent kernel bugs
	in older OSF/1 releases.
1997-06-17 20:33:18 +00:00
Bob Manson
17b59a7407 * lib/gdb.exp(gdb_expect): Declare errorInfo and errorCode
as global variables.
1997-06-17 20:11:04 +00:00
Tom Tromey
0195767eaf * Makefile.in (all-sn): Depend on all-grep. 1997-06-17 18:27:02 +00:00
Ian Lance Taylor
ac44b2b9c7 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
symbols, skip N_ABS symbols with debugging storage classes.
PR 12630.
Also a couple of warning and formatting fixes.
1997-06-17 15:56:09 +00:00
Fred Fish
015e113cfe * dwarfread.c (new_symbol): Use SYMBOL_VALUE_ADDRESS, instead of
SYMBOL_VALUE, to set the value of LOC_STATIC symbols.
1997-06-17 14:01:37 +00:00
Mark Alexander
f781fe93a6 * infrun.c (wait_for_inferior): Mark registers as invalid when
stepping over an instruction that triggered a watchpoint.
	* remote-mips.c: Numerous changes to support hardware breakpoints
	and watchpoints on LSI MiniRISC and TinyRISC boards.
	* mips-tdep.c: Move MIPS16-related macros to config/mips/tm-mips.h.
	(mips_breakpoint_from_pc): Account for different breakpoint
	instructions used by PMON and IDT monitor.
	* config/mips/tm-embed.h: Enable hardware breakpoints on embedded
	MIPS targets.
	* config/mips/tm-mips.h: Define breakpoint instructions for
	PMON and IDT monitor.  Move MIPS16-related macros here from
	mips-tdep.c.
1997-06-17 02:11:42 +00:00
Bob Manson
77f3ac77b5 * lib/gdb.exp: Close connection to remote host if gdb doesn't
initialize.
	(default_gdb_init): New procedure; allow gdb_init to be overridden
 	by a target configuration file.
	(gdb_expect): Pass the timeout to remote_expect.

	* config/dos.exp(dos_wait): Add timeout parameter.

	* lib/remote.exp(remote_expect): Add timeout parameter.
	(remote_wait): Ditto.
	(standard_wait): Ditto. Also give up if the program outputs
	more than 512,000 bytes.

	* config/vxworks.exp: Use timeout parameter instead of setting
	timeout variable.
	* config/dos.exp: Ditto.
	* config/ddb.exp: Ditto.
	* lib/mondfe.exp: Ditto.
	* lib/rlogin.exp: Ditto.
	* lib/telnet.exp: Ditto.
	* config/base68k.exp: Ditto.
	* config/i386-bozo.exp: Ditto.
	* config/gdb-comm.exp: Ditto.
	* config/gdb_stub.exp: Ditto.
	* config/i960.exp: Ditto.
	* config/ddb-ether.exp: Ditto.
	* config/sim.exp: Ditto.

	* lib/g++.exp(g++_init): Use g++_include_flags instead of making
	up the includes ourselves.
1997-06-17 00:08:20 +00:00
Ian Lance Taylor
c1292d9ba9 whitespace tweaks 1997-06-16 23:33:49 +00:00
Ian Lance Taylor
4602e5f401 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.
1997-06-16 23:21:18 +00:00
Ian Lance Taylor
24a3e62262 Mon Jun 16 19:12:51 1997 Geoff Keating <geoffk@ozemail.com.au>
* config/tc-ppc.h (tc_fix_adjustable): Don't let the assembler
	calculate relocations to any external symbol, because we might be
	linking a shared object and the symbol might be overriden or moved
	(for instance, moved into a static executable's .bss section).
	(GLOBAL_OFFSET_TABLE_NAME): Delete. This is an i386 wierdness.

	* config/tc-ppc.h (tc_fix_adjustable): GOT-based relocations can't
	be calculated by the assembler.

	* config/tc-ppc.c (md_apply_fix3): Handle @plt or @local branch
	whose destination lies in the same file, by ignoring the @plt or
	@local and aiming the branch at its destination.
1997-06-16 23:17:22 +00:00
Ian Lance Taylor
08a561521f * configure.in: Use mh-ppcpic and mt-ppcpic for powerpc*-* targets. 1997-06-16 23:10:46 +00:00
Ian Lance Taylor
897832ee25 Mon Jun 16 19:06:41 1997 Geoff Keating <geoffk@ozemail.com.au>
* mh-ppcpic: New file.
	* mt-ppcpic: New file.
1997-06-16 23:09:46 +00:00
Ian Lance Taylor
b6eb341bf8 Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
 	relocs in shared libraries which refer to local symbols.  Cope
 	with addend when processing a GOT relocation.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
	for sections that the linker didn't create.
	(ppc_elf_finish_dynamic_sections): Only try to write out a section
 	symbol if it was created in ppc_elf_size_dynamic_sections.
	(ppc_elf_relocate_section): Complain if we have to generate a reloc
	relative to a section for which we didn't output a symbol.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up.  PLT
 	relocs are 'rela' relocs, like everything else.  .rela.plt is not
 	a read-only section, so we don't have to special-case it.

	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
	.rela.bss section are (of course) 'rela' relocs not 'rel' relocs.

	* elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
	(ppc_elf_relocate_section): @got offsets are 4 from start of the
	actual .got section.
	* elflink.c (_bfd_elf_create_got_section): The three reserved
	words start from the symbol '_GLOBAL_OFFSET_TABLE_'.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
	characters, not 4.

	* elf32-ppc.c (ppc_elf_check_relocs): Use
	_bfd_elf_create_got_section to create the GOT rather than
	ppc_elf_create_linker_section. Create the '.rela.got' section
	ourselves.
	(ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
	symbol has a GOT entry.
	(ppc_elf_relocate_section): Record when a symbol is used through
	the GOT, and allocate space in the GOT for each such symbol.
	(ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
	(ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
	stuff.

	* elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
	treated in a similar way to ADDR16_HA relocs.
	(ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
	shared objects; the linker must deal with them.
	(ppc_elf_create_linker_section): Stop setting
	_GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
	LINKER_SECTION_PLT stuff.
	(ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
	(ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
	section, not ELF-specific calls.
	(elf_backend_plt_not_loaded): Set to 1.
	(elf_backend_got_symbol_offset): Set to 4.
	* elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
	for when ld.so fills in the PLT; and 'got_symbol_offset' member.
	* elflink.c (_bfd_elf_create_dynamic_sections): Apply
	plt_not_loaded member.
	(_bfd_elf_create_got_section): Apply got_symbol_offset.
	* elfxx-target.h (elf_backend_plt_not_loaded): Set default to
	'loaded'.
	(elf_backend_G_O_T_offset): Set default to 0.
	(elfNN_bed): Set added fields.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
	DT_RELENT in shared objects; should be DT_RELAENT.

	* elf32-ppc.c (ppc_elf_relocate_section): Propagate
	R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
	such a reloc (in a non-shared object) refers to a symbol that's
	not defined.
1997-06-16 23:05:27 +00:00
Ian Lance Taylor
3a0358617e * config/tc-ppc.c (ppc_insert_operand): In 32 bit mode, with a
signed operand, sign extend a 32 bit value to the host size.
Permits dubious usage like
	addi  %r6,%r6,0xfffffeff
to assemble on a 64 bit host as it does on a 32 bit host.
1997-06-16 20:09:35 +00:00
Ian Lance Taylor
e2e4466adb * Makefile.in (CFLAGS): Subsitute from configure script. From
Jeff Makey <jeff@cts.com>.
1997-06-16 19:47:53 +00:00
Ian Lance Taylor
572728c6f9 * configure: Set CFLAGS and CXXFLAGS, and substitute them into
Makefile.  From Jeff Makey <jeff@cts.com>.
	* Makefile.in: Add comment for CFLAGS and CXXFLAGS.
1997-06-16 19:46:12 +00:00
Ian Lance Taylor
a86bf27a92 credit 1997-06-16 19:34:28 +00:00
Ian Lance Taylor
44edf9165f * Makefile.in (CC, CFLAGS): Substitute from configure script. 1997-06-16 19:34:04 +00:00
Ian Lance Taylor
3b66bca3ba * Makefile.am (INCLUDES): Add -DDEBUG.
* Makefile.in: Rebuild.
1997-06-16 19:32:15 +00:00
Ian Lance Taylor
90d7b9b9dd * elf32-i386.c (elf_i386_relocate_section): When generating a
shared library, do the relocation if the input section is not
	allocated in memory.
1997-06-16 19:24:23 +00:00
Ian Lance Taylor
000befdfb4 * Makefile.in (DISTBISONFILES): Remove.
(taz): Don't futz with DISTBISONFILES.  Change BISON to use
	$(DEFAULT_YACC).
1997-06-16 18:55:52 +00:00
Ian Lance Taylor
fdc944a7fb Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elfcode.h (put_signed_word): Define.
	(get_signed_word): Define.
	(elf_swap_reloca_in): Use get_signed_word for the r_addend field.
	(elf_swap_reloca_out): Use put_signed_word for the r_addend
	field.
	* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
	bfd_get_signed_32 to set the r_addend field.
	* elf64-mips.c (mips_elf64_swap_reloca_in): Use
	bfd_h_get_signed_64 to set the r_addend field.
1997-06-16 18:45:30 +00:00
Ian Lance Taylor
c19fbe0f57 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
	(elf_fix_symbol_flags): New static function, broken out of
	elf_adjust_dynamic_symbol.
	(elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
	(elf_link_assign_sym_version): Likewise.  Permit a symbol to be
	forced local even if NEEDS_PLT is set.  When forcing a symbol to
	be local, clear NEEDS_PLT.
	(elf_link_output_extsym): Remove unused local bed.
1997-06-16 18:41:19 +00:00
Ian Lance Taylor
b04d9d8a19 * gas/m68k/pcrel.d: Update for m68k disassembler changes.
* gas/m68k/operands.d: Likewise.
1997-06-16 18:34:35 +00:00
Ian Lance Taylor
2896b00885 * m68k-dis.c (print_insn_arg): Print case 7.2 using %pc@()
syntax.  From Roman Hodek
	<rnhodek@faui22c.informatik.uni-erlangen.de>.
1997-06-16 18:31:32 +00:00