Commit Graph

77652 Commits

Author SHA1 Message Date
H.J. Lu df71cb5cbf Check .gnu.warning section in shared library
PR ld/15762
	* ld-elf/shared.exp (build_tests): Check .gnu.warning section
	in the libbarw.so library.
	* ld-elf/libbarw.rd: New.

	* lib/ld-lib.exp (run_cc_link_tests): Support checking on
	output with warning message.
2013-07-24 17:24:20 +00:00
Luis Machado 3360c0bf75 gdb/
* Makefile.in (SFILES): Add common/target-common.c.
	Add common/target-common.h to headers.
	(COMMON_OBS): Add target-common.o.
	(target-common.o): New target.
	* linux-nat.h (resume_kind): Move to common/target-common.h.
	* target.c (target_waitstatus_to_string): Move to
	common/target-common.c.
	* target.h: Include target-common.h.
	(target_waitkind): Move to common/target-common.h.
	(target_waitstatus): Likewise.
	(TARGET_WNOHANG): Likewise.
	* common/target-common.c: New file.
	* common/target-common.h: New file.

	gdb/gdbserver/
	* Makefile.in (SFILES): /common/target-common.c.
	(OBS): Add target-common.o.
	(server_h): Add $(srcdir)/../common/target-common.h.
	(target-common.o): New target.
	* server.c (queue_stop_reply_callback): Free
	status string after use.
	* target.c (target_waitstatus_to_string): Remove.
	* target.h: Include target-common.h.
	(resume_kind): Likewise.
	(target_waitkind): Likewise.
	(target_waitstatus): Likewise.
	(TARGET_WNOHANG): Likewise.
2013-07-24 16:20:12 +00:00
H.J. Lu 7e8b059be6 Support Intel MPX
gas/

2013-07-24  Anna Tikhonova  <anna.tikhonova@intel.com>
	    Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* config/tc-i386.c (BND_PREFIX): New.
	(struct _i386_insn): Add new field bnd_prefix.
	(add_bnd_prefix): New.
	(cpu_arch): Add MPX.
	(i386_operand_type): Add regbnd.
	(md_assemble): Handle BND prefixes.
	(parse_insn): Likewise.
	(output_branch): Likewise.
	(output_jump): Likewise.
	(build_modrm_byte): Handle regbnd.
	(OPTION_MADD_BND_PREFIX): New.
	(md_longopts): Add entry for 'madd-bnd-prefix'.
	(md_parse_option): Handle madd-bnd-prefix option.
	(md_show_usage): Add description for madd-bnd-prefix
	option.
	* doc/c-i386.texi: Document mpx/.mpx and -madd-bnd-prefix.

gas/testsuite/

2013-07-24  Anna Tikhonova  <anna.tikhonova@intel.com>
	    Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* gas/i386/mpx-add-bnd-prefix.s: New.
	* gas/i386/mpx-add-bnd-prefix.d: New.
	* gas/i386/mpx-inval-1.l: New.
	* gas/i386/mpx-inval-1.s: New.
	* gas/i386/mpx.d: New.
	* gas/i386/mpx.s: New.
	* gas/i386/x86-64-mpx-add-bnd-prefix.d: New.
	* gas/i386/x86-64-mpx-add-bnd-prefix.s: New.
	* gas/i386/x86-64-mpx-addr32.d: New.
	* gas/i386/x86-64-mpx-addr32.s: New.
	* gas/i386/x86-64-mpx-inval-1.l: New.
	* gas/i386/x86-64-mpx-inval-1.s: New.
	* gas/i386/x86-64-mpx-inval-2.l: New.
	* gas/i386/x86-64-mpx-inval-2.s: New.
	* gas/i386/x86-64-mpx.d: New.
	* gas/i386/x86-64-mpx.s: New.
	* gas/i386/nops.d: Adjust to MPX changes.
	* gas/i386/nops.s: Likewise.
	* gas/i386/x86-64-nops.d: Likewise.
	* gas/i386/x86-64-nops.s: Likewise.
	* gas/i386/ilp32/x86-64-nops.d: Likewise.
	* gas/i386/i386.exp: Run new MPX tests.

include/opcode/

2013-07-24  Anna Tikhonova  <anna.tikhonova@intel.com>
	    Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* i386.h (BND_PREFIX_OPCODE): New.

opcodes/

2013-07-24  Anna Tikhonova  <anna.tikhonova@intel.com>
	    Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* i386-dis.c (BND_Fixup): New.
	(Ebnd): New.
	(Ev_bnd): New.
	(Gbnd): New.
	(BND): New.
	(v_bnd_mode): New.
	(bnd_mode): New.
	(MOD enum): Add new entries.
	(PREFIX enum): Likewise.
	(dis tables): Replace XX with BND for near branch and call
	instructions.
	(prefix_table): Add new entries.
	(mod_table): Likewise.
	(names_bnd): New.
	(intel_names_bnd): New.
	(att_names_bnd): New.
	(BND_PREFIX): New.
	(prefix_name): Handle BND_PREFIX.
	(print_insn): Initialize names_bnd.
	(intel_operand_size): Handle new modes.
	(OP_E_register): Likewise.
	(OP_E_memory): Likewise.
	(OP_G): Likewise.
	* i386-gen.c (cpu_flag_init): Add CpuMPX.
	(cpu_flags): Add CpuMPX.
	(operand_type_init): Add RegBND.
	(opcode_modifiers): Add BNDPrefixOk.
	(operand_types): Add RegBND.
	* i386-init.h: Regenerate.
	* i386-opc.h (CpuMPX): New.
	(CpuUnused): Comment out.
	(i386_cpu_flags): Add cpumpx.
	(BNDPrefixOk): New.
	(i386_opcode_modifier): Add bndprefixok.
	(RegBND): New.
	(i386_operand_type): Add regbnd.
	* i386-opc.tbl: Add BNDPrefixOk to near jumps, calls and rets.
	Add MPX instructions and bnd prefix.
	* i386-reg.tbl: Add bnd0-bnd3 registers.
	* i386-tbl.h: Regenerate.
2013-07-24 15:47:25 +00:00
Doug Evans 6656a72dcb * dwarf2read.c (lookup_dwo_cutu): Change missing DWO complaint to
a warning.
2013-07-24 15:45:32 +00:00
Tristan Gingold 7fa9fcb6db bfd/
2013-07-24  Tristan Gingold  <gingold@adacore.com>

        * coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
        R_RBR.  Add numbers in comments.
        (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16.
        * coff64-rs6000.c: Likewise.

gas/
2013-07-24  Tristan Gingold  <gingold@adacore.com>

        * config/tc-ppc.c (md_apply_fix): Adjust BFD_RELOC_PPC_B16 on
        xcoff targets.

gas/testsuite/
2013-07-24  Tristan Gingold  <gingold@adacore.com>

        * gas/ppc/test2xcoff32.s, gas/ppc/test2xcoff32.d: New files
        * gas/ppc/ppc.exp: Add new test.
        * gas/ppc/xcoff-br16-1.s, gas/ppc/xcoff-br16-1.d,
        gas/ppc/xcoff-br16-2.s, gas/ppc/xcoff-br16-2.d: New files
        * gas/ppc/aix.exp: Add new tests.
2013-07-24 14:12:41 +00:00
Yao Qi a0607b84d2 gdb/testsuite/
* gdb.mi/mi-var-cmd.exp: If host is remote, use ${testfile} on
	host.
	* gdb.mi/mi-basics.exp (test_exec_and_symbol_mi_operatons):
	Likewise.  If host is remote, copy ${binfile} to host.
2013-07-24 09:17:15 +00:00
Andreas Krebbel 614eb2779c 2013-07-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/tc-s390.c (s390_machine): Don't force the .machine
	argument to lower case.
2013-07-24 09:02:45 +00:00
Alan Modra 13355230fb daily update 2013-07-24 00:00:04 +00:00
Nick Clifton dffc89775f oops - omitted from previous delta 2013-07-23 07:40:46 +00:00
Yao Qi 6df81a635e gdb/
* i386-tdep.c (i386_in_stack_tramp_p): Remove unused
	parameter 'gdbarch'.
	(i386_stack_tramp_frame_sniffer): Caller update.
	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Remove
	parameter 'gdbarch' and 'target'.
	(i386_linux_core_read_description): Caller update.
	* amd64-linux-tdep.c (amd64_linux_core_read_description):
	Likewise.
	* i386-linux-tdep.h (i386_linux_core_read_xcr0): Update
	declaration.
2013-07-23 07:02:03 +00:00
Tom Tromey 365156ada1 * dwarf2read.c (init_cutu_and_read_dies): Revert patch from
2013-07-22.
2013-07-23 06:56:53 +00:00
Yao Qi 2eb14a9b5c gdb/testsuite/
* gdb.mi/mi-var-cmd.exp: Adjust pattern to match current error
	message.
2013-07-23 06:54:47 +00:00
Alan Modra 6ef198dae7 daily update 2013-07-23 00:00:04 +00:00
Jan Kratochvil 66cbcda46f Fix the following ChangeLog entry:
2013-07-22  Doug Evans  <dje@google.com>

gdb/
	* exec.h (remove_target_sections): Delete arg abfd.
	* exec.c (exec_close): Update call to remove_target_sections.
	(remove_target_sections): Delete arg abfd.
	* solib.c (update_solib_list): Ditto.
	(reload_shared_libraries_1): Ditto.
	(clear_solib): Ditto, and unconditionally call remove_target_sections.
	* target.h (struct target_section): Rename key to owner.
	All uses updated.
2013-07-22 20:52:23 +00:00
Jan Kratochvil 046ac79fc7 2013-07-22 Doug Evans <dje@google.com>
gdb/
	* exec.h (remove_target_sections): Delete arg abfd.
	* exec.c (remove_target_sections): Delete arg abfd.
	(exec_close): Update call to remove_target_sections.
	* solib.c (update_solib_list): Ditto.
	(reload_shared_libraries_1): Ditto.
	(clear_solib): Ditto, and unconditionally call remove_target_sections.
2013-07-22 20:51:11 +00:00
DJ Delorie 632a40b341 merge from gcc 2013-07-22 18:03:12 +00:00
Tom Tromey 29b2cc46a5 fix solib-som.c
som_open_symbol_file_object was leaking a cleanup.

	* solib-som.c (som_open_symbol_file_object): Call do_cleanups.
2013-07-22 18:00:50 +00:00
Tom Tromey d11600184f fix init_cutu_and_read_dies
init_cutu_and_read_dies creates an outer cleanup and uses its
immediately nested inner cleanup conditionally.  This seems overly
complicated to me; simpler is to just deal with the outer cleanup and
drop the inner one.  That is what this patch implements.

	* dwarf2read.c (init_cutu_and_read_dies): Remove 'free_cu_cleanup'.
	Simplify cleanup handling.
2013-07-22 17:58:51 +00:00
Tom Tromey 2f324bf6cb fix dwarf_decode_line_header
dwarf_decode_line_header has one return that is missing a call to
do_cleanups.  This patch adds it.

This was found using the cleanup checker.

	* dwarf2read.c (dwarf_decode_line_header): Call do_cleanups
	on all return paths.
2013-07-22 17:53:55 +00:00
Joel Brobecker 7539e41e9f src-release: Fix VER computation for TOOL=gdb
Without this patch, the DATE marker in gdb/version.in does not get
replaced by the source packaging date, causing the name of the
tarball being created to: have the DATE marker in the tarball
name and the name of the directory the sources unpack to (Eg:
gdb-7.6.50-DATE-cvs.tar instead of gdb-7.6.50-20130710-cvs.tar).

ChangeLog:

        * src-release (VER): Use $(TOOL)/common/create-version.sh
        if it exists.
2013-07-22 15:17:20 +00:00
Ulrich Weigand e23b9d6ed2 2013-07-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (PPC_DEBUG_FEATURE_DATA_BP_DAWR): New define.
	(ppc_linux_region_ok_for_hw_watchpoint): Add checking to use the new
	DAWR interface for longer ranges hardware watchpoint (up to 512 bytes).
2013-07-22 13:17:51 +00:00
Nick Clifton eb013ee23c oops - omitted fromn previous delta 2013-07-22 13:04:57 +00:00
Nick Clifton 9933d19149 * ld-scripts/script.exp: Use run_dump_test instead of
ld_simple_link to check the error message.
	* ld-scripts/align-with-input.d: New file.
	* ld-scripts/region-alias-1.d: Likewise.
	* ld-scripts/region-alias-2.d: Likewise.
	* ld-scripts/region-alias-3.d: Likewise.
	* ld-scripts/region-alias-4.d: Likewise.
2013-07-22 13:03:30 +00:00
Phil Muldoon 1cf55f60bf 2013-07-22 Phil Muldoon <pmuldoon@redhat.com>
* top.c (print_gdb_version): Add help, apropos description and
	url to online documentation.
2013-07-22 11:42:31 +00:00
Kyrylo Tkachov e673710a22 2013-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/tc-arm.c (s_arm_arch_extension): Improve error message
	for invalid extension.
2013-07-22 09:05:04 +00:00
Alan Modra b91fb16d75 daily update 2013-07-22 00:00:04 +00:00
DJ Delorie 44b6b9d4f9 merge from gcc 2013-07-21 17:19:10 +00:00
Alan Modra 93a102b3b4 daily update 2013-07-21 00:00:04 +00:00
Alan Modra 436e1ebacc PR ld/15762
PR ld/12761
	* elflink.c (elf_link_add_object_symbols): Don't clobber
	.gnu.warning.symbol sections when shared.
2013-07-20 09:50:16 +00:00
Alan Modra 702535171d daily update 2013-07-20 00:00:05 +00:00
Roland McGrath a3ed37d8bc gold/
* options.h (General_options): Add -Trodata-segment option.
	* parameters.cc (Parameters::check_rodata_segment): New function.
	(Parameters::set_target_once): Call it.
	* parameters.h (Parameters): Declare it (private member function).
	* layout.cc (load_seg_unusable_for_headers): New function, broken
	out of Layout::relaxation_loop_body.  If TARGET->isolate_execinstr()
	then validate rodata segment rather than text segment.
	(relaxation_loop_body): Call that.
	(is_text_segment): New function.  Don't admit a non-executable
	segment if TARGET->isolate_execinstr().
	(set_segment_offsets): Call it.  Honor -Trodata-segment option.
2013-07-19 23:07:08 +00:00
Yufeng Zhang 69091a2cc4 [AArch64, ILP32] Retire -milp32 and -mlp64; use -mabi=ilp32 and -mabi=lp64.
gas/

	* config/tc-aarch64.c (enum aarch64_abi_type): New enumeration tag.
	(AARCH64_ABI_LP64, AARCH64_ABI_ILP32): New enumerators.
	(aarch64_abi): New variable.
	(ilp32_p): Change to be a macro.
	(aarch64_opts): Remove the support for option -milp32 and -mlp64.
	(struct aarch64_option_abi_value_table): New struct.
	(aarch64_abis): New table.
	(aarch64_parse_abi): New function.
	(aarch64_long_opts): Add entry for -mabi=.
	* doc/as.texinfo (Target AArch64 options): Document -mabi.
	* doc/c-aarch64.texi: Likewise.

gas/testsuite/

	* gas/aarch64/ilp32-basic.d (#as): Update to use -mabi=ilp32
2013-07-19 16:25:54 +00:00
Nick Clifton 0a01f695e0 oops - omitted from previous delta 2013-07-19 13:21:55 +00:00
Nick Clifton ee181c7253 * elf32-rx.c (rx_elf_relocate_section): Fix typo: move
saw_subtract from R_RX_OPdiv to R_RX_OPneg.
2013-07-19 13:16:17 +00:00
Nick Clifton 1ae40aa4df PR binutils/15745
* readelf.c (get_unwind_section_word): Whilst searching for a
	reloc section associated with an unwind section, check the type as
	well as the section number.
2013-07-19 10:44:01 +00:00
Nick Clifton 1eec346e12 * ldgram.y: Add ALIGN_WITH_INPUT output section attribute.
* ldlang.c: Likewise.
	* ldlang.h: Likewise.
	* ldlex.l: Likewise.
	* mri.c: Likewise.
	* ld.texinfo: Document new feature.
	* NEWS: Mention new feature.

	* ld-scripts/script.exp: Run align with input test.
	* ld-scripts/align-with-input.t: New file.
	* ld-scripts/rgn-at8.d: Likewise.
	* ld-scripts/rgn-at8.t: Likewise.
2013-07-19 10:39:51 +00:00
Will Newton 5d0a3b53c0 gdb/testsuite/gdb.base: Enable disp-step-syscall.exp tests for ARM.
disp-step-syscall.exp is not run for ARM targets because ARM syscall
instructions have not been added to the list of possible syscall
instructions. This patch adds ARM syscall instructions to enable
disp-step-syscall.exp tests for ARM targets. Attached patch is tested
on ARMv7 and helps pass all disp-step-syscall.exp tests for ARM
targets.

gdb/testsuite/ChangeLog:

2013-07-19  Omair Javaid  <Omair.Javaid@linaro.org>

	* gdb.base/disp-step-syscall.exp: Add svc and swi syscall
	instructions and enable disp-step-syscall for arm targets.
2013-07-19 10:24:34 +00:00
Will Newton 9a5911c08b gdb/testsuite/gdb.dwarf2: Replace @ with % for ARM compatability.
The ARM assembler recognises @ symbol as a comment marker and
therefore is unable to assemble some of gdb.dwarf2 testsuite tests.
This patch replaces all occurrences of @ symbol with % sign to allow
tests stay compatible with both ARM and x86 assembly. This patch has
been tested on x86_64 and ARMv7 targets.

gdb/testsuite/ChangeLog:

2013-07-19  Omair Javaid  <Omair.Javaid@linaro.org>

        * gdb.dwarf2/fission-reread.S: Replace @ sign with % sign to remove
        assembler errors on arm.
        * gdb.dwarf2/mac-fileno.S: Likewise.
        * gdb.dwarf2/member-ptr-forwardref.S: Likewise.
        * gdb.dwarf2/pr13961.S: Likewise.
2013-07-19 10:01:26 +00:00
Hui Zhu fa87697221 2013-07-19 Hui Zhu <hui@codesourcery.com>
PR gdb/15692
	* mi/mi-cmd-break.c (mi_argv_to_format): Handle double quotes.

2013-07-19  Hui Zhu  <hui@codesourcery.com>

	PR gdb/15692
	* gdb.mi/mi-dprintf.exp: Add double quotes test.
2013-07-19 07:26:46 +00:00
Alan Modra 0857ec5735 daily update 2013-07-19 00:00:04 +00:00
Yao Qi 1527aea867 gdb/
* target.c (update_current_target): Change the default action
	of 'to_traceframe_info' from tcomplain to return_zero.
	* target.h (struct target_ops) <to_traceframe_info>: Add more
	comments.
	* valops.c (read_value_memory): Call
	traceframe_available_memory unconditionally.

gdb/testsuite/

	* gdb.trace/read-memory.exp (test_from_remote): Update test.
	(teset_from_exec): Likewise.
2013-07-18 23:09:49 +00:00
Yao Qi 73c1d57e3e gdb/testsuite/
* gdb.trace/read-memory.c: New.
	* gdb.trace/read-memory.exp: New.
2013-07-18 23:04:00 +00:00
Yao Qi a075c3e55b gdb/testsuite/
* lib/gdb.exp (gdb_compile_shlib): Pass the tail name of
	$dest to link options if host is remote.  Move the
	generated file to $dest.a on host if host is remote.
2013-07-18 22:38:58 +00:00
Nick Clifton faf786e668 * ar.c (usage): Fix C conformance issue.
* config/tc-i386-intel.c (i386_intel_operand): Fixed signed vs
	unsigned comparison.
2013-07-18 16:12:35 +00:00
Will Newton 623cc28540 gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads.
On Ubuntu by default the compiler passes --as-needed to ld which
means no DT_NEEDED entry is added for libpthread when building
the TLS tests. This causes the test to fail as libpthread is
required to look up TLS variables. Add calls to pthread_testcancel
to make sure libpthread gets linked.

gdb/testsuite/ChangeLog:

2013-07-18  Will Newton  <will.newton@linaro.org>

	* gdb.threads/tls-nodebug.c: Call pthread_testcancel
	to ensure the test is linked against pthreads.
	* gdb.threads/tls-var-main.c: Likewise.
	* gdb.threads/tls-shared.c: Likewise.
2013-07-18 15:49:22 +00:00
Nick Clifton 39b0730382 * doc/binutils.texi (nm, objdump): Remove bogus links to STABS
documentation.
2013-07-18 15:39:21 +00:00
Nick Clifton df301bfc7c PR ld/15721
* elf32-msp430.c (R_MSP430_10_PCREL): Use 10-bit source and
	destination masks.
	* R_MSP430_2X_PCREL: Likewise.
	* R_MSP430X_10_PCREL: Likewise.
	* R_MSP430X_2X_PCREL: Likewise.
2013-07-18 14:08:42 +00:00
Nick Clifton eb1d270862 PR binutils/15728
* basic-ops.h: (SUBWORDSIQI) Make declaration static.
	* (SUBWORDSIHI): Likewise.
	* (SUBWORDDIQI): Likewise.
	* (SUBWORDDIHI): Likewise.
	* (SUBWORDDISI): Likewise.
2013-07-18 13:53:04 +00:00
Nick Clifton f0c0028234 * config/rx-defs.h: Add macros for RX100, RX200, RX600, and
RX610.
        * config/rx-parse.y: (rx_check_float_support): Add function to
	check floating point operation support for target RX100 and
	RX200.
        * config/tc-rx.c: Add CPU options RX100, RX200, RX600, and RX610.
        * doc/c-rx.texi: Add -mcpu option to recognize macros for RX100,
        RX200, RX600, and RX610
2013-07-18 12:15:15 +00:00
Nick Clifton 39f2162499 * elf32-arm.c (arm_type_of_stub): Don't use ST_BRANCH_TO_ARM for
thumb only targets.
        (elf32_arm_final_link_relocate): Likewise.

        * ld-arm/thumb-b-lks-sym.d: Updated to be more flexible.
        * ld-arm/thumb-bl-lks-sym.d: Likewise.
2013-07-18 12:00:26 +00:00