deliverable/binutils-gdb.git
8 years agoAdd EM_IAMCU support to gold
H.J. Lu [Tue, 13 Oct 2015 16:02:23 +0000 (09:02 -0700)] 
Add EM_IAMCU support to gold

elfcpp/

PR gold/19118
* elfcpp.h (EM): Add EM_IAMCU.

gold/

PR gold/19118
* i386.cc (Target_iamcu): New class.
(Target_selector_iamcu): Likewise.
(Target_iamcu::iamcu_info): New variable.
(target_selector_iamcu): Likewise.

8 years agoUpdated Chinese translation for the linker.
Nick Clifton [Tue, 13 Oct 2015 13:32:44 +0000 (14:32 +0100)] 
Updated Chinese translation for the linker.

* po/zh_TW.po: Updated Chinese translation.

8 years agoTidy code setting PT_GNU_RELRO p_flags
Alan Modra [Tue, 13 Oct 2015 05:48:56 +0000 (16:18 +1030)] 
Tidy code setting PT_GNU_RELRO p_flags

No functional changes here.

* elf.c (_bfd_elf_map_sections_to_segments): Don't set
PT_GNU_RELRO p_flags.
(assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
flags to PF_R here.

8 years agosim: ft32: test coverage for link parameters and PM write port
James Bowman [Wed, 7 Oct 2015 15:19:08 +0000 (15:19 +0000)] 
sim: ft32: test coverage for link parameters and PM write port

Adds test coverage for recent features.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Oct 2015 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agogdb: Simplify parse_frame_specification.
Andrew Burgess [Mon, 7 Sep 2015 08:15:15 +0000 (09:15 +0100)] 
gdb: Simplify parse_frame_specification.

Remove an unneeded parameter from parse_frame_specification, replace
with a fixed string within parse_frame_specification.  The message was
the same in every place that parse_frame_specification was used anyway.

gdb/ChangeLog:

* stack.c (parse_frame_specification): Remove message parameter,
replace with fixed string in function body, update function
comment.
(frame_info): Remove message to parse_frame_specification.
(select_frame_command): Likewise.

8 years agogdb: Avoid unneeded calls to parse_frame_specification.
Andrew Burgess [Mon, 7 Sep 2015 08:04:07 +0000 (09:04 +0100)] 
gdb: Avoid unneeded calls to parse_frame_specification.

Within the stack command there are a couple of places where fixed
strings are passed into functions that are really intended for
processing user input.  These fixed strings are then processed and the
result returned.

Given that the input strings in these cases are fixed, and are always
"0", then the result will always be the same, the current frame.  By
switching to using get_current_frame instead the code can be simplified,
and the intention of the code is clearer.

gdb/ChangeLog:

* stack.c (parse_frame_specification): Delete.
(parse_frame_specification_1): Rename to
parse_frame_specification.
(frame_info): Use parse_frame_specification.
(select_frame_command): Likewise.
(return_command): Use select_frame and print_stack_frame rather
than frame_command and select_frame_command.
(func_command): Use get_current_frame rather than
parse_frame_specification.

8 years agogdb: Fix bug with dbx style func command.
Andrew Burgess [Mon, 7 Sep 2015 07:53:24 +0000 (08:53 +0100)] 
gdb: Fix bug with dbx style func command.

The func command, available when starting gdb in dbx mode, is supposed
to take a function name and locate the frame for that function in the
stack.  This has been broken for a while due to an invalid check of the
arguments within the worker function.  Fixed in this commit.

gdb/ChangeLog:

* stack.c (func_command): Return early when there is no ARG
string.

gdb/testsuite/ChangeLog:

* gdb.base/dbx.exp (test_func): Remove xfails, update expected
results.

8 years agogdb/doc: Restructure frame command documentation.
Andrew Burgess [Thu, 10 Sep 2015 16:59:58 +0000 (17:59 +0100)] 
gdb/doc: Restructure frame command documentation.

The 'frame' command is documented in two places.  The 'select-frame'
command is only mentioned in one of these places.

Of the two places, having the description of 'frame' and 'select-frame'
in the section 'Selecting a Frame' seems like the most obvious choice,
which is where things like 'up' and 'down' are also documented.

This commit moves the documentation of 'frame' and 'select-frame' into
the 'Selecting a Frame' section, and removes the duplicate documentation
of the 'frame' command.

At the same time I have reordered the sections in the 'Examining the
Stack' chapter, moving the discussion of frame filters to the end of the
chapter; it feels odd that we talk about frame filters before such basic
things like navigating the stack, or examining stack frames in general.

gdb/doc/ChangeLog:

* gdb.texinfo (Frames): Remove 'frame' and 'select-frame'
description.
(Frame Filter Management): Move to later in the 'Examining the
Stack' chapter.
(Selection): Add entry for 'select-frame'.

8 years agogdb: Make use of safe-ctype.h header.
Andrew Burgess [Mon, 7 Sep 2015 22:46:49 +0000 (23:46 +0100)] 
gdb: Make use of safe-ctype.h header.

In stack.c switch to using safe-ctype.h instead of ctype.h, update code
as required.

gdb/ChangeLog:

* stack.c: Include safe-ctype.h not ctype.h.
(parse_frame_specification): Use ISSPACE not isspace.
(backtrace_command): Use TOLOWER not tolower.

8 years agomep: Add cast for int to enum conversion
Simon Marchi [Mon, 12 Oct 2015 16:43:23 +0000 (12:43 -0400)] 
mep: Add cast for int to enum conversion

Taken directly from Pedro's branch.

gdb/ChangeLog:

* mep-tdep.c (current_me_module): Add cast.
(mep_gdbarch_init): Likewise.

8 years agom32c: Split m32c_move_reg_t in read/write variants
Simon Marchi [Mon, 12 Oct 2015 16:39:40 +0000 (12:39 -0400)] 
m32c: Split m32c_move_reg_t in read/write variants

This allows to avoid casting away the const qualification in
m32c_pseudo_register_write (which is the entry points for all other
register read/write functions).

Also, use gdb_byte* instead of void* to avoid casts when calling gdb
common memory functions.  It also allows to remove those "For adderss
arithmetic" local variables.

gdb/ChangeLog:

* m32c-tdep.c (m32c_move_reg_t): Replace with...
(m32c_write_reg_t): ...this and...
(m32c_read_reg_t): ...this.
(struct m32c_reg): Update types of read and write.
(m32c_raw_read): Change declaration type to m32c_read_reg_t and
adjust definition.
(m32c_banked_read): Likewise.
(m32c_sb_read): Likewise.
(m32c_part_read): Likewise.
(m32c_cat_read): Likewise.
(m32c_r3r2r1r0_read): Likewise.
(m32c_raw_write): Change declaration type to m32c_write_reg_t
and adjust definition.
(m32c_banked_write): Likewise.
(m32c_sb_write): Likewise.
(m32c_part_write): Likewise.
(m32c_cat_write): Likewise.
(m32c_r3r2r1r0_write): Likewise.

8 years agoaarch64: Add cast for integer to enum cast
Simon Marchi [Mon, 12 Oct 2015 16:24:38 +0000 (12:24 -0400)] 
aarch64: Add cast for integer to enum cast

/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c: In function â€˜int aarch64_linux_syscall_record(regcache*, long unsigned int)’:
/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:904:57: error: invalid conversion from â€˜long unsigned int’ to â€˜aarch64_syscall’ [-fpermissive]
   syscall_gdb = aarch64_canonicalize_syscall (svc_number);
                                                         ^
/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:645:1: note:   initializing argument 1 of â€˜gdb_syscall aarch64_canonicalize_syscall(aarch64_syscall)’
 aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number)
 ^

gdb/ChangeLog:

* aarch64-linux-tdep.c (aarch64_linux_syscall_record): Add cast.

8 years agoaarch64: Use gdb_sys_no_syscall enum instead of -1
Simon Marchi [Mon, 12 Oct 2015 16:24:37 +0000 (12:24 -0400)] 
aarch64: Use gdb_sys_no_syscall enum instead of -1

Fixes:

/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c: In function "gdb_syscall aarch64_canonicalize_syscall(aarch64_syscall)":
/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:874:13: error: invalid conversion from "int" to "gdb_syscall" [-fpermissive]
     return -1;
             ^

gdb/ChangeLog:

* aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Return
gdb_sys_no_syscall instead of -1.

8 years agoSkip the unversioned definition after the default version
H.J. Lu [Mon, 12 Oct 2015 11:55:24 +0000 (04:55 -0700)] 
Skip the unversioned definition after the default version

We may see an unversioned definition after the default version.  We
should skip the unversioned definition in this case.

bfd/

PR ld/19073
* elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
definition after the default version.

ld/testsuite/

PR ld/19073
* ld-elf/pr19073.map: New file.
* ld-elf/pr19073.rd: Likewise.
* ld-elf/pr19073.s: Likewise.
* ld-elf/shared.exp (build_tests): Add tests for PR ld/19073.

8 years agoUpdate list of known MSP430 MCU names.
Nick Clifton [Mon, 12 Oct 2015 10:51:05 +0000 (11:51 +0100)] 
Update list of known MSP430 MCU names.

* config/tc-msp430.c (msp430_mcu_names): Rename to
msp430_mcu_data.  Add fields for the ISA and hardware multiply
support.  Update with information from the latest devices.csv
file.
(md_parse_option): Make use of the new array.

8 years agoMention the change in NEWS
Yao Qi [Mon, 12 Oct 2015 10:28:39 +0000 (11:28 +0100)] 
Mention the change in NEWS

gdb:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* NEWS: Mention the change.

8 years agoRename emit_load_store to aarch64_emit_load_store
Yao Qi [Mon, 12 Oct 2015 10:28:39 +0000 (11:28 +0100)] 
Rename emit_load_store to  aarch64_emit_load_store

Likewise, this patch renames emit_load_store to
aarch64_emit_load_store.

gdb:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* arch/aarch64-insn.c (emit_load_store): Rename to ...
(aarch64_emit_load_store): ... it.  All callers updated.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c: Update all callers as emit_load_store
is renamed to aarch64_emit_load_store.

8 years agoRename emit_insn to aarch64_emit_insn
Yao Qi [Mon, 12 Oct 2015 10:28:39 +0000 (11:28 +0100)] 
Rename emit_insn to aarch64_emit_insn

As emit_insn becomes extern, the prefix "aarch64_" is needed.  This
patch renames emit_insn to aarch64_emit_insn.

gdb:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* arch/aarch64-insn.c (emit_insn): Rename to ...
(aarch64_emit_insn): ... it.  All callers updated.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c: Update all callers of function renaming
from emit_insn to aarch64_emit_insn.

8 years agoNew test case gdb.arch/disp-step-insn-reloc.exp
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
New test case gdb.arch/disp-step-insn-reloc.exp

This patch adds a new test case which uses gdb.arch/insn-reloc.c too
to test displaced stepping.  Nowadays, tests are for x86, x86_64 and
aarch64.

gdb/testsuite:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* gdb.arch/disp-step-insn-reloc.exp: New test case.

8 years agoSupport displaced stepping in support_displaced_stepping for aarch64*-*-linux*
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Support displaced stepping in support_displaced_stepping for aarch64*-*-linux*

gdb/testsuite:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* lib/gdb.exp (support_displaced_stepping): Return 1 if target
is aarch64*-*-linux*.

8 years agoSupport displaced stepping in aarch64-linux
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Support displaced stepping in aarch64-linux

This patch is to support displaced stepping in aarch64-linux.  A
visitor is implemented for displaced stepping, and used to record
information to fixup pc after displaced stepping if needed.  Some
emit_* functions are converted to macros, and moved to
arch/aarch64-insn.{c,h} so that they can be shared.

gdb:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* aarch64-linux-tdep.c: Include arch-utils.h.
(aarch64_linux_init_abi): Call set_gdbarch_max_insn_length,
set_gdbarch_displaced_step_copy_insn,
set_gdbarch_displaced_step_fixup,
set_gdbarch_displaced_step_free_closure,
set_gdbarch_displaced_step_location,
and set_gdbarch_displaced_step_hw_singlestep.
* aarch64-tdep.c (struct displaced_step_closure): New.
(struct aarch64_displaced_step_data): New.
(aarch64_displaced_step_b): New function.
(aarch64_displaced_step_b_cond): Likewise.
(aarch64_register): Likewise.
(aarch64_displaced_step_cb): Likewise.
(aarch64_displaced_step_tb): Likewise.
(aarch64_displaced_step_adr): Likewise.
(aarch64_displaced_step_ldr_literal): Likewise.
(aarch64_displaced_step_others): Likewise.
(aarch64_displaced_step_copy_insn): Likewise.
(aarch64_displaced_step_fixup): Likewise.
(aarch64_displaced_step_hw_singlestep): Likewise.
* aarch64-tdep.h (DISPLACED_MODIFIED_INSNS): New macro.
(aarch64_displaced_step_copy_insn): Declare.
(aarch64_displaced_step_fixup): Declare.
(aarch64_displaced_step_hw_singlestep): Declare.
* arch/aarch64-insn.c (emit_insn): Moved from
gdbserver/linux-aarch64-low.c.
(emit_load_store): Likewise.
* arch/aarch64-insn.h (enum aarch64_opcodes): Moved from
gdbserver/linux-aarch64-low.c.
(struct aarch64_register): Likewise.
(struct aarch64_memory_operand): Likewise.
(ENCODE): Likewise.
(can_encode_int32): New macro.
(emit_b, emit_bcond, emit_cb, emit_ldr, emit_ldrsw): Likewise.
(emit_tb, emit_nop): Likewise.
(emit_insn): Declare.
(emit_load_store): Declare.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (enum aarch64_opcodes): Move to
arch/aarch64-insn.h.
(struct aarch64_memory_operand): Likewise.
(ENCODE): Likewise.
(emit_insn): Move to arch/aarch64-insn.c.
(emit_b, emit_bcond, emit_cb, emit_tb): Remove.
(emit_load_store): Move to arch/aarch64-insn.c.
(emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
(can_encode_int32): Remove.

8 years agoMove aarch64_relocate_instruction to arch/aarch64-insn.c
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Move aarch64_relocate_instruction to arch/aarch64-insn.c

This patch moves aarch64_relocate_instruction and visitor class to
arch/aarch64-insn.c, so that both GDB and GDBserver can use it.

gdb:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* arch/aarch64-insn.c (aarch64_decode_ldr_literal): Moved from
gdbserver/linux-aarch64-low.c.
(aarch64_relocate_instruction): Likewise.
* arch/aarch64-insn.h (aarch64_decode_ldr_literal): Declare.
(struct aarch64_insn_data): Moved from
gdbserver/linux-aarch64-low.c.
(struct aarch64_insn_visitor): Likewise.
(aarch64_relocate_instruction): Declare.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (extract_signed_bitfield): Remove.
(aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
(aarch64_relocate_instruction): Likewise.
(struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
(struct aarch64_insn_visitor): Likewise.

8 years agoUse visitor in aarch64_relocate_instruction
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Use visitor in aarch64_relocate_instruction

Nowadays, the instruction decodings and handling are mixed together
inside aarch64_relocate_instruction.  The patch decouples instruction
decoding and instruction handling by using visitor pattern.  That is,
aarch64_relocate_instruction decode instructions and visit each
instruction by different visitor methods.  Each visitor defines the
concrete things to different instructions.  Fast tracepoint instruction
relocation and displaced stepping can define their own visitors,
sub-class of struct aarch64_insn_data.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (struct aarch64_insn_data): New.
(struct aarch64_insn_visitor): New.
(struct aarch64_insn_relocation_data): New.
(aarch64_ftrace_insn_reloc_b): New function.
(aarch64_ftrace_insn_reloc_b_cond): Likewise.
(aarch64_ftrace_insn_reloc_cb): Likewise.
(aarch64_ftrace_insn_reloc_tb): Likewise.
(aarch64_ftrace_insn_reloc_adr): Likewise.
(aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
(aarch64_ftrace_insn_reloc_others): Likewise.
(visitor): New.
(aarch64_relocate_instruction): Use visitor.

8 years agoMove append_insns out of aarch64_relocate_instruction
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Move append_insns out of aarch64_relocate_instruction

aarch64_relocate_instruction should only decode instructions, and other
operations should be done out side of it.  This patch moves append_insns
out of aarch64_relocate_instruction, to its caller.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (aarch64_relocate_instruction): Return
int.  Add argument buf.
(aarch64_install_fast_tracepoint_jump_pad): Pass buf to
aarch64_relocate_instruction.

8 years agoMove target_read_uint32 out of aarch64_relocate_instruction
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
Move target_read_uint32 out of aarch64_relocate_instruction

This patch is to move target_read_uint32 out of
aarch64_relocate_instruction and pass INSN to
aarch64_relocate_instruction, so that it is cleaner, only decode
instructions.

gdb/gdbserver:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (aarch64_relocate_instruction): Add
argument insn.  Remove local variable insn.  Don't call
target_read_uint32.
(aarch64_install_fast_tracepoint_jump_pad): Call
target_read_uint32.

8 years agoMore tests in gdb.arch/insn-reloc.c
Yao Qi [Mon, 12 Oct 2015 10:28:38 +0000 (11:28 +0100)] 
More tests in gdb.arch/insn-reloc.c

This patch adds more tests in gdb.arch/insn-reloc.c to cover
instruction BL and cover B.CON when CON is false.  These new added
tests can be used for displaced stepping too.

gdb/testsuite:

2015-10-12  Yao Qi  <yao.qi@linaro.org>

* gdb.arch/insn-reloc.c (can_relocate_bcond): Rename to ...
(can_relocate_bcond_true): ... it.
(can_relocate_bcond_false): New function.
(foo): Likewise.
(can_relocate_bl): Likewise.
(testcases) [__aarch64__]: Add can_relocate_bcond_false and
can_relocate_bl.

8 years agoForward VALUE_LVAL when avoiding side effects for STRUCTOP_STRUCT
Pierre-Marie de Rodat [Tue, 15 Sep 2015 13:46:17 +0000 (15:46 +0200)] 
Forward VALUE_LVAL when avoiding side effects for STRUCTOP_STRUCT

Assume foo_array is a pointer to a C structure. GDB must evaluate the
following expression properly, but it does not currently:

    (gdb) print 1 && &foo_array[1].a
    Attempt to take address of value not located in memory.

The problem is that in EVAL_AVOID_SIDE_EFFECTS mode,
eval.c:evaluate_subexp_standard always returns a not_lval value as the
result for a STRUCTOP_STRUCT operation. As a consequence, the rest of
the code believes that one cannot take the address of the returned
value.

This patch fixes STRUCTOP_STRUCT handling so that the VALUE_LVAL
attribute for the returned value is properly initialized.  After this
change, the above session becomes:

    (gdb) print 1 && &foo_array[1].a
    $1 = 1

gdb/ChangeLog:

* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT>: If
EVAL_AVOID_SIDE_EFFECTS mode, forward the VALUE_LVAL attribute
to the returned value.

gdb/testsuite/ChangeLog:

* gdb.base/nested-addr.c: New file.
* gdb.base/nested-addr.exp: New testcase.

Tested on x86_64-linux, no regression.

8 years agoavr: Fix bugs in org/align tracking.
Andrew Burgess [Wed, 7 Oct 2015 19:47:38 +0000 (20:47 +0100)] 
avr: Fix bugs in org/align tracking.

This commit fixes a few issues in the mechanism for passing information
about ".org" and ".align" directives from the assembler to the linker,
used by the avr target.

In the original commit fdd410ac7a07dfb47dcb992201000582a280d8b2, there
were some mistakes when writing out information about ".align"
directives:
  - An align with fill does not write out its information correctly, the
    fill data overwrites the alignment data.
  - Each alignment directive is recorded at the location where the
    previous alignment directive should be recorded, the first alignment
    directive is discarded.

In commit 137c83d69fad77677cc818593f9399caa777a0c5, the data produced by
objdump is not correct:
   - It's miss-aligned due to a missing whitespace.
   - The fill data for align with fill records is not displayed
     correctly.

All of the above issues are addressed in this commit, and the test is
improved to cover these cases.

binutils/ChangeLog:

* od-elf32_avr.c (elf32_avr_dump_avr_prop): Fix printing of align
specific data, fix formatting for align and org data.

gas/ChangeLog:

* config/tc-avr.c (avr_output_property_record): Fix overwrite bug
for align and fill records.
(avr_handle_align): Record fill information for align frags.
(create_record_for_frag): Add next frag assertion, use correct
address for align records.

gas/testsuite/ChangeLog:

* gas/avr/avr-prop-1.s: Use fill in some cases.
* gas/avr/avr-prop-1.d: Update expected results.

8 years agoPR19083 S/390: Fix garbage collection of some GOT relocs.
Andreas Krebbel [Mon, 12 Oct 2015 08:21:51 +0000 (10:21 +0200)] 
PR19083 S/390: Fix garbage collection of some GOT relocs.

bfd/ChangeLog:

2015-10-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR ld/19083
* elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
refcount for relocs not really requiring a got slot.
* elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoIgnore references with relocs to discarded sections in .data.rel.ro.local on hppa...
John David Anglin [Sun, 11 Oct 2015 22:49:08 +0000 (18:49 -0400)] 
Ignore references with relocs to discarded sections in .data.rel.ro.local on hppa-linux.

8 years agosim: moxie: fix leakage in error path [BZ #18273]
Mike Frysinger [Sun, 11 Oct 2015 07:56:22 +0000 (03:56 -0400)] 
sim: moxie: fix leakage in error path [BZ #18273]

Reported-by: dcb <dcb314@hotmail.com>
8 years agosim: bfin: handle negative left saturated shifts as ashifts [BZ #18407]
Mike Frysinger [Sun, 11 Oct 2015 07:32:11 +0000 (03:32 -0400)] 
sim: bfin: handle negative left saturated shifts as ashifts [BZ #18407]

When handling left saturated ashifts with negative immediates, they
should be treated as right ashifts.  This matches hardware behavior.

Reported-by: Igor Rayak <igorr@gitatechnologies.com>
8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoBug 19113 - read.c stringer assertion
Alan Modra [Sat, 10 Oct 2015 00:18:05 +0000 (10:48 +1030)] 
Bug 19113 - read.c stringer assertion

Fails due to signed char promotion.

PR gas/19113
* read.c (next_char_of_string): Mask char after escape.  Use
CHAR_MASK rather than 0xff.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years ago[Ada] ada_unpack_from_contents: Error if target buffer not large enough
Joel Brobecker [Fri, 9 Oct 2015 21:16:45 +0000 (14:16 -0700)] 
[Ada] ada_unpack_from_contents: Error if target buffer not large enough

This adds a guard that the size of the "unpacked" buffer is large enough
to contain at least BIT_SIZE bits.  If not, report an error.  This is to
guard this routine from doing buffer overflows when called incorrectly.

gdb/ChangeLog:

        * ada-lang.c (ada_unpack_from_contents): Add guard that unpacked
        is large enough for BIT_SIZE.  Update function comment.

8 years ago[Ada] Buffer overflow in ada_unpack_from_contents
Joel Brobecker [Fri, 9 Oct 2015 21:15:16 +0000 (14:15 -0700)] 
[Ada] Buffer overflow in ada_unpack_from_contents

This patch fixes a buffer overflow in ada_unpack_from_contents
caused by one of the previous commits. This happens when trying
to print the value of an array of variant records.

The overflow happens while trying to print one element of the array.
Because the size of each element in the array is variable, the array
has a DWARF byte_stride attribute, which makes us treat the array
as if it was packed. And during the extraction of each array element,
we try to unpack an object using the array's byte stride as the size,
into an element whose size is actually less than the stride.

This patch fixes the issue by overriding the byte-stride with
the actual element's length.

gdb/ChangeLog:

        * ada-lang.c (ada_value_primitive_packed_val): Move
        src_len variable to local block where used.  Override
        BIT_SIZE if bigger than size of resolved type.

8 years agomake is_scalar_type non-static and use it in ada-lang.c
Joel Brobecker [Fri, 9 Oct 2015 21:14:43 +0000 (14:14 -0700)] 
make is_scalar_type non-static and use it in ada-lang.c

Just a small cleanup, to avoid code duplication...

gdb/ChangeLog:

        * gdbtypes.h (is_scalar_type): Add extern declaration.
        * gdbtypes.c (is_scalar_type): Make non-static.
        * ada-lang.c (ada_value_primitive_packed_val): Use is_scalar_type
        to compute IS_SCALAR instead of doing it ourselves.

8 years ago[Ada] Better handling of dynamic types in ada_value_primitive_packed_val
Joel Brobecker [Fri, 9 Oct 2015 21:13:49 +0000 (14:13 -0700)] 
[Ada] Better handling of dynamic types in ada_value_primitive_packed_val

There is some partial handling for dynamic types in
ada_value_primitive_packed_val, but this support was added
in a fairly ad hoc way, and actually only covered the situation
where OBJ is not NULL and its contents had not been fetched yet.
In addition, even in the cases that it does cover, it doesn't make
much sense. In particular, it was adjusting BIT_SIZE and SRC_LEN,
which are properties of the data to be extracted _from_, based
on TYPE's length once resolved, which is a property of the data
we want to extract _to_.

This patch hopefully adjust this function to handle dynamic types
correctly, and in all cases. It does so by unpacking the data into
a temporary buffer in order to use that buffer to resolve the type.
And _then_ creates the resulting value from that resolved type.

gdb/ChangeLog:

        * ada-lang.c (ada_value_primitive_packed_val): Rework handling
        of case where TYPE is dynamic.

8 years ago[Ada] split data unpacking code out of ada_value_primitive_packed_val.
Joel Brobecker [Fri, 9 Oct 2015 21:12:51 +0000 (14:12 -0700)] 
[Ada] split data unpacking code out of ada_value_primitive_packed_val.

This patch is just preparation work which splits the function
ada_value_primitive_packed_val into two function: one which unpacks
the data, and the other which now uses it to implement
ada_value_primitive_packed_val.

This simplifies a bit ada_value_primitive_packed_val, but will also
allow us to use the new function to unpack data without actually creating
a struct value as a result.

gdb/ChangeLog:

        * ada-lang.c (ada_unpack_from_contents): New function,
        extracted from ada_value_primitive_packed_val.
        (ada_value_primitive_packed_val): Replace extracted out code
        by call to ada_unpack_from_contents.

8 years agoReorder variable declarations in ada_value_primitive_packed_val
Joel Brobecker [Fri, 9 Oct 2015 21:12:29 +0000 (14:12 -0700)] 
Reorder variable declarations in ada_value_primitive_packed_val

This patch just changes the order in which local variables are declared
so as to group the logically-related variables together.  No code
change otherwise.

gdb/ChangeLog:

        * ada-lang.c (ada_value_primitive_packed_val): Reorder local
        variable declarations.

8 years agouse gdb_byte in ada-lang.c::ada_value_primitive_packed_val...
Joel Brobecker [Fri, 9 Oct 2015 21:10:18 +0000 (14:10 -0700)] 
use gdb_byte in ada-lang.c::ada_value_primitive_packed_val...

... instead of "unsigned char".

gdb/Changelog:

        * ada-lang.c (ada_value_primitive_packed_val): Change the type
        of local variables src and unpacked to "gdb_type *" instead of
        "unsigned char *".

8 years agoMore explicit local variable names in ada_value_primitive_packed_val
Joel Brobecker [Fri, 9 Oct 2015 21:10:03 +0000 (14:10 -0700)] 
More explicit local variable names in ada_value_primitive_packed_val

A number of local variables declared in ada_value_primitive_packed_val
have a name that could, IMO, be improved to, either: Be more explicit
about what the variable is about (Eg: "src" is an index, so rename it
to "src_idx"); or be more consistent with other variables that they
relate to: for instance, several variables refer to the source via
"src" (Eg: srcBitsLeft, nsrc), but the buffer they refer to is called
"bytes", so patch renames "bytes" to "src".

This should help read and understand a little more easily the code
inside this function.  No real code change otherwise.

gdb/ChangeLog:

        * ada-lang.c (ada_value_primitive_packed_val): Make the name
        of various local variables more explicit and consistent.
        No real code change otherwise.

8 years agoi386: Fix type of gdbarch_tdep::register_reggroup_p
Simon Marchi [Fri, 9 Oct 2015 14:12:22 +0000 (10:12 -0400)] 
i386: Fix type of gdbarch_tdep::register_reggroup_p

gdb/ChangeLog:

* i386-tdep.h (struct gdbarch_tdep): Change type of
register_reggroup_p to gdbarch_register_reggroup_p_ftype.

8 years agocris: Use enum bfd_endian to represent endianness
Simon Marchi [Fri, 9 Oct 2015 14:12:21 +0000 (10:12 -0400)] 
cris: Use enum bfd_endian to represent endianness

gdb/ChangeLog:

* cris-tdep.c (struct instruction_environment): Change type of
byte_order to enum bfd_endian.

8 years agoarm-linux-tdep: Add explicit cast for int to gdb_syscall conversion
Simon Marchi [Fri, 9 Oct 2015 14:12:21 +0000 (10:12 -0400)] 
arm-linux-tdep: Add explicit cast for int to gdb_syscall conversion

This patch is taken from Pedro's branch.

gdb/ChangeLog:

* arm-linux-tdep.c (arm_canonicalize_syscall): Add
enum gdb_syscall casts.

8 years agoChange some void* to gdb_byte*
Simon Marchi [Fri, 9 Oct 2015 14:08:23 +0000 (10:08 -0400)] 
Change some void* to gdb_byte*

There are a bunch of places where a void* is implicitely casted into a
gdb_byte*.  The auto-insert-casts script added explicit casts at those
places.  However, in many cases, it makes more sense to just change the
void* to a gdb_byte*.

gdb/ChangeLog:

* aarch64-tdep.c (stack_item_t): Change type of data to gdb_byte*.
* arm-tdep.c (struct stack_item): Likewise.
(push_stack_item): Add gdb_byte* cast.
* avr-tdep.c (struct stack_item): Change type of data to gdb_byte*.
(push_stack_item): Add gdb_byte* cast.
* cli/cli-dump.c (dump_memory_to_file): Change type of buf to gdb_byte*
and add cast.
* cris-tdep.c (struct stack_item): Change type of data to gdb_byte*.
(push_stack_item): Add gdb_byte* cast.
* gcore.c (gcore_copy_callback): Change type of memhunk to gdb_byte* and
add cast.
* gdbtypes.h (print_scalar_formatted): Change type of first parameter to
gdb_byte*.
* h8300-tdep.c (h8300_extract_return_value): Change type of valbuf to
gdb_byte* and remove unnecessary cast.
(h8300h_extract_return_value): Likewise.
(h8300_store_return_value): Change type of valbuf to gdb_byte*.
(h8300h_store_return_value): Likewise.
* iq2000-tdep.c (iq2000_extract_return_value): Change type of valbuf to
gdb_byte* and remove unnecessary cast.
* jit.c (jit_reader_try_read_symtab): Change type of gdb_mem to gdb_byte*
and add cast.
* m32r-tdep.c (m32r_store_return_value): Change type of valbuf to
gdb_byte* and remove unnecessary cast.
(m32r_extract_return_value): Change type of dst to gdb_byte* and remove
valbuf.
* mep-tdep.c (mep_pseudo_cr32_read): Change type of buf to gdb_byte*.
(mep_pseudo_cr64_read): Likewise.
(mep_pseudo_csr_write): Likewise.
(mep_pseudo_cr32_write): Likewise.
(mep_pseudo_cr64_write): Likewise.
* mi/mi-main.c (mi_cmd_data_write_memory): Change type of buffer to
gdb_byte* and add cast.
* moxie-tdep.c (moxie_store_return_value): Change type of valbuf to
gdb_byte* and remove unnecessary cast.
(moxie_extract_return_value): Change type of dst to gdb_byte* and remove
valbuf.
* p-valprint.c (print_scalar_formatted): Change type of valaddr to
gdb_byte*.
* printcmd.c (void): Likewise.
* python/py-inferior.c (infpy_read_memory): Change type of buffer to
gdb_byte* and add cast.
(infpy_write_memory): Likewise.
(infpy_search_memory): Likewise.
* regcache.c (regcache_raw_write_signed): Change type of buf to gdb_byte*
and add cast.
(regcache_raw_write_unsigned): Likewise.
(regcache_cooked_write_signed): Likewise.
(regcache_cooked_write_unsigned): Likewise.
* sh64-tdep.c (h64_extract_return_value): Change type of valbuf to
gdb_byte*.

8 years agoAdd two callback data casts
Simon Marchi [Fri, 9 Oct 2015 13:41:30 +0000 (09:41 -0400)] 
Add two callback data casts

gdb/ChangeLog:

* fbsd-tdep.c (fbsd_collect_regset_section_cb): Add cast.
* linux-tdep.c (linux_collect_regset_section_cb_data): Likewise.

8 years agoFix typos in comments
Eli Zaretskii [Fri, 9 Oct 2015 13:21:08 +0000 (16:21 +0300)] 
Fix typos in comments

gdb/

2015-10-09  Eli Zaretskii  <eliz@gnu.org>

* stack.c (print_stack_frame):
* utils.c (printchar): Fix typos in commentary.

8 years agobtrace, test: avoid gdb.btrace/vdso.exp fail
Markus Metzger [Wed, 30 Sep 2015 09:41:35 +0000 (11:41 +0200)] 
btrace, test: avoid gdb.btrace/vdso.exp fail

The vdso.exp test checks that we can access the VDSO memory when replaying.

Depending on the line information generated by the compiler, runto_main may run
to the line marked with bp.1 or stop before that line.  The test incorrectly
assumes that it will always run to the marked line and fails if it doesn't.

The test does not really care about what is traced.  It does care that GDB is
replaying when capturing the second disassemble output.

Reflect that in the test by ignoring the output of the stepping and record goto
begin commands and by checking that GDB is actually replaying.

testsuite/
* gdb.btrace/vdso.c (main): Remove breakpoint markers.
* gdb.btrace/vdso.exp: Change stepping command to "next" and ignore
its output.  Ignore the output of "record goto begin" and instead
check that GDB is replaying.

8 years agoFix gdb.base/a2-run.exp race
Pedro Alves [Fri, 9 Oct 2015 11:56:26 +0000 (12:56 +0100)] 
Fix gdb.base/a2-run.exp race

This patch fixes this racy failure, with the native-extended-gdbserver
board:

 (gdb) run
 Starting program: build/gdb/testsuite/outputs/gdb.base/a2-run/a2-run
 Remote debugging from host 127.0.0.1
 Process build/gdb/testsuite/outputs/gdb.base/a2-run/a2-run created; pid = 23832
 Reading /lib64/ld-linux-x86-64.so.2 from remote target...
 warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
 Reading /lib64/ld-linux-x86-64.so.2 from remote target...
 Reading /lib64/libm.so.6 from remote target...
 Reading /lib64/libc.so.6 from remote target...
 [Inferior 1 (process 23832) exited with code 01]
 (gdb) FAIL: gdb.base/a2-run.exp: run "a2-run" with no args
 PASS: gdb.base/a2-run.exp: no spurious messages at program exit
 run 5
 Starting program: build/gdb/testsuite/outputs/gdb.base/a2-run/a2-run 5
 Reading /lib64/ld-linux-x86-64.so.2 from remote target...
 usage:  factorial <number>

 Child exited with status 1

Note that the output is correct; it's just that inferior output
appeared after gdb's output, and the test doesn't handle that
correctly.

This comment isn't really correct, unfortunately:

# waiting.  If we had already seen the status wrapper exit,
# gdb_test_multiple/expect has no spawn ids left, and thus
# returns.

That's true of expect in general, but I had missed / forgot that
gdb_test_multiple internally has extra matches using "-i
$gdb_spawn_id", so even if the caller clears all the indirect spawn id
lists, gdb_test_multiple will continue waiting.

So do a conditional exp_continue manually instead.

gdb/testsuite/ChangeLog:
2015-10-09  Pedro Alves  <palves@redhat.com>

* gdb.base/a2-run.exp (maybe_exp_continue): New procedure.
(top level): Use it in the run with no args test.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years ago[D] Support D style sizeof and typeof expressions.
Iain Buclaw [Thu, 8 Oct 2015 19:38:05 +0000 (21:38 +0200)] 
[D] Support D style sizeof and typeof expressions.

gdb/ChangeLog:

* d-exp.y: (UnaryExpression): Support `type.sizeof' expressions.
(PostfixExpression): Support `expr.sizeof' expressions.
(PrimaryExpression): Support `typeof(expr)' expressions.

gdb/testsuite/ChangeLog:

* gdb.dlang/properties.exp: New file.

8 years agoMAINTAINERS: Update my email address
Maciej W. Rozycki [Thu, 8 Oct 2015 17:57:56 +0000 (18:57 +0100)] 
MAINTAINERS: Update my email address

gdb/
* MAINTAINERS: Update my email address.

8 years agoFix compile time warning compiling ARC port.
Nick Clifton [Thu, 8 Oct 2015 11:31:26 +0000 (12:31 +0100)] 
Fix compile time warning compiling ARC port.

8 years agobtrace: fix void return
Markus Metzger [Thu, 8 Oct 2015 07:00:57 +0000 (09:00 +0200)] 
btrace: fix void return

record_btrace_resume returns the void return from the to_resume method of the
target beneath.  Split this into calling to_resume and return.

gdb/
* record-btrace.c (record_btrace_resume): Fix void return.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoAvoid using 'template' C++ keyword
Yao Qi [Wed, 7 Oct 2015 11:23:15 +0000 (12:23 +0100)] 
Avoid using 'template' C++ keyword

'template' is used in include/opcode/aarch64.h as below,

 typedef struct
 {
   const char *template;
   uint32_t value;
   int has_xt;
 } aarch64_sys_ins_reg;

and it triggers compilation errors when GDB is built in C++ mode.

In file included from git/gdb/aarch64-tdep.c:62:0:
git/gdb/../include/opcode/aarch64.h:651:15: error: expected unqualified-id before 'template'
   const char *template;

This patch is to rename field template to name.

gas/

* config/tc-aarch64.c (md_begin): Access field 'name' rather
than 'template'.

include/opcode/

* aarch64.h (aarch64_sys_ins_reg) <template>: Removed.
<name>: New field.

opcodes/

* aarch64-dis.c (aarch64_ext_sysins_op): Access field
'name' rather than 'template'.
* aarch64-opc.c (aarch64_print_operand): Likewise.

8 years agoWrap include/opcode/aarch64.h in extern "C" for C++
Yao Qi [Wed, 7 Oct 2015 11:35:46 +0000 (12:35 +0100)] 
Wrap include/opcode/aarch64.h in extern "C" for C++

This is sufficient to link an aarch64 GDB built in C++ mode.  Pedro
did something similar in Feb
https://sourceware.org/ml/binutils/2015-02/msg00176.html

include/opcode/

2015-10-07  Yao Qi  <yao.qi@linaro.org>

* aarch64.h [__cplusplus]: Wrap in extern "C".

8 years agoNew ARC implementation.
Nick Clifton [Wed, 7 Oct 2015 13:20:19 +0000 (14:20 +0100)] 
New ARC implementation.

bfd * archures.c: Remove support for older ARC. Added support for new
ARC cpus (ARC600, ARC601, ARC700, ARCV2).
* bfd-in2.h: Likewise.
* config.bfd: Likewise.
* cpu-arc.c: Likewise.
* elf32-arc.c: Totally changed file with a refactored
inplementation of the ARC port.
* libbfd.h: Added ARC specific relocation types.
* reloc.c: Likewise.

gas     * config/tc-arc.c: Revamped file for ARC support.
        * config/tc-arc.h: Likewise.
        * doc/as.texinfo: Add new ARC options.
        * doc/c-arc.texi: Likewise.

ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*.
* emulparams/arcebelf_prof.sh: New file
* emulparams/arcebelf.sh: Likewise.
* emulparams/arceblinux_prof.sh: Likewise.
* emulparams/arceblinux.sh: Likewise.
* emulparams/arcelf_prof.sh: Likewise.
* emulparams/arcelf.sh: Likewise.
* emulparams/arclinux_prof.sh: Likewise.
* emulparams/arclinux.sh: Likewise.
* emulparams/arcv2elfx.sh: Likewise.
* emulparams/arcv2elf.sh: Likewise.
* emultempl/arclinux.em: Likewise.
* scripttempl/arclinux.sc: Likewise.
* scripttempl/elfarc.sc: Likewise.
* scripttempl/elfarcv2.sc: Likewise
* Makefile.am: Add new ARC emulations.
* Makefile.in: Regenerate.
* NEWS: Mention the new feature.

opcodes * arc-dis.c: Revamped file for ARC support
* arc-dis.h: Likewise.
* arc-ext.c: Likewise.
* arc-ext.h: Likewise.
* arc-opc.c: Likewise.
* arc-fxi.h: New file.
* arc-regs.h: Likewise.
* arc-tbl.h: Likewise.

binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact
and ARCv2.
(get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT.
(guess_is_rela): Likewise.
(dump_relocations): Likewise.
(is_32bit_abs_reloc): Likewise.
(is_16bit_abs_reloc): Likewise.
(is_none_reloc): Likewise.
* NEWS: Mention the new feature.

include * dis-asm.h (arc_get_disassembler): Correct declaration.
* arc-reloc.def: Macro file with definition of all relocation
types.
* arc.h: Changed macros for the newly supported ARC cpus.  Altered
enum defining the supported relocations.
* common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added
macro for EM_ARC_COMPACT2.
        * arc-func.h: New file.
        * arc.h: Likewise.

8 years agogold: fix ABI pagesize for aarch64
Andreas Schwab [Thu, 1 Oct 2015 10:30:18 +0000 (12:30 +0200)] 
gold: fix ABI pagesize for aarch64

* aarch64.cc (aarch64_info): Set abi_pagesize to 64K.

8 years ago[aarch64] use aarch64_decode_insn to decode instructions in GDB
Yao Qi [Wed, 7 Oct 2015 08:52:46 +0000 (09:52 +0100)] 
[aarch64] use aarch64_decode_insn to decode instructions in GDB

In this patch, we start to use aarch64_decode_insn to decode instructions
in aarch64_software_single_step.

gdb:

2015-10-07  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c: Include opcode/aarch64.h.
(submask): Move it above.
(bit): Likewise.
(bits): Likewise.
(aarch64_software_single_step): Call aarch64_decode_insn.
Decode instruction by aarch64_inst instead of using
aarch64_decode_bcond and decode_masked_match.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Oct 2015 00:00:20 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoFix bug when applying R_SPARC_GOTDATA_OP* relocations to local symbols.
Cary Coutant [Tue, 6 Oct 2015 21:43:49 +0000 (14:43 -0700)] 
Fix bug when applying R_SPARC_GOTDATA_OP* relocations to local symbols.

When applying a GOTDATA_OP* relocation to a local symbol, the addend
is being applied after getting the value of the symbol. When the
relocation refers to a merge section, however, the addend must be
provided when computing the symbol value, since the contents of
the section may have been rearranged.

gold/
PR gold/18855
* sparc.cc (Sparc_relocate_functions::gdop_hix22): Remove addend
parameter.
(Sparc_relocate_functions::gdop_lox10): Likewise.
(Target_sparc::Relocate::relocate): Use addend when computing
symbol value for R_SPARC_GOTDATA_OP*.

8 years agoClear the ch_reserved field in 64-bit output
H.J. Lu [Tue, 6 Oct 2015 21:34:17 +0000 (14:34 -0700)] 
Clear the ch_reserved field in 64-bit output

It is better to clear the ch_reserved field of Elf64_External_Chdr
in 64-bit output.

* bfd.c (bfd_update_compression_header): Clear the ch_reserved
field in 64-bit output.
(bfd_convert_section_contents): Likewise.

8 years agoparse load_offset (bias) of restore command as long
Pitchumani Sivanupandi [Tue, 6 Oct 2015 16:29:03 +0000 (18:29 +0200)] 
parse load_offset (bias) of restore command as long

Following failures are noticed for avr-gdb. This may be the case
for targets like AVR which has integer_to_address hook defined.

FAIL: gdb.base/dump.exp: struct copy, srec; value restored ok
FAIL: gdb.base/dump.exp: struct copy, ihex; value restored ok
FAIL: gdb.base/dump.exp: struct copy, tekhex; value restored ok

These tests are failed because load_offset(bias) of restore command
parsed as address.

command: restore filename [binary] bias start end

Except binary, other BFDs have a built-in location; gdb restores content
at offset 'bias' from that location. So, 'bias' of 'restore' command should
be parsed as address only when the file is binary.

Below patch changes gdb to parse 'bias' as long if the file is not binary.

gdb/ChangeLog

2015-10-06  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>

* cli/cli-dump.c (restore_command): Parse load_offset (bias) as address
only when the file is binary.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoDon't re-export common symbols
H.J. Lu [Mon, 5 Oct 2015 21:45:17 +0000 (14:45 -0700)] 
Don't re-export common symbols

For ELF linker, a common symbol isn't a definition.  When we decide if a
symbol should be re-exported, we should check if the symbol isn't
undefined, not if it is a definition.

bfd/

PR ld/18914
* elflink.c (elf_link_add_object_symbols): Don't re-export a
symbol if it isn't undefined.

ld/testsuite/

PR ld/18914
* ld-elf/exclude.exp: Also check exclude_common.
* ld-elf/exclude2.s: Add exclude_common.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoEnable IAMCU and PEI for Solaris2/x86
H.J. Lu [Sun, 4 Oct 2015 14:42:43 +0000 (07:42 -0700)] 
Enable IAMCU and PEI for Solaris2/x86

bfd/

* config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
i386_pei_vec and x86_64_pei_vec for Solaris2/x86.

ld/

* configure.tgt (targ_extra_emuls): Add elf_iamcu for Solaris2/x86.

8 years agoChange ch_type to Elf_Word in struct Chdr_data<64>
H.J. Lu [Sun, 4 Oct 2015 13:14:13 +0000 (06:14 -0700)] 
Change ch_type to Elf_Word in struct Chdr_data<64>

The ch_type field in struct Chdr_data<64>  is 4 bytes, followed by a
4-byte padding.  This change doesn't introduce any functional change
since only the lower 32 bits of the ch_type field are used.

PR gold/19060
* elfcpp.h (Chdr::get_ch_type): Change return type to Elf_Word.
* elfcpp_internal.h (Chdr_data<64>): Change ch_type to 4 bytes
and add ch_reserved.

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Oct 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years ago[FT32] gdb: Correctly interpret function prologs
jamesbowman [Sat, 3 Oct 2015 00:32:47 +0000 (17:32 -0700)] 
[FT32] gdb: Correctly interpret function prologs

The stack unwinder did not understand the function prologs
generated by gcc with -Os. Add code to recognize and interpret the
prolog calls.

[gdb]

2015-10-02  James Bowman  <james.bowman@ftdichip.com>

* ft32-tdep.c (ft32_analyze_prologue): Add function prolog
subroutine handling.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Oct 2015 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoFix gdb.dwarf2/staticvirtual.exp regexp.
Sandra Loosemore [Fri, 2 Oct 2015 20:12:56 +0000 (13:12 -0700)] 
Fix gdb.dwarf2/staticvirtual.exp regexp.

2015-10-02  Sandra Loosemore  <sandra@codesourcery.com>

gdb/testsuite/
* gdb.dwarf2/staticvirtual.exp: Generalize regexp so it can match
whether or not address 0x1000 is mapped on the target.

8 years ago[LD][AARCH64]Add TLSIE relaxation support under large memory model.
Renlin Li [Fri, 2 Oct 2015 16:48:31 +0000 (17:48 +0100)] 
[LD][AARCH64]Add TLSIE relaxation support under large memory model.

bfd/
2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
TLSIE_MOVW_GOTTPREL_G1.
(aarch64_tls_transition_without_check): Add
TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
transition for local symbol.
(elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
(elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
with new argument.

ld/testsuite/
2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/aarch64-elf.exp (tls-relax-large-le-ie): Run new test.
* ld-aarch64/tls-relax-large-ie-le.d: New.
* ld-aarch64/tls-relax-large-ie-le.s: New.

8 years ago[LD][AARCH64]Add TLSDESC support for large memory model.
Renlin Li [Fri, 2 Oct 2015 16:43:08 +0000 (17:43 +0100)] 
[LD][AARCH64]Add TLSDESC support for large memory model.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_tls_transition_without_check):  Add
relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
TLSDESC_OFF_G1.
(aarch64_tls_transition_without_check): Add relaxation support.
(aarch64_reloc_got_type): Add support.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_tls_relax): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.

ld/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/aarch64-elf.exp: Run new test.
* ld-aarch64/tls-large-desc.d: New.
* ld-aarch64/tls-large-desc.s: New.
* ld-aarch64/tls-relax-large-desc-ie.d: New.
* ld-aarch64/tls-relax-large-desc-ie.s: New.
* ld-aarch64/tls-relax-large-desc-le.d: New.
* ld-aarch64/tls-relax-large-desc-le.s: New.

8 years ago[GAS][AARCH64]Add TLSDESC large memory model support.
Renlin Li [Fri, 2 Oct 2015 16:29:33 +0000 (17:29 +0100)] 
[GAS][AARCH64]Add TLSDESC large memory model support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
BFD_RELOC_AARCH64_TLSDESC_OFF_G1.

gas/

2015-10-02  Renlin Li <renlin.li@arm.com>

* config/tc-aarch64.c (s_tlsdescadd): New.
(s_tlsdescldr): New.
(md_pseudo_table): Handle tlsdescadd and tlsdescldr pseudo ops.
(reloc_table): Add entries for BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC and
BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC.
(process_movw_reloc_info): Support AARCH64_TLSDESC_OFF_G1 and
    AARCH64_TLSDESC_OFF_G0_NC.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.

gas/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* gas/aarch64/reloc-tlsdesc_off_g0_nc.d: New.
* gas/aarch64/reloc-tlsdesc_off_g0_nc.s: New.
* gas/aarch64/reloc-tlsdesc_off_g1.d: New.
* gas/aarch64/reloc-tlsdesc_off_g1.s: New.
* gas/aarch64/tls-desc.d: New.
* gas/aarch64/tls-desc.s: New.

8 years ago[BFD][AARCH64]Add TLSGD relaxation support under large memory model.
Renlin Li [Fri, 2 Oct 2015 16:22:36 +0000 (17:22 +0100)] 
[BFD][AARCH64]Add TLSGD relaxation support under large memory model.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
(aarch64_tls_transition_without_check): Likewise
(elfNN_aarch64_tls_relax): Likwise.

ld/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/aarch64-elf.exp: run new test
* ld-aarch64/tls-relax-large-gd-ie.d: New.
* ld-aarch64/tls-relax-large-gd-ie.s: New.
* ld-aarch64/tls-relax-large-gd-le.d: New.
* ld-aarch64/tls-relax-large-gd-le.s: New.

8 years ago[BFD][AARCH64]Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2).
Renlin Li [Fri, 2 Oct 2015 16:02:53 +0000 (17:02 +0100)] 
[BFD][AARCH64]Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2).

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.

8 years ago[Binutils][AARCH64]Add TLS IE large memory support.
Renlin Li [Fri, 2 Oct 2015 15:59:46 +0000 (16:59 +0100)] 
[Binutils][AARCH64]Add TLS IE large memory support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
* libbfd.h: Regenerate.
* bfd-in2.h: Likewise.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
TLSIE_MOVW_GOTTPREL_G1 check overflow.
(aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
and TLSIE_MOVW_GOTTPREL_G0_NC.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.

gas/

2015-10-02  Renlin Li <renlin.li@arm.com>

* config/tc-aarch64.c (reloc_table): Add two entries for
gottprel_g0_nc and gottprel_g1.
(process_movw_reloc_info): Add support.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.

gas/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* gas/aarch64/reloc-gottprel_g0_nc.d: New.
* gas/aarch64/reloc-gottprel_g0_nc.s: New.
* gas/aarch64/reloc-gottprel_g1.d: New.
* gas/aarch64/reloc-gottprel_g1.s: New.

ld/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/tls-large-ie.d: New.
* ld-aarch64/tls-large-ie.s: New.
* ld-aarch64/aarch64-elf.exp: Run new test.

8 years ago[LD][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
Renlin Li [Fri, 2 Oct 2015 15:37:22 +0000 (16:37 +0100)] 
[LD][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_reloc_got_type): Add
BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.

ld/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/emit-relocs-516.d: New.
* ld-aarch64/emit-relocs-516.s: New.
* ld-aarch64/aarch64-elf.exp: Run new test.

8 years ago[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
Renlin Li [Fri, 2 Oct 2015 15:28:49 +0000 (16:28 +0100)] 
[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
* libbfd.h: Regenerate.
* bfd-in2.h: Likewise

gas/

2015-10-02  Renlin Li <renlin.li@arm.com>

* config/tc-aarch64.c (reloc_table): New relocation modifier tlsgd_g0_nc.
(process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.

gas/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* gas/aarch64/reloc-tlsgd_g0_nc.d: New.
* gas/aarch64/reloc-tlsgd_g0_nc.s: New.

8 years ago[LD][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
Renlin Li [Fri, 2 Oct 2015 15:21:31 +0000 (16:21 +0100)] 
[LD][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_reloc_got_type): Add
BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.

ld/testsuite

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/emit-relocs-515.d: New.
* ld-aarch64/emit-relocs-515.s: New.
* ld-aarch64/aarch64-elf.exp: Run new test.

8 years ago[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
Renlin Li [Fri, 2 Oct 2015 15:04:09 +0000 (16:04 +0100)] 
[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.

gas/

2015-10-02  Renlin Li <renlin.li@arm.com>

* config/tc-aarch64.c (reloc_table): New relocation modifier tlsgd_g1.
(process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.

gas/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* gas/aarch64/reloc-tlsgd_g1.s: New.
* gas/aarch64/reloc-tlsgd_g1.s: New.

8 years ago[LD][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.
Renlin Li [Fri, 2 Oct 2015 14:54:40 +0000 (15:54 +0100)] 
[LD][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_reloc_got_type): Add
BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.

ld/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* ld-aarch64/aarch64-elf.exp: Run new test.
* ld-aarch64/emit-relocs-301.d: New.
* ld-aarch64/emit-relocs-301.s: New.

8 years ago[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.
Renlin Li [Fri, 2 Oct 2015 14:42:01 +0000 (15:42 +0100)] 
[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.

bfd/

2015-10-02  Renlin Li <renlin.li@arm.com>

* reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
MOVW_GOTOFF_G0_NC.
* libbfd.h: Regnerate.
* bfd-in2.h: Regenerate.

gas/

2015-10-02  Renlin Li <renlin.li@arm.com>

* config/tc-aarch64.c (reloc_table): New relocation modifier
gotoff_g0_nc.
(process_movw_reloc_info): Support gotoff_g0_nc.
(md_apply_fix): Likewise.

gas/testsuite/

2015-10-02  Renlin Li <renlin.li@arm.com>

* gas/aarch64/reloc-gotoff_g0_nc.s: New.
* gas/aarch64/reloc-gotoff_g0_nc.d: New.

8 years ago[LD][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G1 Support.
Renlin Li [Fri, 2 Oct 2015 14:29:41 +0000 (15:29 +0100)] 
[LD][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G1 Support.

bfd/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_reloc_got_type): Add support
for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise
(elfNN_aarch64_final_link_relocate): Calculate offset within GOT.

ld/testsuite/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* ld-aarch64/emit-relocs-302.d: New.
* ld-aarch64/emit-relocs-302.s: New.
* ld-aarch64/aarch64-elf.exp: Run the new test.

8 years ago[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G1 Support.
Renlin Li [Fri, 2 Oct 2015 14:18:51 +0000 (15:18 +0100)] 
[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G1 Support.

bfd/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
MOVW_GOTOFF_G1.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.

gas/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* config/tc-aarch64.c (reloc_table): New relocation modifier
gotoff_g1.
(process_movw_reloc_info): Support newly added modifier.
(md_apply_fix): Likewise.

gas/testsuite/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* gas/aarch64/reloc-gotoff_g1.s: New.
* gas/aarch64/reloc-gotoff_g1.d: New.

8 years ago[LD][AARCH64]Add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 Support.
Renlin Li [Fri, 2 Oct 2015 13:51:26 +0000 (14:51 +0100)] 
[LD][AARCH64]Add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 Support.

bfd/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* elfnn-aarch64.c (aarch64_reloc_got_type): Add
BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise
(elfNN_aarch64_final_link_relocate): Calculate offset within GOT.

ld/testsuite/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* ld-aarch64/emit-relocs-310.d: New.
* ld-aarch64/emit-relocs-310.s: New.
* ld-aarch64/aarch64-elf.exp: Run the test.

8 years ago[BFD][AARCH64]Refactor to facilitate further large memory model support patches.
Renlin Li [Fri, 2 Oct 2015 13:35:06 +0000 (14:35 +0100)] 
[BFD][AARCH64]Refactor to facilitate further large memory model support patches.

bfd/

2015-10-02  Renlin Li  <renlin.li@arm.com>

* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
switch statement.

8 years agoMake aarch64_zero_register_p declaration starts from column one
Yao Qi [Fri, 2 Oct 2015 14:39:26 +0000 (15:39 +0100)] 
Make aarch64_zero_register_p declaration starts from column one

include/opcode:

2015-10-02  Yao Qi  <yao.qi@linaro.org>

* aarch64.h (aarch64_zero_register_p): Move the declaration
to column one.

8 years ago[aarch64] expose disas_aarch64_insn and rename it to aarch64_decode_insn
Yao Qi [Fri, 2 Oct 2015 10:36:00 +0000 (11:36 +0100)] 
[aarch64] expose disas_aarch64_insn and rename it to aarch64_decode_insn

We want to use disas_aarch64_insn inside GDB to decode instructions, so
this patch exposes it and rename it to aarch64_decode_insn to follow
the conventions of other interfaces.

include/opcode:

2015-10-02  Yao Qi  <yao.qi@linaro.org>

* aarch64.h (aarch64_decode_insn): Declare it.

opcodes:

2015-10-02  Yao Qi  <yao.qi@linaro.org>

* aarch64-dis.c (disas_aarch64_insn): Remove static.  Change
argument insn type to aarch64_insn.  Rename to ...
(aarch64_decode_insn): ... it.
(print_insn_aarch64_word): Caller updated.

8 years ago[aarch64] Remove argument pc from disas_aarch64_insn
Yao Qi [Wed, 30 Sep 2015 16:03:57 +0000 (17:03 +0100)] 
[aarch64] Remove argument pc from disas_aarch64_insn

I happen to see that argument pc is not used inside disas_aarch64_insn
at all.  This patch is to remove it.

OK to apply?

opcodes:

2015-10-02  Yao Qi  <yao.qi@linaro.org>

* aarch64-dis.c (disas_aarch64_insn): Remove argument PC.
(print_insn_aarch64_word): Caller updated.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Oct 2015 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoCreate a PLT entry for R_X86_64_PC32 in non-code sections
H.J. Lu [Thu, 1 Oct 2015 17:49:33 +0000 (10:49 -0700)] 
Create a PLT entry for R_X86_64_PC32 in non-code sections

Since something like ".long foo - ." may be used as pointer, we make
sure that PLT is used if foo is a function defined in a shared library.

bfd/

PR ld/19031
* elf64-x86-64.c (elf_x86_64_check_relocs): Set
pointer_equality_needed for R_X86_64_PC32 reloc in non-code
sections.

ld/testsuite/

PR ld/19031
* ld-x86-64/x86-64.exp: Run PR ld/19031 test.
* ld-x86-64/pr19031.out: New file.
* ld-x86-64/pr19031a.c: Likewise.
* ld-x86-64/pr19031b.S: Likewise.
* ld-x86-64/pr19031c.c: Likewise.

8 years agovec.h: Add casts for C++ compat
Simon Marchi [Thu, 1 Oct 2015 15:29:08 +0000 (11:29 -0400)] 
vec.h: Add casts for C++ compat

gdb/ChangeLog:

* common/vec.h (VEC_OP (T,cleanup)): Add pointer cast.

8 years ago[BFD][AARCH64]Emit single AARCH64_MAP_INSN symbol for the whole plt.
Renlin Li [Thu, 1 Oct 2015 13:12:37 +0000 (14:12 +0100)] 
[BFD][AARCH64]Emit single AARCH64_MAP_INSN symbol for the whole plt.

bfd/

2015-10-01  Renlin Li  <renlin.li@arm.com>

* elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
(elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.

ld/testsuite/

2015-10-01  Renlin Li  <renlin.li@arm.com>

* ld-aarch64/plt_mapping_symbol.d: New.
* ld-aarch64/plt_mapping_symbol.s: New.
* ld-aarch64/aarch64-elf.exp: Run the new test.

This page took 0.049276 seconds and 4 git commands to generate.