• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
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/palves/gnulib-largefile
RSS
Rev. Time Author
1cd2a21 users/palves/gnulib-largefile 2020-01-21 21:47:22 Pedro Alves

largefile

2691685 2020-01-21 00:10:23 Nick Clifton

Updated translations for various binutils sub-directories

14470f0 2020-01-21 00:01:07 H.J. Lu

x86-64: Fix TLSDESC relaxation for x32

For x32, we must encode "lea x@TLSDESC(%rip), %reg" with a REX prefix
even if it isn't required. Otherwise linker can’t safely perform
GDesc -> IE/LE optimization. X32 TLSDESC sequences can be:

40 8d 05 00 00 00 00 rex lea x@TLSDESC(%rip), %reg
...
67 ff 10 call *x@TLSCALL(%eax)

or the same sequence as LP64:

48 8d 05 00 00 00 00 lea foo@TLSDESC(%rip), %reg
...
ff 10 call *foo@TLSCALL(%rax)

We need to support both sequences for x32. For both GDesc -> IE/LE
transitions,

67 ff 10 call *x@TLSCALL(%eax)

should relaxed to

0f 1f 00 nopl (%rax)

For GDesc -> LE transition,

40 8d 05 00 00 00 00 rex lea x@TLSDESC(%rip), %reg

should relaxed to

40 c7 c0 fc ff ff ff rex movl $x@tpoff, %reg

For GDesc -> IE transition,

40 8d 05 00 00 00 00 rex lea x@TLSDESC(%rip), %reg

should relaxed to

40 8b 05 00 00 00 00 rex movl x@gottpoff(%rip), %eax

bfd/

PR ld/25416
* elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
"rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
X32 mode.
(elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
transition, relax "rex leal x@tlsdesc(%rip), %reg" to
"rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
"rex leal x@tlsdesc(%rip), %reg" to
"rex movl x@gottpoff(%rip), %eax". For both transitions, relax
"call *(%eax)" to "nopl (%rax)".

gas/

PR ld/25416
* config/tc-i386.c (output_insn): Add a dummy REX_OPCODE prefix
for lea with R_X86_64_GOTPC32_TLSDESC relocation when generating
x32 object.
* testsuite/gas/i386/ilp32/x32-tls.d: Updated.
* testsuite/gas/i386/ilp32/x32-tls.s: Add tests for lea with
R_X86_64_GOTPC32_TLSDESC relocation.

ld/

PR ld/25416
* testsuite/ld-x86-64/pr25416-1.s: New file
* testsuite/ld-x86-64/pr25416-1a.d: Likewise.
* testsuite/ld-x86-64/pr25416-1b.d: Likewise.
* testsuite/ld-x86-64/pr25416-1.s: Likewise.
* testsuite/ld-x86-64/pr25416-2.s: Likewise.
* testsuite/ld-x86-64/pr25416-2a.d: Likewise.
* testsuite/ld-x86-64/pr25416-2b.d: Likewise.
* testsuite/ld-x86-64/pr25416-3.d: Likewise.
* testsuite/ld-x86-64/pr25416-3.s: Likewise.
* testsuite/ld-x86-64/pr25416-4.d: Likewise.
* testsuite/ld-x86-64/pr25416-4.s: Likewise.
* testsuite/ld-x86-64/pr25416-5a.c: Likewise.
* testsuite/ld-x86-64/pr25416-5b.s: Likewise.
* testsuite/ld-x86-64/pr25416-5c.s: Likewise.
* testsuite/ld-x86-64/pr25416-5d.s: Likewise.
* testsuite/ld-x86-64/pr25416-5e.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/25416 tests.

b9ca1af 2020-01-20 17:28:05 Alan Modra

Don't touch r11 in __tls_get_addr stub

This modifies the special __tls_get_addr stub that checks for a
tlsdesc style __tls_index entry and returns early. Not using r11
isn't much benefit at the moment but a followup patch will preserve
regs around the first call to __tls_get_addr when the __tls_index
entry isn't yet set up for an early return.

bfd/
* elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
(MTLR_R11): Don't define.
(LD_R0_0R3, CMPDI_R0_0): Define.
(build_tls_get_addr_stub): Don't use r11 in stub.
ld/
* testsuite/ld-powerpc/tlsexe.d: Match new __tls_get_addr stub.
* testsuite/ld-powerpc/tlsexeno.d: Likewise.
* testsuite/ld-powerpc/tlsexetoc.d: Likewise.
* testsuite/ld-powerpc/tlsexetocno.d: Likewise.
* testsuite/ld-powerpc/tlsopt5.d: Likewise.

ed7007c 2020-01-20 15:24:19 Alan Modra

PowerPC64 ppc_elf_hash_entry, defined_sym_val, is_tls_get_addr

* elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
(defined_sym_val, is_tls_get_addr): Likewise.

4d6cbb6 2020-01-20 14:15:50 Alan Modra

ubsan: hppa: negation of -2147483648

* hppa-dis.c (fput_const): Remove useless cast.

2bddb71 2020-01-20 14:15:50 Alan Modra

ubsan: arm: out of bounds array access

.inst 0x81bdfe9f

disassembles as
0: 81bdfe9f ldaexdhi pc, reg-names-std, [sp]

I'm quite sure "reg-names-std" isn't an ARM register.

* arm-dis.c (print_insn_arm): Wrap 'T' value.

cf1d9e0 2020-01-20 09:48:16 Simon Marchi

sim: don't rely on inferior_ptid in gdbsim_target::wait

When running a program with the simulator target, I get:

/home/simark/src/binutils-gdb/gdb/inferior.c:279: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.

This can be reproduced by building a GDB for --target=arm-none-gnueabi,
and running with

$ ./gdb -nx --data-directory=data-directory a.out -ex "target sim" -ex load -ex "b main" -ex r

Where a.out is any program with a main.

The problem is that gdbsim_target::wait assumes that inferior_ptid has
the value of the thread it wants to report an event for.

Actually, it's the target's responsibility to come up with the ptid of
the thread the event is for. In the sim target, that ptid is stored in
sim_inferior_data::remote_sim_ptid, so return that instead of
inferior_ptid.

ChangeLog:

* remote-sim.c (gdbsim_target::wait): Return
sim_data->remote_sim_ptid instead of inferior_ptid.

b760fb3 2020-01-20 09:48:16 Simon Marchi

sim: add some stdlib.h includes

When trying to compile GDB with --target=avr, with gcc 9.2.0, I am
getting a bunch of:

/home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: implicit declaration of function ‘abort’ [-Werror=implicit-function-declaration]
94 | abort ();
| ^~~~~
/home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: incompatible implicit declaration of built-in function ‘abort’ [-Werror]
/home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘abort’

I did what the compiler told me and added the relevant includes in the
problematic files.

sim/common/ChangeLog:

* nrun.c: Include stdlib.h.
* sim-core.c: Likewise.
* sim-engine.c: Likewise.
* sim-io.c: Likewise.
* sim-module.c: Likewise.
* sim-reason.c: Likewise.

f1cf2aa 2020-01-20 09:00:34 GDB Administrator

Automatic date update in version.in

4d89c1c 2020-01-20 05:24:32 Tom Tromey

Call disassemble_free_target in gdb

Commit 20135676fc4c3912297c313b3e0d3cbd6cc402e3 ("PR24960, Memory leak
from disassembler") added "disassemble_free_target" to opcodes. This
is used to free target-specific data when finished with a
disassembler.

This patch changes gdb to call this function where needed.

gdb/ChangeLog
2020-01-19 Tom Tromey <tom@tromey.com>

* disasm.c (~gdb_disassembler): New destructor.
(gdb_buffered_insn_length): Call disassemble_free_target.
* disasm.h (class gdb_disassembler): Declare destructor. Use
DISABLE_COPY_AND_ASSIGN.

Change-Id: I245ba5b7dec5e5d9f29cd21832c6e2b4fecef047

c0ab21c 2020-01-20 05:16:25 Tom Tromey

Replace init_cutu_and_read_dies with a class

init_cutu_and_read_dies takes a callback function, which I've always
found somewhat difficult to follow. This patch replaces this function
with a class, and changes the callers to use it. In some cases this
allows for the removal of a helper struct and helper function as well.

gdb/ChangeLog
2020-01-19 Tom Tromey <tom@tromey.com>

* dwarf2read.c (abbrev_table_up): Move typedef earlier.
(die_reader_func_ftype): Remove.
(cutu_reader): New class.
(dw2_get_file_names_reader): Remove "data" parameter.
(dw2_get_file_names): Use cutu_reader.
(create_debug_type_hash_table): Update.
(read_cutu_die_from_dwo): Update comment.
(lookup_dwo_unit): Add dwo_name parameter.
(cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
die_reader_func_ftype and data parameters.
(cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
Remove die_reader_func_ftype and data parameters.
(~cutu_reader): New; from init_cutu_and_read_dies.
(cutu_reader::cutu_reader): Rename from
init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
and data parameters.
(init_cutu_and_read_dies_simple): Remove.
(struct process_psymtab_comp_unit_data): Remove.
(process_psymtab_comp_unit_reader): Remove data parameter; add
want_partial_unit and pretend_language parameters.
(process_psymtab_comp_unit): Use cutu_reader.
(build_type_psymtabs_reader): Remove data parameter.
(build_type_psymtabs_1): Use cutu_reader.
(process_skeletonless_type_unit): Likewise.
(load_partial_comp_unit_reader): Remove.
(load_partial_comp_unit): Use cutu_reader.
(load_full_comp_unit_reader): Remove.
(load_full_comp_unit): Use cutu_reader.
(struct create_dwo_cu_data): Remove.
(create_dwo_cu_reader): Remove datap parameter; add dwo_file and
dwo_unit parameters.
(create_cus_hash_table): Use cutu_reader.
(struct dwarf2_read_addr_index_data): Remove.
(dwarf2_read_addr_index_reader): Remove.
(dwarf2_read_addr_index): Use cutu_reader.
(read_signatured_type_reader): Remove.
(read_signatured_type): Use cutu_reader.

Change-Id: I4ef2f29e73108ce94bfe97799f8f638ed272212d

45bbae5 2020-01-20 05:08:49 Tom Tromey

Remove flickering from the TUI

In some cases, the TUI flickers when redrawing. This can be seen
mostly easily when switching layouts.

This patch fixes the problem by exploiting the double buffering that
curses already does. In some spots, the TUI will now disable flushing
the curses buffers to the screen; and then flush them all at once when
the rendering is complete.

gdb/ChangeLog
2020-01-19 Tom Tromey <tom@tromey.com>

* tui/tui.c (tui_show_assembly): Use tui_suppress_output.
* tui/tui-wingeneral.h (class tui_suppress_output): New.
(tui_wrefresh): Declare.
* tui/tui-wingeneral.c (suppress_output): New global.
(tui_suppress_output, ~tui_suppress_output): New constructor and
destructor.
(tui_wrefresh): New function.
(tui_gen_win_info::refresh_window): Use tui_wrefresh.
(tui_gen_win_info::make_window): Call wnoutrefresh when needed.
* tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
method.
* tui/tui-regs.c (tui_data_window::erase_data_content): Call
tui_wrefresh.
(tui_data_window::no_refresh): New method.
(tui_data_item_window::refresh_window): Call tui_wrefresh.
(tui_reg_command): Use tui_suppress_output
* tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
* tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
method.
* tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.

Change-Id: Icb832ae100b861de3af3307488e636fa928d5c9f

4f13c1c 2020-01-20 05:08:48 Tom Tromey

Make "file" clear TUI source window

I noticed that a plain "file" will leave the current source file in
the TUI source window. Instead, I think, it should clear the source
window. This patch implements this.

gdb/ChangeLog
2020-01-19 Tom Tromey <tom@tromey.com>

* tui/tui-winsource.c (tui_update_source_windows_with_line):
Handle case where symtab is null.

gdb/testsuite/ChangeLog
2020-01-19 Tom Tromey <tom@tromey.com>

* gdb.tui/main.exp: Add check for plain "file".

Change-Id: I8424acf837f1a47f75bc6a833d1e917d4c10b51e

fa47e44 2020-01-20 01:54:02 Simon Marchi

gdb/linux-fork: simplify one_fork_p

Unless I'm missing something, this function is a complicated way of
saying "fork_list.size () == 1".

gdb/ChangeLog:

* linux-fork.c (one_fork_p): Simplify.

6ae3a72 2020-01-19 09:01:01 GDB Administrator

Automatic date update in version.in

69d2461 2020-01-19 07:42:24 Roland McGrath

Fix ld-x86-64/align-branch-1 test failure on --target=x86_64-elf

ld/ChangeLog
* testsuite/ld-x86-64/align-branch-1.d: Loosen instruction regexps
to admit whatever absolute address. The label-relative address is
what the test needs to verify.

b248e9c 2020-01-18 23:37:55 Nick Clifton

Update the notes on how to create a branch prior to a new release.

1b1bb2c 2020-01-18 23:12:07 Nick Clifton

Update version to 2.34.50. Regenerate configure and .pot files.

ae77468 2020-01-18 22:50:25 Nick Clifton

Add markers for 2.34 branch to the NEWS files and ChangeLogs.

4fb3a8d 2020-01-18 22:43:19 Nick Clifton

Update top level config files with copies from the official repository.

2020-01-01 Ben Elliston <bje@gnu.org>

* config.guess: Update copyright years.
* config.sub: Likewise.

2019-12-21 Ben Elliston <bje@gnu.org>

* config.guess (set_cc_for_build): Prevent multiple calls by
checking if $tmp is already set. We can't check CC_FOR_BUILD as
the user may set it externally. Thanks to Torbj?rn Granlund for
the bug report.

2019-12-21 Torbj?rn Granlund <tg@gmplib.org>

* config.guess (alpha:Linux:*:*): Guard against missing
/proc/cpuinfo by redirecting standard error to /dev/null.

2019-09-12 Daniel Bittman <danielbittman1@gmail.com>

* config.guess (*:Twizzler:*:*): New.
* config.sub (-twizzler*): New.

2019-07-24 Ben Elliston <bje@gnu.org>

* config.guess (mips:OSF1:*.*): Whitespace cleanup.

2019-06-30 Ben Elliston <bje@gnu.org>

* config.sub (case $os): Match nsk* and powerunix. Don't later
match nsk* and set os=nsk which removes the OS version number.

2019-06-30 Ben Elliston <bje@gnu.org>

* config.sub: Recognise os108*.

2019-06-26 Ben Elliston <bje@gnu.org>

* config.sub (hp300): Set $os to hpux.

2019-06-26 Ben Elliston <bje@gnu.org>

* config.sub (vsta): Move into alphabetical order.

2019-06-10 Ben Elliston <bje@gnu.org>

* config.guess (*:OS108:*:*): Recognise new OS.

2019-05-28 Ben Elliston <bje@gnu.org>

* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
system compiler is installed. If not, do not run set_cc_for_build,
as the default cc will open a dialog box asking to install
Xcode. If no C compiler is available, guess based on uname -p and
uname -m.

2019-05-28 Ben Elliston <bje@gnu.org>

* config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR.

503f691 2020-01-18 09:00:28 GDB Administrator

Automatic date update in version.in

c4d3fc1 2020-01-18 03:40:21 Simon Marchi

Make all-gdbsupport depend on all-bfd

Trying to run "make all-gdbsupport" at the top-level in a build from scratch
results in:

make[2]: Entering directory '/home/smarchi/build/binutils-gdb/gdbsupport'
CC agent.o
In file included from /home/smarchi/src/binutils-gdb/gdbsupport/common-defs.h:133,
from /home/smarchi/src/binutils-gdb/gdbsupport/agent.c:20:
/home/smarchi/src/binutils-gdb/gdbsupport/common-types.h:35:10: fatal error: bfd.h: No such file or directory
35 | #include "bfd.h"
| ^~~~~~~

Before building all-gdbsupport, we need all-bfd to run, so that bfd.h is
generated.

(Once this patch is merged in the binutils-gdb repo, I'll send it to gcc
to keep the files in sync.)

ChangeLog:

* Makefile.def: Add dependencies of all-gdbsupport on all-bfd.
* Makefile.in: Re-generate.

07f1f3a 2020-01-18 03:34:03 Christian Biesinger

Fix spelling errors

seperate -> separate

bfd/ChangeLog:

2020-01-17 Christian Biesinger <cbiesinger@google.com>

* coff-arm.c: Fix spelling error (seperate).
* elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
error (seperate).
* sysdep.h (strnlen): Fix spelling error (seperate).

opcodes/ChangeLog:

2020-01-17 Christian Biesinger <cbiesinger@google.com>

* opintl.h: Fix spelling error (seperate).

sim/arm/ChangeLog:

2020-01-17 Christian Biesinger <cbiesinger@google.com>

* iwmmxt.c: Fix spelling error (seperate).

Change-Id: I55e5f47bcf3cf3533d2acb7ad338f1be0d5f30f9

76e2944 2020-01-18 00:56:55 Nick Clifton

Fix a libiberty testsuite failure.

* testsuite/demangle-expected: Update expected demangling of
enable_if pattern.

82a9ed2 2020-01-18 00:27:31 Thomas Troeger

Improve the performance of the ascii art jump visualizer.

* objdump.c (jump_info_visualize_address): Discard jumps that are
no longer needed.
(disassemble_bytes): Only compute the maximum level if jumps were
detected.

67b1030 2020-01-18 00:19:42 Pedro Alves

Fix gdbsupport build on compilers that don't default to C++11 or above

gdbsupport fails to build with compilers that don't default to C++11
or above. gdbsupport's configure.ac is already using
AX_CXX_COMPILE_STDCXX, which sets CXX_DIALECT to the -std=gnu++11
switch if necessary, but the problem is that nowhere are we using
CXX_DIALECT. This fixes it.

gdbsupport/ChangeLog:
2020-01-17 Pedro Alves <palves@redhat.com>

* Makefile.am: Append CXX_DIALECT to CXX.
* Makefile.in: Regenerate.

3684d33 2020-01-18 00:14:56 Pedro Alves

Fix gdbsupport build

I'm seeing this on F27 (a clean build from scratch):

~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: Entering directory '/home/pedro/brno/pedro/gdb/binutils-gdb/build/gdbsupport'
CC gdb_tilde_expand.o
In file included from /home/pedro/gdb/binutils-gdb/src/gdbsupport/../gnulib/import/libc-config.h:33:0,
from ../gnulib/import/glob.h:544,
from /home/pedro/gdb/binutils-gdb/src/gdbsupport/gdb_tilde_expand.c:22:
../bfd/config.h:7:4: error: #error config.h must be #included before system headers
# error config.h must be #included before system headers
^~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

libc-config.h, where it includes config.h, says:

~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* This is intended to be a good-enough substitute for glibc system
macros like those defined in <sys/cdefs.h>, so that Gnulib code
shared with glibc can do this as the first #include:

#ifndef _LIBC
# include <libc-config.h>
#endif

When compiled as part of glibc this is a no-op; when compiled as
part of Gnulib this includes Gnulib's <config.h> and defines macros
that glibc library code would normally assume. */

#include <config.h>
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The issue is that that '#include <config.h>' picks up bfd's config.h
instead of gnulib's.

This problem doesn't trigger in the gdb dir because there we generate
config.h under that exact name so gnulib's libc-config.h ends up
picking gdb's config.h instead of gnulib.c and that ends up harmless.

In gdbsupport, the config.h file is really named support-config.h, so
that '#include <config.h>' in libc-config.h doesn't pick it like it
would if it had the conventional config.h name.

This patch fixes it by simply renaming gdbserver's support-config.h to
config.h.

gdbsupport/ChangeLog:
2020-01-17 Pedro Alves <palves@redhat.com>

* configure.ac: Generate config.h instead of support-config.h.
* common-defs.h: Include <gdbsupport/config.h> instead of
<gdbsupport/support-config.h>.
* Makefile.in: Regenerate.
* configure: Regenerate.

42e04b3 2020-01-18 00:07:55 H.J. Lu

x86: Add {vex} pseudo prefix

There are 2-byte VEX prefix and 3-byte VEX prefix. 2-byte VEX prefix
can't encode all operands. By default, assembler tries 2-byte VEX prefix
first. {vex3} can be used to force 3-byte VEX prefix. This patch adds
{vex} pseudo prefix and keeps {vex2} for backward compatibility.

gas/

* config/tc-i386.c (_i386_insn): Replace vex_encoding_vex2
with vex_encoding_vex.
(parse_insn): Likewise.
* doc/c-i386.texi: Replace {vex2} with {vex}. Update {vex}
and {vex3} documentation.
* testsuite/gas/i386/pseudos.s: Replace 3 {vex2} tests with
{vex}.
* testsuite/gas/i386/x86-64-pseudos.s: Likewise.

opcodes/

* i386-opc.tbl: Add {vex} pseudo prefix.
* i386-tbl.h: Regenerated.

26f4232 2020-01-17 23:59:10 Simon Marchi

gdb: remove uses of iterate_over_inferiors in top.c

Replace with range-based for loops.

gdb/ChangeLog:

* top.c (struct qt_args): Remove.
(kill_or_detach): Change return type to void, replace `void *`
parameter with a proper one.
(print_inferior_quit_action): Likewise.
(quit_confirm): Use range-based for loop to iterate over inferiors.
(quit_force): Likewise.