• R/O
  • HTTP
  • SSH
  • HTTPS

提交列表

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/apinski/gdb-ilp32-gdbserver
RSS
Rev. 时间 作者
f90ea4f users/apinski/gdb-ilp32-gdbserver 2016-09-01 05:27:54 Andrew Pinski

Handle ILP32 AARCH64 correctly for gdbserver

In gdbserver, we need to send over 32bit registers
for pc/sp instead of 64bit as we do right now.
So we need another XML file for ILP32.

Tested using gdbserver with an ILP32 program and even
tested using gdbserver as an ILP32 program.

OK?

Thanks,
Andrew Pinski

ChangeLog:
* aarch64-tdep.c: Include "features/aarch64_ilp32.c".
(aarch64_gdbarch_init): Handle ilp32 correctly.
(_initialize_aarch64_tdep): Call initialize_tdesc_aarch64_ilp32
too.
* features/Makefile (WHICH): Add aarch64_ilp32.
(aarch64_ilp32-expedite): Set.
(XMLTOC): Add aarch64_ilp32.xml.
(features/aarch64_ilp32-core.xml): New file.
(features/aarch64_ilp32.xml): New file.
(features/aarch64_ilp32.c): Generate.
(regformats/aarch64_ilp32.dat): Generate.

gdbserver/ChangeLog:
* Makefile.in (clean): Remove aarch64_ilp32.c also.
(aarch64_ilp32-ipa.o): New target.
(aarch64_ilp32.c): New target.
* configure.srv (aarch64*-*-linux*): Add ilp32 files
to srv_regobj, srv_xmlfiles and ipa_obj.
* linux-aarch64-ipa.c (init_registers_aarch64_ilp32):
Declare.
(tdesc_aarch64_ilp32): Likewise.
(get_ipa_tdesc): Return tdesc_aarch64_ilp32 for ILP32.
(initialize_low_tracepoint): Call init_registers_aarch64_ilp32
for ILP32.
* linux-aarch64-low.c (init_registers_aarch64_ilp32): Declare.
(tdesc_aarch64_ilp32): Likewise.
(aarch64_linux_read_description): Return tdesc_aarch64_ilp32
for ILP32 executables.
(initialize_low_arch): Call init_registers_aarch64_ilp32.

Signed-off-by: Andrew Pinski <apinski@cavium.com>

65f976c 2016-09-01 05:07:24 Andrew Pinski

Add ILP32 support to gdb.

This patch adds AARCH64:ilp32 support to gdb and sets
up the correct sizes for some types like pointers and long.
Also sets up the correct linker map offsets for Linux.

2016-08-31 Andrew Pinski <apinski@cavium.com>

* aarch64-tdep.h (gdbarch_tdep): Add ilp32 field.
* aarch64-tdep.c (aarch64_gdbarch_init): Setup ILP32 support.
Make sure the gdbarches have compatible ilp32 flags.
Set long and ptr sizes correctly for ilp32.
* aarch64-linux-tdep.c (aarch64_linux_init_abi):
Add support for ILP32.

d6920a9 2016-09-01 05:06:39 Andrew Pinski

Move AARCH64 ILP32 rejection handling

For AARCH64 ILP32, we reject compatibility too
early on to support gdb ILP32. This patch
moves ILP32 rejection from compatible
to elfNN_aarch64_merge_private_bfd_data
which allows aarch64 and aarch64:ilp32
to be handled correctly with gdb.
An added bonus is that we can have an error
message on why two object files are rejected.

OK? Tested both binutils and gdb.

Thanks,
Andrew Pinski

2016-08-31 Andrew Pinski <apinski@cavium.com>

* cpu-aarch64.c (compatible):
Don't reject different mach or ILP32 here.
* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data):
Add an error message on why endianess is rejected.
Reject different ILP32/LP64 settings.

Signed-off-by: Andrew Pinski <apinski@cavium.com>

3aa5cfa 2016-09-01 02:46:22 Antoine Tremblay

Fix lwp_suspend/unsuspend imbalance in linux_wait_1

This patch fixes imbalanced lwp_suspend/unsuspend calls caused by the
premature choosing of another event for fairness.

select_event_lwp would switch the event before a call to
unsuspend_all_lwps, thus it would be called with the wrong event.

This caused an assertion failure: unsuspend LWP xx, suspended=-1 when
testing gdb.threads/non-stop-fair-events.exp with ARM range stepping in
GDBServer.

This patch moves the switch of event after the unsuspend/unstop calls.

No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-native.

gdb/gdbserver/ChangeLog:

* linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.

f99bd5f 2016-08-31 22:28:27 Yao Qi

Fix a typo in comment

This patch replaces "keep things single" with "keep things simple".

gdb:

2016-08-31 Yao Qi <yao.qi@linaro.org>

* record-full.c (record_full_insert_breakpoint): Fix typo.

2e84f9c 2016-08-31 18:52:43 Alan Modra

Ignore symbols defined in SHF_EXCLUDE sections

PR 20513
* ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.

8a37735 2016-08-31 18:52:43 Alan Modra

[GOLD] Further tidy to powerpc can_add_to_stub_group

This patch adds a little more debug output, and replaces two variables
with one, tracking current max group size by group_size_ rather than
by has14_.

* powerpc.cc (class Stub_control): Delete stub14_group_size_
and has14_. Add group_size_.
(Stub_control::can_add_to_stub_group): Adjust to suit. Print
debug info when switching to adding sections before stubs.

09f9271 2016-08-31 18:52:31 Alan Modra

PowerPC64, correct grouping of stubs for ld.bfd

Like 57f6d32d, this patch ensures that sections containing external
conditional branches limit the group size.

* elf64-ppc.c (group_sections): Delete stub14_group_size. Instead,
track max group size with a new "group_size" var that is reduced
by a factor of 1024 from the 24-bit branch size whenever a 14-bit
branch is seen.

3e8c34e 2016-08-31 13:35:44 Alan Modra

Adjust VLE testsuite

To suit f7d69005.

* testsuite/ld-powerpc/vle-multiseg-1.d: Adjust to suit segment change.
* testsuite/ld-powerpc/vle-multiseg-2.d: Likewise.
* testsuite/ld-powerpc/vle-multiseg-3.d: Likewise.
* testsuite/ld-powerpc/vle-multiseg-6.d: Likewise.
* testsuite/ld-powerpc/vle-reloc-2.d: Likewise.

f7d6900 2016-08-31 12:48:34 Alan Modra

PowerPC VLE sh_flags and p_flags

ELF section sh_flags SHF_PPC_VLE was being set based on arch/mach,
which meant all code sections in an object file has the flag or all
lacked it. We can do better than that. Only those code sections
where VLE is enabled ought to have the flag, allowing an object file
to contain both VLE and non-VLE code.

Also, ELF header p_flags PF_PPC_VLE wasn't being set, and segments
were being split unnecessarily.

bfd/
* elf32-ppc.c (ppc_elf_section_processing): Delete.
(elf_backend_section_processing): Don't define.
(ppc_elf_modify_segment_map): Set p_flags and mark valid. Don't
split on non-exec sections differing in SHF_PPC_VLE. When
splitting segments, mark size invalid.
gas/
* config/tc-ppc.c (md_assemble): Set sh_flags for VLE. Test
ppc_cpu rather than calling ppc_mach to determine VLE mode.
(ppc_frag_check, ppc_handle_align): Likewise use ppc_cpu.

afe002d 2016-08-31 12:04:36 Alan Modra

[GOLD] Add debug output for powerpc section grouping

* debug.h (DEBUG_TARGET): New.
(DEBUG_ALL): Add DEBUG_TARGET.
(gold_debug): Delete FORMAT param.
* powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.

6c95c84 2016-08-31 09:00:20 GDB Administrator

Automatic date update in version.in

7763838 2016-08-31 01:21:13 Cupertino Miranda

Fixed issue with NULL pointer access on header var.

Variable "header" in function is set conditionally, but was accessed without
verifying if pointer was NULL.

opcodes/ChangeLog:

Cupertino Miranda <cmiranda@synopsys.com>
* opcodes/arc-dis.c (print_insn_arc): Changed.

5af962d 2016-08-31 00:03:55 Andreas Arnez

Fix order of inferiors in "thread apply all"

This inserts missing parentheses in the calculation of the comparison
result between two different inferior numbers. The problem was found by
Philipp Rudo.

gdb/ChangeLog:

* thread.c (tp_array_compar): Insert missing parentheses.

gdb/testsuite/ChangeLog:

* gdb.multi/tids.exp: Test "thread apply all".

b2b3836 2016-08-30 23:02:25 Cupertino Miranda

Made tests to XFAIL for arc*-*-elf*.

ld/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>

* testsuite/ld-arc/tls_gs-01.d: Set to XFAIL on arc*-*-elf*.
* testsuite/ld-arc/tls_ie-01.d: Likewise.

c616591 2016-08-30 21:51:43 Nick Clifton

Partially revert previous delta - move limit testing code to first scan over symbol file.

PR gprof/20499
* corefile.c (num_of_syms_in): Return an unsigned int.
Fail if the count exceeds the maximum possible allocatable size.
(core_create_syms_from): Exit early if num_of_syms_in returns a
failure code.

0092723 2016-08-30 21:38:54 Nick Clifton

Fix more potential seg-faults in gprof.

PR gprof/20499
* corefile.c (num_of_syms_in): Return an unsigned int.
(core_create_syms_from): Catch a possible integer overflow
computing the argument to xmalloc. Also allow for the possibility
that an integer overflow in num_of_syms_in means that less space
has been allocated than expected.

8941017 2016-08-30 20:34:44 Alan Modra

ppc apuinfo for spe parsed incorrectly

apuinfo saying SPE resulted in mach = bfd_mach_ppc_vle due to a
missing break.

PR 20531
* elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".

57f6d32 2016-08-30 11:50:27 Alan Modra

[GOLD] correct grouping of stubs

This patch rewrites the rather obscure can_add_to_stub_group, fixing
a problem with the handling of sections containing conditional
external branches. When a section group contains any such section,
the group size needs to be limited to a much smaller size than groups
with only non-conditional external branches.

PR 20523
* powerpc.cc (class Stub_control): Add has14_. Comment owner_.
(Stub_control::can_add_to_stub_group): Correct grouping of
sections containing 14-bit external branches. When returning
false, set state_ to reflect the fact that we have one section
for the next group. Rewrite most of function for clarity.
Add and expand comments.
(Target_powerpc::do_relax): Print stub group size retry in hex.

7229b68 2016-08-30 09:00:21 GDB Administrator

Automatic date update in version.in

3c4f322 2016-08-30 01:09:14 H.J. Lu

Run PR ld/19784 tests only if ifunc attribute works

* testsuite/ld-x86-64/x86-64.exp: Run PR ld/19784 tests only
if ifunc attribute works.

f53be97 2016-08-30 00:49:20 H.J. Lu

Check the external compression header size

Since the internal compression header size can be bigger than the
external compression header size, we should check the external
compression header size.

* readelf.c (load_specific_debug_section): Check the external
compression header size.

74437ea 2016-08-30 00:14:45 H.J. Lu

i386: Issue an error on non-PIC call to IFUNC in PIC object

On i386, IFUNC function must be called via PLT. Since PLT in PIC
object uses EBX register, R_386_PLT32 relocation must be used to
call IFUNC function even when IFUNC function is defined locally.
Linker should issue an error when R_386_PC32 relocation is used
to call IFUNC function.

Since PR ld/19784 tests doesn't use PLT relocation to local IFUNC
function, they are moved to the x86-64 test directory.

bfd/

PR ld/14961
PR ld/20515
* elf32-i386.c (elf_i386_check_relocs): Issue an error when
R_386_PC32 relocation is used to call IFUNC function in PIC
object.

ld/

PR ld/14961
PR ld/20515
* testsuite/ld-i386/i386.exp: Run pr20515.
* testsuite/ld-i386/pr20515.d: New file.
* testsuite/ld-i386/pr20515.s: Likewise.
* testsuite/ld-ifunc/ifunc-14a.s: Use R_386_PLT32 to call IFUNC
function.
* testsuite/ld-ifunc/ifunc-14c.s: Likewise.
* testsuite/ld-ifunc/ifunc-2-i386.s: Likewise.
* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.
* testsuite/ld-ifunc/ifunc.exp: Move PR ld/19784 tests to ...
* testsuite/ld-x86-64/x86-64.exp: Here.
* testsuite/ld-ifunc/pr19784a.c: Moved to ...
* testsuite/ld-x86-64/pr19784a.c: Here.
* testsuite/ld-ifunc/pr19784b.c: Moved to ...
* testsuite/ld-x86-64/pr19784b.c: Here.
* testsuite/ld-ifunc/pr19784c.c: Moved to ...
* testsuite/ld-x86-64/pr19784c.c: Here.

7fac691 2016-08-29 22:20:04 Jan Kratochvil

gdb.base/default.exp regression

tty^M
(gdb) FAIL: gdb.base/default.exp: tty

gdb/testsuite/ChangeLog
2016-08-29 Jan Kratochvil <jan.kratochvil@redhat.com>

* gdb.base/default.exp (tty): Remove.

1cc90bb 2016-08-29 09:00:18 GDB Administrator

Automatic date update in version.in

6395d38 2016-08-29 06:17:31 Han Shen

PR gold/20529 - relaxing loop never ends.

gold/ChangeLog

2016-08-26 Han Shen <shenhan@google.com>

* powerpc.cc (Stub_table::min_size_threshold_): New member to
limit size.
(Stub_table::set_min_size_threshold): New member function.
(Stub_table::set_address_and_size): Add code to only allow size
increase.
(Target_powerpc::do_relax): Add code to record last size.

8b2f345 2016-08-28 09:00:19 GDB Administrator

Automatic date update in version.in

53720c4 2016-08-27 09:14:22 Alan Modra

Lack of SHF_GROUP sections result in ld segfault

PR 20520
* elf.c (_bfd_elf_setup_sections): Check that SHT_GROUP sections
have corresponding SHF_GROUP sections.
(bfd_elf_set_group_contents): Comment.

8a9e8e7 2016-08-27 09:12:09 Alan Modra

Fix commit 980aa3e6

Commit 980aa3e6 was supposed to cure dyn_reloc counting problems, but
did the opposite. For PIC we count two types of dyn_reloc, those on
pc-relative relocs, and the total. If a sym needs pc-relative dyn
relocs then all the relocs are dynamic. If not, then only those that
are must_be_dyn_reloc are dynamic.

PR 20519
* elf64-ppc.c (pc_dynrelocs): New function.
(ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
handle pic dynamic relocs.

e55c2fc 2016-08-27 09:00:20 GDB Administrator

Automatic date update in version.in