Commit Graph

69935 Commits

Author SHA1 Message Date
Tom Tromey 03de682319 * symtab.c (lookup_language_this): End loop if block is NULL. 2011-06-20 17:53:33 +00:00
H.J. Lu 185e39cdbd Adjust x86 IFUNC PLT.
2011-06-20  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-ifunc/ifunc-1-local-x86.d: Adjusted.
	* ld-ifunc/ifunc-1-x86.d: Likewise.
	* ld-ifunc/ifunc-3a-x86.d: Likewise.
2011-06-20 17:12:49 +00:00
Nick Clifton be07a3d39e * am33.igen (sub Rm,Rn,Rd): Fix computation of carry flag. 2011-06-20 16:50:51 +00:00
H.J. Lu ade78dba78 Revert x86_64-x32-* change.
gas/

2011-06-20  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Revert x32 change.

ld/

2011-06-20  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Revert x32 change.

ld/testsuite/

2011-06-20  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/eh1.d: Revert x32 change.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.
2011-06-20 13:23:22 +00:00
Jakub Jelinek e41b3a1379 PR ld/12570
include/
	* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
	option.
ld/
	* emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO,
	OPTION_NO_LD_GENERATED_UNWIND_INFO): Define.
	(gld${EMULATION_NAME}_handle_option): Handle
	--ld-generated-unwind-info and --no-ld-generated-unwind-info.
	* ld.texinfo (--ld-generated-unwind-info,
	--no-ld-generated-unwind-info): Document.
bfd/
	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
	at all for linker created .eh_frame sections.
	(_bfd_elf_discard_section_eh_frame): Handle linker created
	.eh_frame sections with no relocations.
	* elf64-x86-64.c: Include dwarf2.h.
	(elf_x86_64_eh_frame_plt): New variable.
	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
	PLT_FDE_LEN_OFFSET): Define.
	(struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
	(elf_x86_64_create_dynamic_sections): Create and fill in
	.eh_frame section for .plt section.
	(elf_x86_64_size_dynamic_sections): Write .plt section size
	into .eh_frame FDE covering .plt section.
	(elf_x86_64_finish_dynamic_sections): Write .plt section
	start into .eh_frame FDE covering .plt section.  Call
	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
	(elf_backend_plt_alignment): Define to 4.
	* elf32-i386.c: Include dwarf2.h.
	(elf_i386_eh_frame_plt): New variable.
	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
	PLT_FDE_LEN_OFFSET): Define.
	(struct elf_i386_link_hash_table): Add plt_eh_frame field.
	(elf_i386_create_dynamic_sections): Create and fill in
	.eh_frame section for .plt section.
	(elf_i386_size_dynamic_sections): Write .plt section size
	into .eh_frame FDE covering .plt section.
	(elf_i386_finish_dynamic_sections): Write .plt section
	start into .eh_frame FDE covering .plt section.  Call
	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
	(elf_backend_plt_alignment): Define to 4.
ld/testsuite/
	* ld-x86-64/x86-64.exp: Link some testcases with
	--no-ld-generated-unwind-info.
	* ld-x86-64/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
	comment.
	* ld-x86-64/tlsdesc.dd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlsdesc.sd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-x86-64/tlsbindesc.rd: Likewise.
	* ld-x86-64/tlsbindesc.sd: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsdesc.pd: Likewise.
	* ld-x86-64/tlsdesc.td: Likewise.
	* ld-x86-64/tlsbindesc.dd: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlsgdesc.rd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlsbindesc.td: Likewise.
	* ld-x86-64/tlspic.td: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/ilp32-4.d: Likewise.
	* ld-x86-64/tlsgdesc.dd: Add --no-ld-generated-unwind-info to ld
	comment.  Adjust.
	* ld-x86-64/tlsdesc.rd: Likewise.
	* ld-x86-64/tlsgd6.dd: Adjust.
	* ld-x86-64/tlsgd5.dd: Likewise.
	* ld-i386/i386.exp: Link some testcases with
	--no-ld-generated-unwind-info.
	* ld-i386/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
	comment..
	* ld-i386/tlsdesc.dd: Likewise.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlsdesc.sd: Likewise.
	* ld-i386/tlsgdesc.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-i386/tlsdesc.rd: Likewise.
	* ld-i386/tlsbindesc.rd: Likewise.
	* ld-i386/tlsbindesc.sd: Likewise.
	* ld-i386/tlsbin.td: Likewise.
	* ld-i386/tlsdesc.td: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsbindesc.dd: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsgdesc.rd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsbindesc.td: Likewise.
	* ld-i386/tlspic.td: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
2011-06-20 13:18:52 +00:00
Nick Clifton b47d265edb * doc/Makefile.am: (CPU_DOCS): Add c-xstormy16.texi.
* doc/Makefile.in: Regenerate.
	* doc/all.texi: Set XSTORMY16.
	* doc/c-xstormy16.texi: New file.
2011-06-20 10:27:56 +00:00
Alan Modra 135aeafb66 daily update 2011-06-20 00:00:05 +00:00
gdbadmin e7cce27aad *** empty log message *** 2011-06-20 00:00:03 +00:00
Ian Lance Taylor e1f74f9823 PR gold/12880
* layout.cc (Layout::attach_allocated_section_to_segment): Add a
	.interp section to a PT_INTERP segment even if we have seen a
	--dynamic-linker option.  Don't do it if we have seen a PHDRS
	clause in a linker script.
	(Layout::finalize): Don't create a .interp section if we've
	already create a PT_INTERP segment.
	(Layout::create_interp): Always call choose_output_section (revert
	patch of 2011-06-17).  Don't create PT_INTERP segment.
	* script-sections.cc
	(Script_sections::create_note_and_tls_segments): Add a .interp
	section to a PT_INTERP segment even if we have seen a
	--dynamic-linker option.
2011-06-19 22:09:17 +00:00
H.J. Lu 8b7789423c Fix misc x32 bugs.
bfd/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_backend_post_process_headers): Defined
	for x32.

binutils/testsuite/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/elfedit-1.d: Updated for x32.

gas/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Support x32.

ld/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Support x32.

ld/testsuite/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/eh1.d: Skip x32.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.

	* ld-elfvsb/elfvsb.exp: Only xfail 64bit x86_64-*-linux*.
	* ld-shared/shared.exp: Likewise.

	* ld-ifunc/ifunc-1-local-x86.d: Support x32.
	* ld-ifunc/ifunc-1-x86.d: Likewise.
	* ld-ifunc/ifunc-3a-x86.d: Likewise.
	* ld-x86-64/pcrel16.d: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add missing -melf_x86_64.
2011-06-19 21:22:16 +00:00
gdbadmin be47d07c72 *** empty log message *** 2011-06-19 00:00:33 +00:00
Ian Lance Taylor 766f91bb89 * layout.cc (Layout::finish_dynamic_section): Don't set DT_TEXTREL
merely because a non-PT_LOAD segment has a dynamic reloc.
2011-06-18 22:53:23 +00:00
Ian Lance Taylor 0d212c3a03 * layout.cc (Layout::finish_dynamic_section): Don't create
DT_FLAGS entry if not needed.
2011-06-18 22:34:24 +00:00
Ian Lance Taylor 911a507237 PR gold/12745
* layout.cc (Layout::layout_eh_frame): Correct handling of
	writable .eh_frame section.
2011-06-18 22:29:14 +00:00
Mike Frysinger 1f20b1457b sim: bfin: set ASTAT AV/AVS when shifting accumulators overflow
The LSHIFT/ASHIFT insns that work with accumulators lacked AV/AVS
handling in the ASTAT register, so add it to match the hardware.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 22:03:10 +00:00
Mike Frysinger b4876e0485 sim: bfin: do not touch ASTAT[V] when shifting accumulators
If we're shifting accumulators, we don't want to touch the V bit in
ASTAT, so add size checks to the ashiftrt/lshiftrt helpers.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 21:59:38 +00:00
Mike Frysinger d5fcd950e4 sim: bfin: do not extend accumulator in LSHIFT insns
The logical shift insn does not sign extend before shifting, so
we shouldn't either.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 21:58:08 +00:00
Mike Frysinger a56a195412 sim: bfin: tweak saturation handling with TFU/FU modes and MM bit
This too should have been squashed into an earlier change.  It covers
a few more cases in the V/VS saturation patch when working with TFU
and FU modes of dsp insns.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 21:22:50 +00:00
Mike Frysinger 90e13d65c1 sim: bfin: handle large shift values with accumulator shift insns
When the shift magnitude exceeds 32 bits, the values rotate around (since
the hardware is actually a barrel shifter).  So handle this edge case,
update the corresponding AV bit in ASTAT which was missing previously,
and tweak the AZ setting based on how the hardware behaves.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 20:59:54 +00:00
Mike Frysinger 99dcc4dc65 sim: bfin: handle odd shift values with shift insns
The shift magnitude is a 5-bit signed value.  When it is between 0 and
15, then we do the requested shift, but when it is outside of that, we
have to do the opposite.

That means we flip between lshift and ashiftrt to match the hardware.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 20:59:24 +00:00
Mike Frysinger 4bd2c0c31c sim: bfin: add tests for recent dsp fixes
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 20:27:26 +00:00
Mike Frysinger a0a71a7f8b sim: bfin: fix M_IH saturation size
This reverts the previous commit and does it right.  This change got
lost in the shuffle of patches I have pending.

Basically the logic is to change the 32bit saturation (and then masked
to 16bits) to a proper 16bit saturation.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 20:10:57 +00:00
Mike Frysinger 388aa9fe20 sim: bfin: handle V/VS saturation in dsp mac insns
Some saturation cases with dsp mac insns were not setting the V flag.
So implement that part and split up the logic between the dual macs.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 20:04:32 +00:00
Mike Frysinger f2a56d0ad7 sim: bfin: handle the MM flag in M_IU/M_TFU modes with dsp insns
Our handling of the M_IU/M_TFU modes are missing signed saturation when
the MM flag is set, so add it to match the hardware behavior.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 19:44:14 +00:00
Mike Frysinger ef26d60eba sim: bfin: fix sign extension in dsp insns with MM flag
After testing the hardware with all the different dsp flags, the MM flag
triggers sign extension in all modes.  So drop the limited use of it, and
the local custom helper that was also extending unsigned values.  We also
can see that the flag checks in the mult/mac insns have the same behavior
with sign extending, so add a helper func to keep the logic the same in
both places.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 19:42:55 +00:00
Mike Frysinger 075a845a92 sim: bfin: fix dsp insns IH saturation/rounding behavior
When using the IH modifier, we need to first saturate the value before
rounding it, and then further saturate it a bit more.  This makes the
sim match the hardware behavior with these insns.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 19:24:57 +00:00
Mike Frysinger b02cc5b9df sim: bfin: fix inverted changelog entry 2011-06-18 18:09:35 +00:00
Mike Frysinger 73aae8efb2 sim: bfin: fix accumulator edge case saturation
When the accumulator saturates, it needs to be greater than, but not
equal to, the largest unsigned value as this is what the hardware does.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 17:27:01 +00:00
Mike Frysinger 886ea33b69 sim: bfin: use freeargv for freeing argvs
Since the argv array was allocated with dupargv, it needs to be freed
with freeargv to avoid leaks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 17:20:38 +00:00
Mike Frysinger 8fb8dca73e opcodes: blackfin: fix style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 06:43:57 +00:00
gdbadmin 2b8ef54e82 *** empty log message *** 2011-06-18 00:00:33 +00:00
Alan Modra 10a1902637 daily update 2011-06-18 00:00:05 +00:00
Tom Tromey 66a17cb629 * valops.c (value_of_this): Use lookup_language_this.
* symtab.h (lookup_language_this): Declare.
	* symtab.c (lookup_language_this): New function.
	(lookup_symbol_aux): Use lookup_language_this.
	* ax-gdb.c (gen_expr) <OP_THIS>: Use lookup_language_this.
2011-06-17 20:46:47 +00:00
Tom Tromey 7518bff55a * value.h (value_of_this): Update.
(value_of_local): Remove.
	* valops.c (value_of_this): Rename from value_of_local.  Change
	parameters.
	* p-exp.y (exp): Update.
	(variable): Likewise.
	* eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.
2011-06-17 20:35:09 +00:00
Tom Tromey aee28ec61a * valops.c (value_of_local): Complain if NAME is NULL.
* std-operator.def (OP_OBJC_SELF): Remove.
	* parse.c (operator_length_standard) <OP_OBJC_SELF>: Remove.
	* objc-exp.y (name_not_typename): Use OP_THIS.
	* expprint.c (print_subexp_standard) <OP_THIS>: Print language's
	name for "this".
	<OP_OBJC_SELF>: Remove.
	* eval.c (evaluate_subexp_standard) <OP_OBJC_SELF>: Remove.
2011-06-17 20:24:22 +00:00
Andreas Schwab 563002680c * Makefile.am (MAINTAINERCLEANFILES): Move s390-opc.tab ...
(MOSTLYCLEANFILES): ... here.
* Makefile.in: Regenerate.
2011-06-17 15:06:46 +00:00
Ian Lance Taylor 534b4e5f33 PR gold/12893
* resolve.cc (Symbol_table::resolve): Don't give an error if a
	symbol is redefined with the exact same object and value.
2011-06-17 13:31:33 +00:00
Ian Lance Taylor 10b4f10252 PR gold/12880
* layout.h (class Layout): Add interp_segment_ field.
	* layout.cc (Layout::Layout): Initialize interp_segment_ field.
	(Layout::attach_allocated_section_to_segment): If making shared
	library, put .interp section in PT_INTERP segment.
	(Layout::finalize): Also call create_interp if -dynamic-linker
	option was used.
	(Layout::create_interp): Assert that there is no PT_INTERP
	segment.  If not using a SECTIONS clause, use make_output_section.
	(Layout::make_output_segment): Set interp_segment_ if PT_INTERP.
	* script-sections.cc
	(Script_sections::create_note_and_tls_segments): If making shared
	library, put .interp section in PT_INTERP segment.
2011-06-17 13:00:01 +00:00
Ian Lance Taylor e588ea8da0 * object.cc (Sized_relobj_file::do_layout): Keep warning sections
when making a shared library.
2011-06-17 11:20:42 +00:00
Ian Lance Taylor a29b0dada9 * x86_64.cc (check_non_pic): Add gsym parameter. Change all
callers.  Don't issue warning about PC32 against locally defined
	symbol.
2011-06-17 11:15:34 +00:00
gdbadmin 9c92b47c98 *** empty log message *** 2011-06-17 00:00:32 +00:00
Alan Modra d7ec8fe0c3 daily update 2011-06-17 00:00:05 +00:00
H.J. Lu 8fd79e71a1 Suport x32 gcore.
2011-06-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
	CORE_HEADER is defined.
	(elf_x86_64_write_core_note): New.
	(elf_backend_write_core_note): Likewise.

	* hosts/x86-64linux.h (uint64_t): New.
	(user_regsx32_struct): Likewise.
	(elf_gregx32_t): Likewise.
	(ELF_NGREGX32): Likewise.
	(elf_gregsetx32_t): Likewise.
	(elf_prstatusx32): Likewise.
	(prstatusx32_t): Likewise.
	(user_fpregs32_struct): Removed.
	(user_fpxregs32_struct): Likewise.
	(user32): Likewise.
	(elf_fpregset32_t): Likewise.
	(elf_fpxregset32_t): Likewise.
	(prgregset32_t): Likewise.
	(prfpregset32_t): Likewise.
2011-06-16 22:08:12 +00:00
Ian Lance Taylor 9d3b06987a * symtab.cc (Warnings::issue_warning): Don't warn if relocation
occurs in same object.
2011-06-16 17:55:48 +00:00
H.J. Lu bcd823f19e Support x32 core dump.
2011-06-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
	(elf_x86_64_grok_psinfo): Likewise.
2011-06-16 17:42:59 +00:00
Tom Tromey af61e67f31 * dwarf-mode.el (dwarf-do-insert-substructure): Call
expand-file-name.
	(dwarf-do-refresh): Likewise.
2011-06-16 16:39:23 +00:00
Nick Clifton a06c7d5acb * elf.c (elf_find_function): Fail if not provided with a symbol
table.
2011-06-16 12:34:19 +00:00
Tristan Gingold eed8f803b1 2011-06-16 Tristan Gingold <gingold@adacore.com>
* python/py-events.h (gdb_py_events): Make it extern.
	* python/py-evtregistry.c (gdb_py_events): Declare.
2011-06-16 05:54:09 +00:00
Hui Zhu 864ac8a76c 2011-06-16 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add check for
	remote_protocol_packets[PACKET_qXfer_traceframe_info].support before
	output warning.
2011-06-16 02:19:44 +00:00
Alan Modra 6f1683b9c0 * ld-elfvers/vers2.ver: Don't assume any particular index for
version reference.
	* ld-elfvers/vers3.ver: Likewise.
	* ld-elfvers/vers19.ver: Likewise.
	* ld-elfvers/vers22.ver: Likewise.
	* ld-elfvers/vers27d4.ver: Likewise.
	* ld-elfvers/vers28c.ver: Likewise.
2011-06-16 00:42:06 +00:00