Commit Graph

69809 Commits

Author SHA1 Message Date
H.J. Lu 83c5d36fc5 Add a testcase for warning on common symbol in archive.
2011-06-07  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/elf.exp: Build symbol3.a and symbol3w.a.

	* ld-elf/symbol3.s: New.
	* ld-elf/symbol3w.s: Likewise.
	* ld-elf/warn3.d: Likewise.
2011-06-08 04:47:04 +00:00
Cary Coutant e6455dfbc2 * common.cc (Symbol_table::do_allocate_commons_list): Call
gold_fallback.
	* errors.cc (Errors::fatal): Adjust call to gold_exit.
	(Errors::fallback): New function.
	(gold_fallback): New function.
	* errors.h (Errors::fallback): New function.
	* gold.cc (gold_exit): Change status parameter to enum; adjust
	all callers.
	(queue_initial_tasks): Call gold_fallback.
	* gold.h: Include cstdlib.
	(Exit_status): New enum type.
	(gold_exit): Change status parameter to enum.
	(gold_fallback): New function.
	* layout.cc (Layout::set_section_offsets): Call gold_fallback.
	(Layout::create_symtab_sections): Likewise.
	(Layout::create_shdrs): Likewise.
	* main.cc (main): Adjust call to gold_exit.
	* output.cc (Output_data_got::add_got_entry): Call gold_fallback.
	(Output_data_got::add_got_entry_pair): Likewise.
	(Output_section::add_input_section): Likewise.
	(Output_section::add_output_section_data): Likewise.
	(Output_segment::set_section_list_addresses): Likewise.
	* x86_64.cc (Output_data_plt_x86_64::add_entry): Likewise.
2011-06-08 04:43:28 +00:00
Cary Coutant fb0e076f5c * layout.cc (Layout::set_segment_offsets): Don't adjust layout
for incremental links.
	* output.cc (Output_segment::set_section_list_addresses): Remove
	FIXME and test for TLS or BSS.
2011-06-08 04:34:22 +00:00
Cary Coutant a5ee4d5d1e * testsuite/Makefile.am: Add incremental_copy_test,
incremental_common_test_1.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/common_test_1_v1.c: New source file.
	* testsuite/common_test_1_v2.c: New source file.
	* testsuite/copy_test_v1.cc: New source file.
2011-06-08 04:24:59 +00:00
Cary Coutant 5146f44856 * common.cc (Symbol_table::do_allocate_commons_list): For incremental
update, allocate common from bss section's free list.
	* incremental-dump.cc (dump_incremental_inputs): Print flag for
	linker-defined symbols.
	* incremental.cc (Sized_incremental_binary::do_process_got_plt):
	Skip GOT and PLT entries that are no longer referenced.
	(Output_section_incremental_inputs::write_info_blocks): Mark
	linker-defined symbols.
	(Sized_incr_relobj::do_add_symbols): Process linker-defined symbols.
	* output.cc (Output_section::allocate): New function.
	* output.h (Output_section::allocate): New function.
	* resolve.cc (Symbol_table::report_resolve_problem): Add case for
	linker-defined symbols.
	(Symbol::override_base_with_special): Copy is_predefined_ flag.
	* symtab.cc (Symbol::init_fields): Initialize is_predefined_ flag.
	(Symbol::init_base_output_data): Likewise.
	(Symbol::init_base_output_segment): Likewise.
	(Symbol::init_base_constant): Likewise.
	(Sized_symbol::init_output_data): Likewise.
	(Sized_symbol::init_output_segment): Likewise.
	(Sized_symbol::init_constant): Likewise.
	(Symbol_table::do_define_in_output_data): Likewise.
	(Symbol_table::do_define_in_output_segment): Likewise.
	(Symbol_table::do_define_as_constant): Likewise.
	* symtab.h (Symbol::is_predefined): New function.
	(Symbol::init_base_output_data): Add is_predefined parameter.
	(Symbol::init_base_output_segment): Likewise.
	(Symbol::init_base_constant): Likewise.
	(Symbol::is_predefined_): New data member.
	(Sized_symbol::init_output_data): Add is_predefined parameter.
	(Sized_symbol::init_output_segment): Likewise.
	(Sized_symbol::init_constant): Likewise.
	(enum Symbol_table::Defined): Add INCREMENTAL_BASE.
2011-06-08 04:05:25 +00:00
Cary Coutant 26d3c67de1 * copy-relocs.cc (Copy_relocs::copy_reloc): Call make_copy_reloc
instead of emit_copy_reloc.
	(Copy_relocs::emit_copy_reloc): Refactor.
	(Copy_relocs::make_copy_reloc): New function.
	(Copy_relocs::add_copy_reloc): Remove.
	* copy-relocs.h (Copy_relocs::emit_copy_reloc): Move to public
	section.
	(Copy_relocs::make_copy_reloc): New function.
	(Copy_relocs::add_copy_reloc): Remove.
	* gold.cc (queue_middle_tasks): Emit old COPY relocations from
	unchanged input files.
	* incremental-dump.cc (dump_incremental_inputs): Print "COPY" flag.
	* incremental.cc (Sized_incremental_binary::do_reserve_layout):
	Reserve BSS space for COPY relocations.
	(Sized_incremental_binary::do_emit_copy_relocs): New function.
	(Output_section_incremental_inputs::write_info_blocks): Record
	whether a symbol is copied from a shared object.
	(Sized_incr_dynobj::do_add_symbols): Record COPY relocations.
	* incremental.h (enum Incremental_shlib_symbol_flags): New type.
	(INCREMENTAL_SHLIB_SYM_FLAGS_SHIFT): New constant.
	(Incremental_input_entry_reader::get_output_symbol_index): Add
	is_copy parameter.
	(Incremental_binary::emit_copy_relocs): New function.
	(Incremental_binary::do_emit_copy_relocs): New function.
	(Sized_incremental_binary::Sized_incremental_binary): Initialize
	new data member.
	(Sized_incremental_binary::add_copy_reloc): New function.
	(Sized_incremental_binary::do_emit_copy_relocs): New function.
	(Sized_incremental_binary::Copy_reloc): New struct.
	(Sized_incremental_binary::Copy_relocs): New typedef.
	(Sized_incremental_binary::copy_relocs_): New data member.
	* symtab.cc (Symbol_table::add_from_incrobj): Change return type.
	* symtab.h (Symbol_table::add_from_incrobj): Change return type.
	* target.h (Sized_target::emit_copy_reloc): New function.
	* x86_64.cc (Target_x86_64::emit_copy_reloc): New function.
2011-06-08 03:50:12 +00:00
Doug Evans b8e9bd6c64 * cc-with-index.sh: Look for ../../gdb, for fullname.exp. 2011-06-08 01:40:58 +00:00
Alan Modra d3aeb6ee26 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
* sco5-core.c: Init match_priority field.
2011-06-08 00:16:55 +00:00
Doug Evans 0b5574da47 * cc-with-index.sh: Fix typos in comment. 2011-06-08 00:15:54 +00:00
Alan Modra 45da9a2454 daily update 2011-06-08 00:00:04 +00:00
gdbadmin 2334423426 *** empty log message *** 2011-06-08 00:00:02 +00:00
Alan Modra 5b4c94ad8d * ldlang.c (lang_one_common): Handle warning symbols. 2011-06-07 23:58:30 +00:00
Alan Modra 2a41f39647 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
indirect links here.
2011-06-07 23:57:50 +00:00
Cary Coutant ad6b52dd0b * dwarf.c: Fix conversion to TU number. 2011-06-07 23:39:28 +00:00
Joel Brobecker 1d859532c2 Fix build error on mips-irix (missing match_priority)
A new field was recently added to struct bfd_target, and irix-core.c
needs an update...

bfd/ChangeLog:

        * irix-core.c (irix_core_vec): Add match_priority field.
2011-06-07 19:50:08 +00:00
Jan Kratochvil 5be4dfca58 gdb/
* cli/cli-cmds.c (shell_escape): Use waitpid.
	* rs6000-nat.c (exec_one_dummy_insn): Likewise.

gdb/testsuite/
	* gdb.base/async-shell.c: New file.
	* gdb.base/async-shell.exp: New file.
2011-06-07 17:26:47 +00:00
Nick Clifton f36485f09d * corefile.c (core_sym_class): Allow for multiple iterations of
clone clones and subprograms.
2011-06-07 13:33:20 +00:00
Tristan Gingold 316a8b2145 2011-06-07 Tristan Gingold <gingold@adacore.com>
* xcoffread.c (dwarf2_xcoff_names): New variable.
	(aix_process_linenos): Add a guard.
	(xcoff_symfile_finish): Free dwarf2.
	(xcoff_initial_scan): Add dwarf2 support.
2011-06-07 12:31:07 +00:00
Alan Modra ee6404d34e daily update 2011-06-07 00:00:05 +00:00
gdbadmin d70849ab99 *** empty log message *** 2011-06-07 00:00:02 +00:00
Alan Modra 8a1241ef4b Regenerate. 2011-06-06 14:51:42 +00:00
Pedro Alves 9f47e25402 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.threads/pending-step.exp: Add more context to SIGTRAP match.
2011-06-06 13:33:08 +00:00
Pedro Alves 3dd5b83d5b 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (run_inferior_call): Don't mask async.  Instead force
	a synchronous wait, if the target can async.

	* target.h (struct target_ops): Delete to_async_mask.
	(target_async_mask): Delete.
	* target.c (update_current_target): Delete references to to_async_mask.
	* linux-nat.c (linux_nat_async_mask_value): Delete.
	(linux_nat_is_async_p, linux_nat_can_async_p): Remove references
	to linux_nat_async_mask_value.
	(linux_nat_async_mask): Delete.
	(linux_nat_async, linux_nat_close): Remove references to
	linux_nat_async_mask_value.
	* record.c (record_async_mask_value): Delete.
	(record_async): Remove references to record_async_mask_value.
	(record_async_mask): Delete.
	(record_can_async_p, record_is_async_p): Remove references to
	record_async_mask_value.
	(init_record_ops, init_record_core_ops): Remove references to
	record_async_mask.
	* remote.c (remote_async_mask_value): Delete.
	(init_remote_ops): Remove reference to remote_async_mask.
	(remote_can_async_p, remote_is_async_p): Remove references to
	remote_async_mask_value.
	(remote_async): Remove references to remote_async_mask_value.
	(remote_async_mask): Delete.

	* infrun.c (fetch_inferior_event): Don't claim registers changed
	if the current thread is already not executing.
2011-06-06 12:47:07 +00:00
Nick Clifton 3c0013bf3b Sync from upstream:
2011-06-03  Nick Clifton  <nickc@redhat.com>
		    Ben Elliston  <bje@gnu.org>

	* config.sub (v850e1, v850es, v850e2, v850e2v3): New.

	2011-05-30  Chris Metcalf  <cmetcalf@tilera.com>
		    Ben Elliston  <bje@gnu.org>

	* config.guess (tile*:Linux:*:*): Use vendor "unknown", not
	"tilera", for consistency with other architectures.
	* config.sub (tile*-*, tilegx-*): Use a more general pattern for
	"tile" to allow matching tilepro, tilegx32 and other variants.
2011-06-06 10:36:06 +00:00
Alan Modra 0aabe54e62 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
Add match_priority.
	* configure.in: Bump bfd version.
	* elfcode.h (elf_object_p): Delete hacks preventing match of
	EM_NONE and ELFOSABI_NONE targets when a better match exists.
	* elfxx-target.h (elf_match_priority): Define and use.
	* format.c (bfd_check_format_matches): Use target match_priority
	to choose best of multiple matching targets.  In cases with multiple
	matches rerun _bfd_check_format if we don't choose the last match.
	* aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
	* binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
	* coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
	* coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
	* coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
	* i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
	* mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
	* pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
	* tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
	* vms-lib.c, * xsym.c: Init match_priority field.
	* configure: Regenerate.
	* bfd-in2.h: Regenerate.
2011-06-06 01:26:05 +00:00
gdbadmin 586d24ef34 *** empty log message *** 2011-06-06 00:00:33 +00:00
Alan Modra 1cba6f012d daily update 2011-06-06 00:00:05 +00:00
Mike Frysinger 6248039b9e sim: bfin: add missing gitignore file 2011-06-05 21:32:34 +00:00
gdbadmin f020b4cec1 *** empty log message *** 2011-06-05 00:00:33 +00:00
Alan Modra 841fd89ddb daily update 2011-06-05 00:00:05 +00:00
H.J. Lu 70b554c98b Revert the last change on elf_object_p.
2011-06-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12842
	* elfcode.h (elf_object_p): Revert the last change.
2011-06-04 18:16:17 +00:00
Mike Frysinger 1d7b4a7037 sim: bfin: import testsuite
Now that the common sim testsuite code supports .S and .c files, we
can import the Blackfin testsuite.  There are about ~800 tests here,
so I'm only attaching a compressed patch of them.  Other than adding
files to sim/testsuite/sim/bfin/, the sim/configure.tgt file was
updated to mark Blackfin as having a testsuite, and sim/configure
regenerated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-04 17:44:22 +00:00
Mike Frysinger eb3243445a sim: bfin: add support for glued SIC interrupt lines
The BF537 family glues a bunch of peripherals into single interrupt lines
that run into the SIC.  To model this same behavior in the sim, we need to
use the glue-or device, and in order to use that, we need to tweak things
a bit in the mach code to allow declaring of these new devices.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-04 17:18:04 +00:00
Mike Frysinger 082e1c4a87 sim: bfin: push SIC mappings to device tree
The machs.c file is the best place for holding cpu-specific details, so
restructure the way the SIC manages its ports to do just that.  Now the
SIC's have a standard set of input pins and the different line routing
from peripherals is kept in the device tree only.  This better models
the hardware where the SIC doesn't care about the exact peripheral that
is sending it stuff, just which input pin it gets it on.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-04 17:11:19 +00:00
Alan Modra d50ec8a7e1 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
return the other arch.
	* elfcode.h (elf_object_p): Allow explicit match to generic ELF
	target.
2011-06-04 04:07:54 +00:00
Alan Modra f973cbf1c6 daily update 2011-06-04 00:00:05 +00:00
gdbadmin 5ca1effa14 *** empty log message *** 2011-06-04 00:00:02 +00:00
Joel Brobecker 64b9b33460 Various spelling fixes.
gdb/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c,
        gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes.

gdb/testsuite/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * gdb.base/help.exp: Adjust following some spelling corrections
        in GDB.
2011-06-03 23:47:46 +00:00
Joel Brobecker 91c6776727 Spelling fixe in sim/ppc/vm.c
From Stephen Kitt  <steve@sk2.org>
        * vm.c (vm_synchronize_context): Spelling fix in function
        documentation.
2011-06-03 23:47:04 +00:00
Joel Brobecker d009417cdb Minor spelling fix in ChangeLog. 2011-06-03 23:46:46 +00:00
Joel Brobecker 945b3647f2 Minor spelling fix. 2011-06-03 23:46:25 +00:00
Quentin Neill d535accd98 Add CpuF16C to CPU_BDVER2_FLAGS.
opcodes/
	2011-06-02  Quentin Neill  <quentin.neill@amd.com>

		* i386-gen.c (cpu_flag_init): Add CpuF16C to CPU_BDVER2_FLAGS.
		* i386-init.h: Regenerated.
2011-06-03 20:06:20 +00:00
Joel Brobecker 325663dcd2 address size can be different from DW_OP_deref size
gdb/ChangeLog:

        * dwarf2expr.c (execute_stack_op) [DW_OP_deref]: Handle
        the case where ADDR_SIZE is different from TYPE_LENGTH (type).
2011-06-03 17:42:24 +00:00
Nick Clifton 164a5cb7bd PR ld/12682
* hash.c (higher_primer_number): Add more, small, prime numbers.
	(bfd_hash_set_default_size): Likewise.
2011-06-03 16:16:32 +00:00
Tom Tromey 8cf64490f2 gdb
* python/py-inferior.c (python_inferior_exit): Use inferior's exit
	code fields.
	* python/py-exitedevent.c (create_exited_event_object): Change
	type of 'exit_code'.  Optionally add exit_code attribute.
	(emit_exited_event): Change type of 'exit_code'.
	* python/py-event.h (emit_exited_event): Update.
	* mi/mi-interp.c (mi_inferior_exit): Print exit code.
	* infrun.c (handle_inferior_event): Set exit code fields on
	inferior.
	* inferior.h (struct inferior) <has_exit_code, exit_code>: New
	fields.
	* inferior.c (exit_inferior_1): Initialize new fields.
gdb/doc
	* gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field.
	(Events In Python): Note that exit_code is optional.
2011-06-03 15:32:44 +00:00
Tom Tromey 8ddd9a20a7 * dwarf2expr.c (get_signed_type): New function.
(execute_stack_op) <DW_OP_shra>: Always perform a signed shift.
2011-06-03 14:57:29 +00:00
Nick Clifton 331fe61622 Fix attributation of previous delta. 2011-06-03 14:44:04 +00:00
Nick Clifton a4482bb643 PR gas/12698
* config/tc-arm.c (parse_psr): Set m_profile to false when
	assembling for any architecture.
2011-06-03 14:42:47 +00:00
Nick Clifton bc77a04af7 * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32am33lin.c
Add rule to build eelf32am33lin.c
	* Makefile.in: Regenerate.
2011-06-03 10:36:39 +00:00
Nick Clifton 582386937d oops - spelling fixes accidentally omitted from previous delta. 2011-06-03 10:11:06 +00:00