Commit Graph

63158 Commits

Author SHA1 Message Date
Ian Lance Taylor 12edd763cc * script.cc (Script_options::add_symbol_assignment): Always add a
dot assginment to script_sections_.
	* script-sections.cc (Script_sections::add_dot_assignment):
	Initialize if necessary.
2009-10-16 05:19:07 +00:00
Ian Lance Taylor 68b6574b4d * layout.cc (Layout::relaxation_loop_body): Don't crash if we see
program headers with no load segment if there is a linker script.
2009-10-16 05:16:09 +00:00
Ian Lance Taylor 661be1e21e * layout.cc (Layout::set_segment_offsets): Align the file offset
to the segment aligment for -N or -n with no load segment.
	* output.cc (Output_segment::add_output_section): Don't crash if
	the first section is a TLS section.
	(Output_segment::set_section_list_addresses): Print an error
	message if the address moves backward in a linker script.
	* script-sections.cc
	(Output_section_element_input::set_section_addresses): Don't
	increase *dot_value for a SHF_TLS/SHT_NOBITS section.
	(Orphan_output_section::set_section_addresses): Likewise.
2009-10-16 05:00:29 +00:00
gdbadmin 6b3159bb46 *** empty log message *** 2009-10-16 00:00:32 +00:00
Alan Modra 65e05ed2f3 daily update 2009-10-15 23:00:04 +00:00
H.J. Lu 51e7da1b40 2009-10-15 H.J. Lu <hongjiu.lu@intel.com>
Ineiev <ineiev@gmail.com>

	PR binutils/10767
	* i386-dis.c: Use enum instead of nested macros.
2009-10-15 22:50:09 +00:00
H.J. Lu c39846ed0a 2009-10-15 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (MAX_BYTEMODE): Removed.
2009-10-15 22:26:55 +00:00
Michael Eager 060916aa31 * MAINTAINERS: Add self as MicroBlaze maintainer. 2009-10-15 19:38:12 +00:00
Michael Eager 2d1c1221e2 * config/djgpp/fnchange.lst: Add translations for cpu-microblaze.c,
elf32-microblaze.c, microblaze-rom.c, microblaze-linux-tdep.c,
	microblaze-tdep.h, microblaze-tdep.c, microblaze-opc.h,
	microblaze-opcm.h, microblaze-dis.c, microblaze-dis.h, sim/microblaze,
	microblaze.h, and microblaze.isa.
	* configure.tgt: Add targets microblaze*-linux-*, microblaze*-xilinx-*.
	* Makefile.in: Build microblaze-tdep.o, microblaze-linux-tdep.o.
	HFILES_NO_SRCDIR: Add microblaze-tdep.h.
	* microblaze-linux-tdep.c: New.
	* microblaze-tdep.c: New.
	* microblaze-tdep.h: New.
	* NEWS: Announce Xilinx MicroBlaze support.
2009-10-15 19:28:52 +00:00
Doug Kwan f15f61a7f3 2009-10-15 Doug Kwan <dougkwan@google.com>
* layout.cc (Layout::finish_dynamic_section): Generate tags
	DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ,
	DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ as needed. If -Bsymbolic is
	used, add DT_SYMBOLIC and set DF_SYMBOLIC in DT_FLAGS.
2009-10-15 18:17:48 +00:00
Paul Pluzhnikov 58ad35c453 Forgot to mention PR gdb/10757. 2009-10-15 18:17:39 +00:00
Paul Pluzhnikov dacc9cb281 2009-10-15 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-nat.c (linux_nat_post_attach_wait): Adjust assert.
	(lin_lwp_attach_lwp, linux_nat_attach): Handle disappearing LWP.
2009-10-15 18:06:15 +00:00
Michael Snyder 191e181311 2009-10-15 Michael Snyder <msnyder@vmware.com>
* record.c (record_insn_max_num): Make unsigned.
	(_initialize_record): Use uinteger instead of zinteger for
	set command, so that it will report "unlimited" for zero.
2009-10-15 17:27:54 +00:00
Michael Snyder 61f75dd8bf 2009-10-15 Michael Snyder <msnyder@vmware.com>
* record.c (record_reg_alloc): New function.
	(record_reg_release): New function.
	(record_mem_alloc): New function.
	(record_mem_release): New function.
	(record_end_alloc): New function.
	(record_end_release): New function.
	(record_entry_release): New function.
	(record_list_release): Simplify, call record_entry_release.
	(record_list_release_next): Rename to record_list_release_following.
	Simplify and call record_entry_release.
	(record_list_release_first): Simplify, comment, and use
	record_entry_release.
	(record_arch_list_add_reg): Simplify, call record_reg_alloc.
	(record_arch_list_add_mem): Simplify, call record_mem_alloc.
	(record_arch_list_add_end): Simplify, call record_end_alloc.
2009-10-15 17:15:56 +00:00
DJ Delorie 3fce87a0af merge from gcc 2009-10-15 17:03:34 +00:00
Michael Snyder 265aad3493 2009-10-12 Michael Snyder <msnyder@vmware.com>
* record.c (record_list_release_first): Do not decrement
	record_insn_num.
	(set_insn_num_max): Remove printf.
	Decrement record_insn_num in the loop.
2009-10-15 16:57:36 +00:00
Joel Sherrill 5bc4da4d06 2009-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* std-config.h: Fix spelling error.
2009-10-15 15:46:49 +00:00
Joel Sherrill c272cb468a 2009-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* sim-inline.h: Fix spelling error.
2009-10-15 15:46:19 +00:00
Alan Modra f19df8f73a PR gas/1491
gas/
	* macro.c: Delete unnecessary function declarations.
	(buffer_and_nest): Support multiple labels per line for
	LABELS_WITHOUT_COLONS targets if the labels do have colons.
	(free_macro): Move so that we don't need forward declaration.
	* read.c (read_a_source_file): Take a copy of macro expansion line
	before we trim labels.
	* listing.c (listing_newline): Adjust stdin line save for
	input_line_pointer still at start of line.
gas/testsuite/
	* gas/macros/dot.s: Don't start macro invocations is first column.
	* gas/macros/dot.l: Update.
	* gas/macros/macros.exp: Run dot test on more targets.
2009-10-15 10:58:34 +00:00
Tristan Gingold c44c601a50 2009-10-15 Jim Blandy <jimb@red-bean.com>
* libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, gettext, dgettext)
	(dcgettext, ngettext, dngettext, dcngettext): Backport changes
	from current gettext to provide GCC format_arg attributes.
2009-10-15 09:41:35 +00:00
Ian Lance Taylor 82bb573a56 * object.h (class Relocate_info): Add reloc_shdr and data_shdr
fields.
	* object.cc (Sized_relobj::relocate_sections): Set reloc_shdr and
	data_shdr fields of relinfo.
	* i386.cc (class Target_i386::Relocate): Remove ldo_addrs_ field.
	(Target_i386::Relocate::relocate_tls): Don't call fix_up_ldo.  For
	R_386_TLS_LDO_32, adjust based on section flags.
	(Target_i386::Relocate::fix_up_ldo): Remove.
2009-10-15 00:33:18 +00:00
gdbadmin 7b6964b46c *** empty log message *** 2009-10-15 00:00:33 +00:00
Cary Coutant 1256eeda7d 2009-10-14 Cary Coutant <ccoutant@google.com>
* dwarf2read.c (read_import_statement): Call follow_die_ref_or_sig.
2009-10-14 23:48:01 +00:00
Joseph Myers 0aa3b0e6e6 * ld-scripts/phdrs3.d: Allow colon in name of linker binary. 2009-10-14 23:12:16 +00:00
Alan Modra 98b5404363 daily update 2009-10-14 23:00:04 +00:00
Keith Seitz 72f2769e82 * dwarf2read.c (dwarf2_const_value): Fix order of arguments to
store_unsigned_integer.
2009-10-14 22:50:32 +00:00
Pedro Alves 481cb1bb45 Remove spurious gdb/ ... 2009-10-14 19:48:27 +00:00
Pedro Alves e23525a055 gdb/
* configure.ac (build_warnings): Add -Wunused-value.
	* configure: Regenerate.
2009-10-14 19:44:38 +00:00
Tristan Gingold 70d4c67377 2009-10-14 Tristan Gingold <gingold@adacore.com>
* solib-darwin.c: Remove trailing whitespaces.
	(darwin_dyld_version_ok): Fix typo.
2009-10-14 13:15:34 +00:00
Alan Modra 6a327e170e PR 969
* m68k-opc.c (m68k_opcodes): Correct mask for macl and msacl.
2009-10-14 11:30:20 +00:00
Andreas Schwab d05c651b27 * ldlex.l (yy_input): Remove second argument and return the value
instead.
(YY_INPUT): Adjust.
2009-10-14 10:54:27 +00:00
Alan Modra 7dff202796 * ld-elf/pr349-1.s, * ld-elf/pr349-2.s, * ld-elf/pr349.d: New. 2009-10-14 10:52:54 +00:00
Andrew Stubbs 46e8a76b3b 2009-10-14 Andrew Stubbs <ams@codesourcery.com>
* sh-tdep.c (sh_gdbarch_init): Add show_regs settings for
	bfd_mach_sh3_nommu, bfd_mach_sh2a_nofpu_or_sh3_nommu,
	bfd_mach_sh2a_or_sh3e, bfd_mach_sh2a_or_sh4, bfd_mach_sh4_nommu_nofpu,
	and bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu.
	Move bfd_mach_sh2a_or_sh4 to use the same configuration as
	bfd_mach_sh4.
2009-10-14 10:17:31 +00:00
Alan Modra f88dc410a7 include/
* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
	bfd_link_common_skip_ar_aymbols.
	(struct bfd_link_info): Here too.
bfd/
	* aoutx.h (aout_link_check_ar_symbols): Typo fix.
ld/
	* emultempl/netbsd.em (gldnetbsd_before_parse): Typo fix.
2009-10-14 05:54:29 +00:00
Ian Lance Taylor 374ad2854b Add support for -pie.
* options.h (class General_options): Add -pie and
	--pic-executable.
	(General_options::output_is_position_independent): Test -pie.
	(General_options::output_is_executable): Return true if not shared
	and not relocatable.
	(General_options::output_is_pie): Remove.
	* options.cc (General_options::finalize): Reject incompatible uses
	of -pie.
	* gold.cc (queue_middle_tasks): A -pie link is not static.
	* symtab.h (Symbol::needs_plt_entry): Return false if -pie.
	* symtab.cc (Symbol::final_value_is_known): Return false if
	output_is_position_independent.
	* layout.cc (Layout::set_segment_offsets): Start at address 0 if
	output_is_position_independent.
	* output.cc (Output_file_header::do_sized_write): Use ET_DYN if
	output_is_position_independent.
	* i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if
	output_is_position_independent.
	* testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and
	two_file_pie_test.
	(basic_pie_test.o, basic_pie_test): New targets.
	(two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets.
	(two_file_test_2_pie.o, two_file_test_main_pie.o): New targets.
	(two_file_pie_test): New target.
	* testsuite/Makefile.in: Rebuild.
	* README: Remove note saying that -pie is not supported.
2009-10-14 05:25:02 +00:00
Alan Modra fc1ed73727 * ldlang.c (load_symbols): Set whole_archive from entry when
parsing a linker script.
2009-10-14 01:48:53 +00:00
gdbadmin 8bd2aa6599 *** empty log message *** 2009-10-14 00:00:04 +00:00
Ben Elliston 42c8b6b546 * MAINTAINERS (common): Move myself to "past maintainers" section. 2009-10-13 23:44:18 +00:00
Alan Modra d473580821 daily update 2009-10-13 23:00:04 +00:00
Daniel Jacobowitz 9dca557831 * arm-tdep.c (arm_push_dummy_call): Set the low bit of LR for
a Thumb entry point.
	(thumb_get_next_pc): Handle Thumb-2 and ARM v6 instructions.  Refuse
	to single step into IT blocks.
2009-10-13 22:48:45 +00:00
Ian Lance Taylor c658516291 * options.h (class General_options): Add -init and -fini.
* layout.cc (Layout::finish_dynamic_section): Emit
	given init and fini functions.
2009-10-13 21:23:00 +00:00
Sriraman Tallam 032ce4e9e3 * gc.h (gc_process_relocs): Check if icf is enabled using new
function.
	* gold.cc (queue_initial_tasks): Likewise.
	(queue_middle_tasks): Likewise.
	* object.cc (do_layout): Likewise.
	* symtab.cc (is_section_folded): Likewise.
	* main.cc (main): Likewise.
	* reloc.cc (Read_relocs::run): Likewise.
	(Sized_relobj::do_scan_relocs): Likewise.
	* icf.cc (is_function_ctor_or_dtor): New function.
	(Icf::find_identical_sections): Check if function is ctor or dtor when
	safe icf is chosen.
	* options.h (General_options::icf): Change option to be an enum.
	(Icf_status): New enum.
	(icf_enabled): New method.
	(icf_safe_folding): New method.
	(set_icf_status): New method.
	(icf_status_): New variable.
	* (options.cc) (General_options::finalize): Set icf_status_.
	* testsuite/Makefile.am: Add commands to build icf_safe_test. Modify
	icf_test and icf_keep_unique_test to use the --icf enum flag.
	* testsuite/icf_safe_test.sh: New file.
	* testsuite/icf_safe_test.cc: New file.
2009-10-13 21:17:43 +00:00
H.J. Lu 55b126d49c 2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (print_insn): Always clear need_vex, need_vex_reg
	and vex_w_done.
2009-10-13 18:44:19 +00:00
H.J. Lu ec65d7cafa Fix a typo. 2009-10-13 16:43:39 +00:00
H.J. Lu 4c2c651631 2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10766
	* config/tc-i386.c (build_modrm_byte): Declare exp earlier.
2009-10-13 16:42:40 +00:00
H.J. Lu cd2b2c108e 2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10763
	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
	earlier.
2009-10-13 16:37:39 +00:00
H.J. Lu 313c53d19e gas/
2009-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10740
	* config/tc-i386-intel.c (i386_intel_operand): Handle call
	and jump with 2 immediate operands.

	* config/tc-i386.c (i386_finalize_immediate): Don't generate
	error message if operand string is NULL.

gas/testsuite/

2009-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10740
	* gas/i386/jump.s: Add new tests.
	* gas/i386/jump16.s: Likewise.

	* gas/i386/jump.d: Updated.
	* gas/i386/jump16.d: Likewise.
2009-10-13 16:23:25 +00:00
Pedro Alves 88e3b899d7 2009-10-13 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (call_function_by_hand): Formatting.

2009-10-13  Pedro Alves  <pedro@codesourcery.com>

	gdb/gdbserver/
	* proc-service.c (ps_lgetregs): Formatting.
2009-10-13 13:51:21 +00:00
Tristan Gingold 066d7383ac 2009-10-13 Tristan Gingold <gingold@adacore.com>
* solib-darwin.c: Add an empty line after comment for functions.
	(struct gdb_dyld_all_image_infos): Improve comment.
	(DYLD_VERSION): Removed and replaced by ...
	(DYLD_VERSION_MAX, DYLD_VERSION_MIN): ... New macros.
	(darwin_dyld_version_ok): New function.
	(darwin_load_image_infos): Call darwin_dyld_version_ok.
	(darwin_current_sos): Ditto.
	(darwin_solib_create_inferior_hook): Ditto.
2009-10-13 10:31:40 +00:00
Tristan Gingold f192ea96fd 2009-10-13 Tristan Gingold <gingold@adacore.com>
* machoread.c: Add an empty line after comment for functions.
	(oso_el_compare_name): New function.
	(macho_add_oso_symfile): New function.
	(macho_oso_symfile): Use macho_add_oso_symfile.  Sort the oso
	and optimize accesses to libraries.
2009-10-13 09:42:57 +00:00