From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94218 invoked by alias); 20 Nov 2016 20:10:32 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 94193 invoked by uid 9674); 20 Nov 2016 20:10:31 -0000 Date: Sun, 20 Nov 2016 20:10:00 -0000 Message-ID: <20161120201030.94116.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/dwarf5gcc: Merge remote-tracking branch 'gdb/master' into dwarf5gcc X-Git-Refname: refs/heads/users/jkratoch/dwarf5gcc X-Git-Reftype: branch X-Git-Oldrev: 502c7e5cb9801f18852553b14959364166f24602 X-Git-Newrev: 76a29a45db928e68e1faf83d9c7008cc29543e65 X-SW-Source: 2016-q4/txt/msg00025.txt.bz2 List-Id: The branch, users/jkratoch/dwarf5gcc has been updated via 76a29a45db928e68e1faf83d9c7008cc29543e65 (commit) via b5fbed8982b47d1ea5a0435c156e488e24e9d67c (commit) via cc188e5fd6d4f8d3061ed6c58c432a150f7966e9 (commit) via 0fc9967d0b28a1e037233d49cec479d3ab1e9e59 (commit) from 502c7e5cb9801f18852553b14959364166f24602 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 76a29a45db928e68e1faf83d9c7008cc29543e65 Merge: 502c7e5 b5fbed8 Author: Jan Kratochvil Date: Sun Nov 20 21:10:19 2016 +0100 Merge remote-tracking branch 'gdb/master' into dwarf5gcc commit b5fbed8982b47d1ea5a0435c156e488e24e9d67c Author: GDB Administrator Date: Sun Nov 20 00:00:28 2016 +0000 Automatic date update in version.in commit cc188e5fd6d4f8d3061ed6c58c432a150f7966e9 Author: Joel Brobecker Date: Sat Nov 19 10:40:17 2016 -0800 ARI: Add detection of printf_vma and sprintf_vma We shouldn't be using these, since their output goes straight to stdout, which doesn't allow redirection. So this patch updates the ARI to detect any such use. gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Add detection of printf_vma and sprintf_vma. commit 0fc9967d0b28a1e037233d49cec479d3ab1e9e59 Author: Jose E. Marchesi Date: Sat Nov 19 04:39:09 2016 -0800 Revert "bfd: allow negative offsets to _GLOBAL_OFFSET_TABLE_ in elf64 SPARC" This reverts commit b19753ce31da347605dfa903c6fd2158e2444f0d. As it turns out, GCC (and the assembler) needs additional work in order to support negative GOT offsets in 64-bit sparc. This is breaking TLS Local Dynamic in position-independent code. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 5 +++++ bfd/elfxx-sparc.c | 16 ++++++++-------- bfd/version.h | 2 +- gdb/ChangeLog | 5 +++++ gdb/contrib/ari/gdb_ari.sh | 16 ++++++++++++++++ 5 files changed, 35 insertions(+), 9 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8a18a6d..f28351d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2016-11-19 Jose E. Marchesi + + * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Do not + apply the negative GOT offset optimization in 64-bit code. + 2016-11-18 James Clarke * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index e1c7b22..cf30012 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -2661,19 +2661,19 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, /* Allocate .plt and .got entries, and space for local symbols. */ htab_traverse (htab->loc_hash_table, allocate_local_dynrelocs, info); - if (!htab->is_vxworks + if (! ABI_64_P (output_bfd) + && !htab->is_vxworks && elf_hash_table (info)->dynamic_sections_created) { - if (! ABI_64_P (output_bfd)) - { - /* Make space for the trailing nop in .plt. */ - if (htab->elf.splt->size > 0) - htab->elf.splt->size += 1 * SPARC_INSN_BYTES; - } + /* Make space for the trailing nop in .plt. */ + if (htab->elf.splt->size > 0) + htab->elf.splt->size += 1 * SPARC_INSN_BYTES; /* If the .got section is more than 0x1000 bytes, we add 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13 - bit relocations have a greater chance of working. */ + bit relocations have a greater chance of working. + + FIXME: Make this optimization work for 64-bit too. */ if (htab->elf.sgot->size >= 0x1000 && elf_hash_table (info)->hgot->root.u.def.value == 0) elf_hash_table (info)->hgot->root.u.def.value = 0x1000; diff --git a/bfd/version.h b/bfd/version.h index 071f655..a8f63a5 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20161119 +#define BFD_VERSION_DATE 20161120 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07d21a6..3797e8b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-11-19 Joel Brobecker + + * contrib/ari/gdb_ari.sh: Add detection of printf_vma and + sprintf_vma. + 2016-11-18 Simon Marchi * Makefile.in (%.o: $(srcdir)/gdbtk/generic/%.c): Fix typo. diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 7e639e3..2ecc0d6 100755 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -1097,6 +1097,22 @@ Do not use vasprintf(), instead use xstrvprintf" fail("vasprintf") } +BEGIN { doc["printf_vma"] = "\ +Do not use printf_vma, instead use paddress or phex_nz" + category["printf_vma"] = ari_code +} +/(^|[^_[:alnum:]])printf_vma[[:space:]]*\(/ { + fail("printf_vma") +} + +BEGIN { doc["sprintf_vma"] = "\ +Do not use sprintf_vma, instead use paddress or phex_nz" + category["sprintf_vma"] = ari_code +} +/(^|[^_[:alnum:]])sprintf_vma[[:space:]]*\(/ { + fail("sprintf_vma") +} + # More generic memory operations BEGIN { doc["bzero"] = "\ hooks/post-receive -- Repository for Project Archer.