Commit Graph

38350 Commits

Author SHA1 Message Date
Alan Modra f4656909e9 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
(ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
	test.
	(ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
	(allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
	and optimize.  Use ELIMINATE_COPY_RELOCS.
	(ppc64_elf_relocate_section): Likewise.
2003-02-19 11:44:15 +00:00
Alan Modra ee05f2fe2f * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
(ppc_elf_copy_indirect_symbol): Copy pc_count field.
	(ELIMINATE_COPY_RELOCS): Define.
	(ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
	(MUST_BE_DYN_RELOC): Define.
	(allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
	and optimize.  Trim dyn_relocs.
	(ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
	not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
	track of pc_rel dyn relocs.
	(ppc_elf_relocate_section): Remove "will_become_local".  Adjust
	WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
	allocate_dynrelocs.  Don't recalculate "sec".
2003-02-19 11:26:50 +00:00
Alan Modra b1ac4c66ea * app.c (do_scrub_chars): Handle '||' in two states. 2003-02-19 10:46:52 +00:00
Alan Modra ee3fd32958 import latest versions 2003-02-19 07:47:34 +00:00
gdbadmin 90e56b9873 *** empty log message *** 2003-02-19 00:00:02 +00:00
Keith Seitz 5412f5f35f * Makefile.in: Add gdbtk-interps.c. 2003-02-18 23:27:42 +00:00
Alan Modra 2046d4bcae daily update 2003-02-18 23:00:06 +00:00
Kevin Buettner 881324ebbd Make Sparc/Solaris work again. 2003-02-18 22:46:16 +00:00
Andrew Cagney 6a2f5abf07 2003-02-18 Andrew Cagney <cagney@redhat.com>
* symtab.h (struct objfile): Add opaque declaration.
2003-02-18 22:14:26 +00:00
Jason Merrill e9e456850e * Makefile.tpl (check-c++): Allow parallelism. 2003-02-18 20:12:50 +00:00
Elena Zannoni 54c7009d04 2003-02-18 Elena Zannoni <ezannoni@redhat.com>
From Jim Ingham   <jingham@apple.com>:
        * dbxread.c (process_one_symbol): Use last_function_start rather
        than function_start_offset to find the real beginning of the
        current function.  The latter is just the text section offset on
        some systems, the former is always the real function start.
2003-02-18 15:41:29 +00:00
Alan Modra 89b16ee576 * ld-powerpc/tlsexe.d: Update for changed handling of invalid LD
relocs.
	* ld-powerpc/tlsexe.g: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexe.t: Likewise.
2003-02-18 12:54:56 +00:00
Alan Modra d881513ac9 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
* elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
	on invalid LD relocs.
	(allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
	(ppc64_elf_relocate_section): Unify new handling of LD relocs and
	tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
2003-02-18 12:54:15 +00:00
Alan Modra 89c3607e7b * ppc64.h (IS_PPC64_TLS_RELOC): Rename from IS_TLS_RELOC. 2003-02-18 12:52:55 +00:00
Alan Modra 2a050fb5ce New tests. 2003-02-18 06:11:32 +00:00
Alan Modra 7619e7c7de * elf32-ppc.h: New file.
* elf32-ppc.c: Include elf32-ppc.h.
	(NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
	(struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
	Add "tls_mask" field.
	(TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
	(struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
	Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
	sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
	Make use of htab shortcuts throughout file.
	(ppc_elf_link_hash_newfunc): Init tls_mask field.
	(ppc_elf_link_hash_table_create): Init new fields.
	(ppc_elf_copy_indirect_symbol): Copy tls_mask.
	(ppc_elf_howto_raw): Add tls relocs.
	(ppc_elf_reloc_type_lookup): Handle them.
	(ppc_elf_unhandled_reloc): New function.
	(ppc_elf_create_got): Stash got section pointer in hash table,
	return status.  Make .rela.got too.
	(ppc_elf_create_dynamic_sections): Stash section pointers in htab.
	(ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
	NON_GOT_REF set.  Don't allocate space in .plt here..
	(allocate_dynrelocs): ..do so here instead, properly ref-counting and
	not allocating plt entries unnecessarily.  Allocate got entries here.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
	(ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
	"info" during allocate_dynrelocs hash traversal.  Use htab section
	shortcuts rather than searching for named sections.  Get rid of
	"plt" and "strip" booleans.
	(update_local_sym_info, bad_shared_reloc): New functions.
	(ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
	ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
	in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
	Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
	R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
	in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
	relocs that might use a plt entry.  Set NON_GOT_REF too.
	Enumerate all do-nothing relocs.
	(ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
	tls relocs and all plt relocs.
	(ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
	(ppc_elf_finish_dynamic_symbol): Don't build got entries here.
	(ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
	shortcuts.
	(ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
	bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
	entries and got relocs here.  Warn on non-zero got reloc addend.
	Split out branch taken/not taken reloc code into a separate switch
	and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
	Split out HA reloc adjustments to separate switch statement.  Don't
	warn on reloc overflow if we've already warned about undefined.
	Don't rebuild sym name when reporting errors.  Report all possible
	errors from _bfd_final_link_relocate.
	(bfd_elf32_bfd_final_link): Don't define.
2003-02-18 06:06:17 +00:00
Alan Modra f9e6bfa8dc * emultempl/ppc32elf.em: New file.
* emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
	* Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
	(eelf32lppcnto.c): Likewise.
	(eelf32lppcsim.c): Likewise.
	(eelf32ppcnto.c): Likewise.
	(eelf32ppc.c): Likewise.
	(eelf32ppc_fbsd.c): Likewise.
	(eelf32ppcsim.c): Likewise.
	(eelf32ppclinux.c): Likewise.
2003-02-18 06:05:07 +00:00
Alan Modra 948567965d * ppc.h: Replace DTPMOD64, TPREL64, DTPREL64 with DTPMOD32 etc.
(IS_PPC_TLS_RELOC): Define.
2003-02-18 06:03:41 +00:00
Alan Modra 9a6c7def26 * ld.texinfo: Remove spaces between @samp and opening brace. 2003-02-18 04:52:21 +00:00
gdbadmin d68a90cfca *** empty log message *** 2003-02-18 00:00:32 +00:00
Alan Modra b5503a6c69 daily update 2003-02-17 23:00:05 +00:00
Alan Modra cd27b2768b * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
rebuild sym name when reporting errors.
2003-02-17 22:57:54 +00:00
Alan Modra 5502cb9fb4 * ld-powerpc/tlsexe.g: Update for 2003-02-14 elf64-ppc.c change. 2003-02-17 22:49:53 +00:00
Alan Modra a015f5eccc * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
hash creator.
	(ppc_before_allocation): Don't do optimizations if wrong hash table.
	(gld${EMULATION_NAME}_finish): Ditto.
2003-02-17 22:49:24 +00:00
Andrew Cagney 7ee6d7ebf9 Revert previous change. Something doesn't work. 2003-02-17 21:56:29 +00:00
Nick Clifton ae9a127f86 Fix the behaviour of --allow-shlib-undefined, so that it does what it claims
to do.  Add an inverse switch.  Update the documentation.
2003-02-17 18:24:40 +00:00
Nick Clifton b5f852ea83 SEGMENT_OVERLAPS: Check that LMAs overlap as well. 2003-02-17 18:13:18 +00:00
Andrew Cagney 859789af02 Re-generate using autoconf 000227. 2003-02-17 17:14:16 +00:00
Andrew Cagney 2846da9bd2 2003-02-17 Andrew Cagney <ac131313@redhat.com>
* configure.in (Makefile): Use the test ${target} != ${host},
	instead of the absence of the "nm.h" file, to determine of the
	configuration non-native.
	* configure: Regenerate.
2003-02-17 16:58:02 +00:00
gdbadmin 4fdc42af6e *** empty log message *** 2003-02-17 00:00:01 +00:00
Geoffrey Keating b3f16a9ba2 * configure.in (*-*-darwin*): Rename from powerpc*-*-darwin*,
don't configure target-libobjc.
	* configure: Regenerate.
2003-02-16 01:24:56 +00:00
gdbadmin 42a38b6470 *** empty log message *** 2003-02-16 00:00:32 +00:00
Alan Modra da97039a7c daily update 2003-02-15 23:00:06 +00:00
Michael Chastain 74641dfb93 2003-02-13 Michael Chastain <mec@shout.net>
* gdb.base/exprs.exp: Remove i960 remnants.
	* gdb.base/funcargs.exp: Likewise.
	* gdb.base/list.exp: Likewise.
	* gdb.base/ptype.exp: Likewise.
2003-02-15 18:32:45 +00:00
Christopher Faylor caad770612 white space 2003-02-15 03:24:54 +00:00
David Carlton 559cd2d004 2003-02-14 David Carlton <carlton@math.stanford.edu>
* gdb.c++/virtfunc.exp (test_virtual_calls): Change 'print
	pEe->D::vg()" from XFAIL to KFAIL.
2003-02-15 01:20:46 +00:00
gdbadmin c45df9bda8 *** empty log message *** 2003-02-15 00:00:32 +00:00
Alan Modra 2b9583905d daily update 2003-02-14 23:00:05 +00:00
DJ Delorie 72e60e0228 * Makefile.tpl (RANLIB): Define.
* Makefile.in: Regenerate.
2003-02-14 21:15:37 +00:00
Elena Zannoni 3b27aeeaa9 2003-02-14 Elena Zannoni <ezannoni@redhat.com>
From Brian Ford  <ford@vss.fsi.com>

	* cli/cli-decode.c (lookup_cmd_composition) [TUI]: Properly
	conditionalize tui_active test.
	(lookup_cmd_1): Ditto.
2003-02-14 20:36:58 +00:00
Mark Kettenis b0b1c2c0eb * configure.in: Add check for _etext.
* maint.c (maintenance_set_profile_cmd): Use etext if _etext isn't
available.
* config.in, configure: regenerated.
2003-02-14 20:07:00 +00:00
Daniel Jacobowitz 8f05cde5d3 * dwarf2read.c (dwarf2_get_pc_bounds): Offset addresses by base. 2003-02-14 19:05:52 +00:00
Andrew Cagney 021e760905 2003-02-14 Andrew Cagney <ac131313@redhat.com>
* main.c (tui_version): Delete variable.
	(captured_main): When --tui, set interpreter_p to "tui" instead of
	enabling tui_version.
	* printcmd.c (display_command) [TUI]: Test tui_active instead of
	tui_version.
	* cli/cli-decode.c (lookup_cmd_composition): Ditto.
	* cli/cli-cmds.c (disassemble_command): Ditto.
	* defs.h (tui_version): Delete declaration.
	* Makefile.in (SUBDIR_TUI_SRCS): Add "tui/tui-interp.c".
	(tui-interp.o): Add rules.
	(SUBDIR_TUI_OBS): Add "tui-interp.o".

Index: tui/ChangeLog
2003-02-14  Andrew Cagney  <ac131313@redhat.com>

	* tui.c (tui_enable, tui_disable): Don't modify tui_version.
	(tui_is_window_visible, tui_get_command_dimension): Test
	tui_active instead of tui_version.
	* tuiData.h (tui_version): Delete declaration.
	* tui-hooks.c (tui_init_hook, tui_event_loop): Delete function,
	moved to "tui-interp.c".
	(tui_exit, tui_command_loop): Ditto.
	(_initialize_tui): Don't initialize init_ui_hook.  Initialize
	target_new_objfile_hook.
	* tui-interp.c: New file.
2003-02-14 13:58:06 +00:00
Nick Clifton ed781d5d99 Change embedded documentation to use consistent indentation and to split up
long lines.  Change informal style of description for functions lacking real
documentation.
2003-02-14 11:16:09 +00:00
Nick Clifton 21efdc8d7c (_bfd_stab_section_find_nearest_line): For line number stabs outside of
functions, treat values as absolute addresses.
2003-02-14 09:31:57 +00:00
Nick Clifton 3193e2343c (elf_core_file_p): Compare alternate machine codes for ELF backends when
checking if the generic ELF target should be used.
2003-02-14 09:21:21 +00:00
Christopher Faylor e325dceca7 * win32-nat.cc (register_loaded_dll): Correctly set address range for
just-loaded dll.
2003-02-14 05:15:43 +00:00
Jason Molenda c4f90d873c [ChangeLog]
2003-02-12  Jason Molenda  (jmolenda@apple.com)

        * symmisc.c (print_objfile_statistics): Include information about
        the number of psymtabs and symtabs in each object file.

[testsuite/ChangeLog]
2003-02-13  Jason Molenda  (jmolenda@apple.com)

        * gdb.base/maint.exp: Update maint print statistics regexp to include
        new entries.
2003-02-14 01:13:45 +00:00
gdbadmin 8031856cdb *** empty log message *** 2003-02-14 00:00:31 +00:00
Alan Modra 58ac9f718e * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
(ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
	(ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
	(allocate_dynrelocs): Don't treat undefined and undefweak specially.
	(ppc_size_one_stub): Fix warning, and tighten plt entry check.
	(group_sections): Don't share a stub section if stubs are for a large
	section.  Adjust comment.
	(ppc64_elf_size_stubs): Roughly double the size left for stubs if
	!stubs_always_before_branch.
	(ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
	treat undefined and undefweak specially when processing dyn relocs.
2003-02-13 23:48:31 +00:00