From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12685 invoked by alias); 16 Nov 2016 17:58:21 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 12656 invoked by uid 9674); 16 Nov 2016 17:58:20 -0000 Date: Wed, 16 Nov 2016 17:58:00 -0000 Message-ID: <20161116175820.12615.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: 459afe42d7936cd753cbd3655bd9971f584bee1d X-Git-Newrev: 1c666b6929be0eda374b204c2637b36e4547e3c5 X-SW-Source: 2016-q4/txt/msg00018.txt.bz2 List-Id: The branch, users/jkratoch/dwarf5gcc has been updated via 1c666b6929be0eda374b204c2637b36e4547e3c5 (commit) via 4cb771f214ed6a2102e37bce255c6be5d0642f3a (commit) via ff7ba33e8aae2ee8ec607d3f1f4b96f7cb1a92b9 (commit) via 4c62b19fd2e6b81ce7cbb7d01e84c09352ccf224 (commit) via 5cc8c7310338224d65aa14c4256d4d7539e0dd45 (commit) via b22e99fdaf2efe58161c382bbd55f4572ba49eef (commit) via b7f38fdae7c75e1d13abd455b3931950db28d22b (commit) via 93ca393659ef6714724749950301757f47e5e9fd (commit) via 32ce946fd83f08a4f1486de02d3f83870b36b28e (commit) via 9d734efa1034d266249751978f95a686ec9d19c6 (commit) via 35fd2ddeb1d90f1750401cfb6d01fe055656b88d (commit) via db58b3735f45345c06cb9a14d0f83f5b26c1ebf3 (commit) via 80bb3407f6891aff5dbed5b2fd5c3dae8f227319 (commit) via 63f2433dbccc7ddf8812fefd6eed0e6dd2f88955 (commit) via 29df15201399610c3887382f004af337e3fe5601 (commit) from 459afe42d7936cd753cbd3655bd9971f584bee1d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1c666b6929be0eda374b204c2637b36e4547e3c5 Merge: 459afe4 4cb771f Author: Jan Kratochvil Date: Wed Nov 16 18:58:09 2016 +0100 Merge remote-tracking branch 'gdb/master' into dwarf5gcc commit 4cb771f214ed6a2102e37bce255c6be5d0642f3a Author: Senthil Kumar Selvaraj Date: Wed Nov 16 16:11:46 2016 +0530 Fix PR20789 - relaxation with negative valued diff relocs Fix issues with diff relocs that have a negative value i.e. sym2 - sym1 where sym2 is lesser than sym1. The assembler generates a diff reloc with symbol as start of section and addend as sym2 offset, and encodes assembly time difference at the reloc offset. The existing relaxation logic adjusts addends if the relaxed insn lies between symbol and addend. That doesn't work for diff relocs where sym2 is less than sym1 *and* the relaxed insn happens to be between sym2 and sym1. Fix the problems by 1. Using signed handling of the difference value (bfd_signed_vma instead of bfd_vma, bfd_{get,set}_signed_xxx instead of bfd_{get,set}_xxx). 2. Not assuming sym2 is bigger than sym1. It instead computes the actual addresses and sets the lower and higher addresses as start and end addresses respectively and then sees if insn is between start and end. 3. Creating a new function elf32_avr_adjust_reloc_if_spans_insn to centralize reloc adjustment, and ensuring diff relocs get adjusted correctly even if their sym + addend doesn't overlap a relaxed insn. It also removes a redundant variable did_pad. It is never set if did_shrink is TRUE, and the code does a early return if did_shrink is FALSE. bfd/ChangeLog 2016-11-15 Senthil Kumar Selvaraj PR ld/20789 * bfd/elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Do signed manipulation of diff value, and don't assume sym2 is less than sym1. (elf32_avr_adjust_reloc_if_spans_insn): New function. (elf32_avr_relax_delete_bytes): Use elf32_avr_adjust_diff_reloc_value, and remove redundant did_pad. ld/ChangeLog 2016-11-15 Senthil Kumar Selvaraj PR ld/20789 * ld/testsuite/ld-avr/pr20789.d: New test. * ld/testsuite/ld-avr/pr20789.s: New test. commit ff7ba33e8aae2ee8ec607d3f1f4b96f7cb1a92b9 Author: GDB Administrator Date: Wed Nov 16 00:00:20 2016 +0000 Automatic date update in version.in commit 4c62b19fd2e6b81ce7cbb7d01e84c09352ccf224 Author: Pedro Alves Date: Tue Nov 15 19:29:14 2016 +0000 gdb: update gnulib to pull in C++ namespace support fixes I've been experimenting with making use of gnulib's C++ namespace support: https://www.gnu.org/software/gnulib/manual/html_node/A-C_002b_002b-namespace-for-gnulib.html That stumbled on a few gnulib issues, which I've fixed upstream: [PATCH] Fix gnulib C++ namespace support and std::frexp https://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00039.html [PATCH] Fix real-floating argument functions in C++ mode https://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00049.html [PATCH] Avoid having GNULIB_NAMESPACE::func always inject references to rpl_func https://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00040.html [PATCH] C++: "#define timeval rpl_timeval" -> typedef in GNULIB_NAMESPACE https://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00058.html This merge pulls those in. gdb/ChangeLog: 2016-11-15 Pedro Alves * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to 38237baf99386101934cd93278023aa4ae523ec0. * gnulib/configure, gnulib/config.in: Regenerate. * gnulib/import/Makefile.am: Regenerate. * gnulib/import/Makefile.in: Regenerate. * gnulib/import/canonicalize-lgpl.c: Update. * gnulib/import/extra/snippet/c++defs.h: Update. * gnulib/import/m4/stdint.m4: Update. * gnulib/import/m4/stdlib_h.m4: Update. * gnulib/import/math.in.h: Update. * gnulib/import/stdlib.in.h: Update. * gnulib/import/sys_time.in.h: Update. commit 5cc8c7310338224d65aa14c4256d4d7539e0dd45 Author: Pedro Alves Date: Tue Nov 15 19:54:21 2016 +0000 Delete gdb::unique_ptr/gdb::move Now that we require C++11 and all uses of gdb::unique_ptr and gdb::move are gone, let's remove their definitions... With my lazy hat on, I repurposed the header for "generally useful unique_ptr specializations", and left gdb::unique_xmalloc_ptr in there. Not sure whether we it'd be better move it out of the gdb namespace or leave it be. I left it because it's less work and avoids disrupting yet-unmerged patches that use it. gdb/ChangeLog: 2016-11-15 Pedro Alves * common/common-defs.h: Update comment. * common/gdb_unique_ptr.h: Update header comment and copyright year. (gdb::unique_ptr, gdb::move): Delete. commit b22e99fdaf2efe58161c382bbd55f4572ba49eef Author: Pedro Alves Date: Tue Nov 15 19:54:21 2016 +0000 gdb::{unique_ptr,move} -> std::{unique_ptr,move} Now that we require C++11, use std::unique_ptr and std::move directly. gdb/ChangeLog: 2016-11-15 Pedro Alves * ada-lang.c (create_excep_cond_exprs): Use std::move instead of gdb::move. * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::unique_ptr instead of gdb::unique_ptr. * breakpoint.c (watch_command_1): Use std::move instead of gdb::move. * cli/cli-dump.c (dump_memory_to_file, restore_binary_file): Use std::unique_ptr instead of gdb::unique_ptr. * dtrace-probe.c (dtrace_process_dof_probe): Use std::move instead of gdb::move. * elfread.c (elf_read_minimal_symbols): Use std::unique_ptr instead of gdb::unique_ptr. * mi/mi-main.c (mi_cmd_data_read_memory): Use std::unique_ptr instead of gdb::unique_ptr. * parse.c (parse_expression_for_completion): Use std::move instead of gdb::move. * printcmd.c (display_command): std::move instead of gdb::move. commit b7f38fdae7c75e1d13abd455b3931950db28d22b Author: Andreas Arnez Date: Tue Nov 15 20:52:03 2016 +0100 bitfield-parent-optimized-out: Fix struct definition The "struct S" type in bitfield-parent-optimized-out.exp is declared to have a size of 4 bytes but to hold two 4-byte members: an int-based bitfield and a 4-byte int. Also, both members have the same data_member_location 2, causing them to overlap and to reach 2 bytes beyond the structure's boundary. This is fixed by increasing the structure size to 8 and setting the first and second member's data_member_location to 0 and 4, respectively. gdb/testsuite/ChangeLog: * gdb.dwarf2/bitfield-parent-optimized-out.exp: Fix DWARF code for the definition of struct S. commit 93ca393659ef6714724749950301757f47e5e9fd Author: Nick Clifton Date: Tue Nov 15 15:41:27 2016 +0000 Fix SPARC relocations generated for the .eh_frame section. PR gas/20803 * config/tc-sparc.c (cons_fix_new_sparc): Use unaligned relocs in the .eh_frame section. commit 32ce946fd83f08a4f1486de02d3f83870b36b28e Author: GDB Administrator Date: Tue Nov 15 00:00:20 2016 +0000 Automatic date update in version.in commit 9d734efa1034d266249751978f95a686ec9d19c6 Author: H.J. Lu Date: Mon Nov 14 10:13:03 2016 -0800 Also check GOT PLT for R_X86_64_PLTOFF64 Since "-z now" replaces PLT with GOT PLT, we should also check GOT PLT for R_X86_64_PLTOFF64 relocation. bfd/ PR ld/20800 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check plt_got.offset for R_X86_64_PLTOFF64. ld/ PR ld/20800 * testsuite/ld-x86-64/pr20800a.S: New file. * testsuite/ld-x86-64/pr20800b.S: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run PR ld/20800 test. commit 35fd2ddeb1d90f1750401cfb6d01fe055656b88d Author: Rudy Date: Mon Nov 14 16:30:45 2016 +0000 Generate correct hint value for IDATA6. PR binutils/20814 * dlltool.c (struct export): Remove hint field. (make_one_lib_file): Store the ordinal value for IDATA6 not the hint. (gen_lib_file): Delete reference to hint field. (mangle_defs): Delete computation of hint field. commit db58b3735f45345c06cb9a14d0f83f5b26c1ebf3 Author: Markus Metzger Date: Fri Oct 14 09:08:01 2016 +0200 btrace: read entire aux buffer The data_head of a perf event data buffer grows indefinitely. Users are expected to compute data_head % data_size to find the location inside the perf event data buffer. The aux_head of a perf event aux buffer wraps around and always stays within the perf event aux buffer. Well, at least that's the behaviour for BTS and PT - where BTS uses the data buffer and PT the aux buffer. GDB does not read beyond data_head or aux_head. This is OK for BTS but wrong for PT. It causes only a portion of the trace to be considered by GDB. In the extreme case, the buffer may appear (almost) empty. Thanks to Tim Wiederhake for reporting the anomaly. Change it to read the entire aux buffer for PT. The buffer is initially zero so any extra zeroes we read before aux_head wraps around the first time will be ignored when searching for the first PSB packet in order to synchronize onto the trace stream. gdb/ * nat/linux-btrace.c (perf_event_read): Allow data_head < size. * nat/linux-btrace.c (perf_event_read_all): Do not adjust size. Change-Id: If4f8049a2080a5f16f336309450b32a3eb1e3ec9 commit 80bb3407f6891aff5dbed5b2fd5c3dae8f227319 Author: Nick Clifton Date: Mon Nov 14 08:59:23 2016 +0000 lexsup.c (parse_args): Add break at end of default case. commit 63f2433dbccc7ddf8812fefd6eed0e6dd2f88955 Author: Nick Clifton Date: Mon Nov 14 08:44:17 2016 +0000 Fix typo "Faal through" should be "Fall through". commit 29df15201399610c3887382f004af337e3fe5601 Author: GDB Administrator Date: Mon Nov 14 00:00:19 2016 +0000 Automatic date update in version.in ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 20 ++ bfd/coffcode.h | 2 +- bfd/elf32-avr.c | 99 ++++-- bfd/elf64-x86-64.c | 11 +- bfd/version.h | 2 +- binutils/ChangeLog | 9 + binutils/dlltool.c | 21 +- gas/ChangeLog | 6 + gas/config/tc-sparc.c | 5 +- gdb/ChangeLog | 47 +++ gdb/ada-lang.c | 4 +- gdb/break-catch-throw.c | 2 +- gdb/breakpoint.c | 2 +- gdb/cli/cli-dump.c | 4 +- gdb/common/common-defs.h | 2 +- gdb/common/gdb_unique_ptr.h | 353 +------------------- gdb/dtrace-probe.c | 2 +- gdb/elfread.c | 2 +- gdb/gnulib/config.in | 3 + gdb/gnulib/configure | 13 +- gdb/gnulib/import/Makefile.am | 1 + gdb/gnulib/import/Makefile.in | 2 + gdb/gnulib/import/canonicalize-lgpl.c | 10 +- gdb/gnulib/import/extra/snippet/c++defs.h | 75 +++-- gdb/gnulib/import/m4/stdint.m4 | 11 +- gdb/gnulib/import/m4/stdlib_h.m4 | 5 +- gdb/gnulib/import/math.in.h | 14 +- gdb/gnulib/import/stdlib.in.h | 15 + gdb/gnulib/import/sys_time.in.h | 7 + gdb/gnulib/update-gnulib.sh | 2 +- gdb/mi/mi-main.c | 2 +- gdb/nat/linux-btrace.c | 19 +- gdb/parse.c | 2 +- gdb/printcmd.c | 2 +- gdb/testsuite/ChangeLog | 5 + .../gdb.dwarf2/bitfield-parent-optimized-out.exp | 5 +- ld/ChangeLog | 18 + ld/lexsup.c | 1 + ld/testsuite/ld-avr/pr20789.d | 14 + ld/testsuite/ld-avr/pr20789.s | 12 + ld/testsuite/ld-x86-64/pr20800a.S | 17 + ld/testsuite/ld-x86-64/pr20800b.S | 21 ++ ld/testsuite/ld-x86-64/x86-64.exp | 8 + 43 files changed, 420 insertions(+), 457 deletions(-) create mode 100644 ld/testsuite/ld-avr/pr20789.d create mode 100644 ld/testsuite/ld-avr/pr20789.s create mode 100644 ld/testsuite/ld-x86-64/pr20800a.S create mode 100644 ld/testsuite/ld-x86-64/pr20800b.S First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b8a1ba4..fcc5b1c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,23 @@ +2016-11-15 Senthil Kumar Selvaraj + + PR ld/20789 + * bfd/elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Do signed + manipulation of diff value, and don't assume sym2 is less than sym1. + (elf32_avr_adjust_reloc_if_spans_insn): New function. + (elf32_avr_relax_delete_bytes): Use elf32_avr_adjust_diff_reloc_value, + and remove redundant did_pad. + + +2016-11-14 H.J. Lu + + PR ld/20800 + * elf64-x86-64.c (elf_x86_64_relocate_section): Also check + plt_got.offset for R_X86_64_PLTOFF64. + +2016-11-14 Nick Clifton + + * coffcode.h (coff_slurp_symbol_table): Fix typo: Faal -> Fall. + 2016-11-11 Luke Allardyce PR ld/20722 diff --git a/bfd/coffcode.h b/bfd/coffcode.h index b926c65..f5605d7 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5075,7 +5075,7 @@ coff_slurp_symbol_table (bfd * abfd) abfd, src->u.syment.n_sclass, dst->symbol.section->name, dst->symbol.name); ret = FALSE; - /* Faal through. */ + /* Fall through. */ case C_HIDDEN: /* Ext symbol in dmert public lib. */ /* PR 20722: These symbols can also be generated by building DLLs with --gc-sections enabled. */ diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 89c99fd..46a2b27 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1742,22 +1742,22 @@ elf32_avr_adjust_diff_reloc_value (bfd *abfd, reloc_contents = isec_contents + irel->r_offset; /* Read value written in object file. */ - bfd_vma x = 0; + bfd_signed_vma x = 0; switch (ELF32_R_TYPE (irel->r_info)) { case R_AVR_DIFF8: { - x = *reloc_contents; + x = bfd_get_signed_8 (abfd, reloc_contents); break; } case R_AVR_DIFF16: { - x = bfd_get_16 (abfd, reloc_contents); + x = bfd_get_signed_16 (abfd, reloc_contents); break; } case R_AVR_DIFF32: { - x = bfd_get_32 (abfd, reloc_contents); + x = bfd_get_signed_32 (abfd, reloc_contents); break; } default: @@ -1771,30 +1771,41 @@ elf32_avr_adjust_diff_reloc_value (bfd *abfd, symval () + reloc addend. Compute the start and end addresses and check if the shrinked insn falls between sym1 and sym2. */ - bfd_vma end_address = symval + irel->r_addend; - bfd_vma start_address = end_address - x; + bfd_vma sym2_address = symval + irel->r_addend; + bfd_vma sym1_address = sym2_address - x; + + /* Don't assume sym2 is bigger than sym1 - the difference + could be negative. Compute start and end addresses, and + use those to see if they span shrinked_insn_address. */ + + bfd_vma start_address = sym1_address < sym2_address + ? sym1_address : sym2_address; + bfd_vma end_address = sym1_address > sym2_address + ? sym1_address : sym2_address; - /* Reduce the diff value by count bytes and write it back into section - contents. */ if (shrinked_insn_address >= start_address && shrinked_insn_address <= end_address) { + /* Reduce the diff value by count bytes and write it back into section + contents. */ + bfd_signed_vma new_diff = x < 0 ? x + count : x - count; + switch (ELF32_R_TYPE (irel->r_info)) { case R_AVR_DIFF8: { - *reloc_contents = (x - count); + bfd_put_signed_8 (abfd, new_diff, reloc_contents); break; } case R_AVR_DIFF16: { - bfd_put_16 (abfd, (x - count) & 0xFFFF, reloc_contents); + bfd_put_signed_16 (abfd, new_diff & 0xFFFF, reloc_contents); break; } case R_AVR_DIFF32: { - bfd_put_32 (abfd, (x - count) & 0xFFFFFFFF, reloc_contents); + bfd_put_signed_32 (abfd, new_diff & 0xFFFFFFFF, reloc_contents); break; } default: @@ -1806,6 +1817,43 @@ elf32_avr_adjust_diff_reloc_value (bfd *abfd, } } +static void +elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd, + asection *isec, + Elf_Internal_Rela *irel, bfd_vma symval, + bfd_vma shrinked_insn_address, + bfd_vma shrink_boundary, + int count) +{ + + if (elf32_avr_is_diff_reloc (irel)) + { + elf32_avr_adjust_diff_reloc_value (abfd, isec, irel, + symval, + shrinked_insn_address, + count); + } + else + { + bfd_vma reloc_value = symval + irel->r_addend; + bfd_boolean addend_within_shrink_boundary = + (reloc_value <= shrink_boundary); + + bfd_boolean reloc_spans_insn = + (symval <= shrinked_insn_address + && reloc_value > shrinked_insn_address + && addend_within_shrink_boundary); + + if (! reloc_spans_insn) + return; + + irel->r_addend -= count; + + if (debug_relax) + printf ("Relocation's addend needed to be fixed \n"); + } +} + /* Delete some bytes from a section while changing the size of an instruction. The parameter "addr" denotes the section-relative offset pointing just behind the shrinked instruction. "addr+count" point at the first @@ -1834,7 +1882,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd, struct avr_relax_info *relax_info; struct avr_property_record *prop_record = NULL; bfd_boolean did_shrink = FALSE; - bfd_boolean did_pad = FALSE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec); @@ -1915,7 +1962,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd, to remember we didn't delete anything i.e. don't set did_shrink, so that we don't corrupt reloc offsets or symbol values.*/ memset (contents + toaddr - count, fill, count); - did_pad = TRUE; /* Adjust the TOADDR to avoid moving symbols located at the address of the property record, which has not moved. */ @@ -2016,7 +2062,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd, bfd_vma shrink_boundary = (reloc_toaddr + sec->output_section->vma + sec->output_offset); - bfd_boolean addend_within_shrink_boundary = FALSE; symval += sym_sec->output_section->vma + sym_sec->output_offset; @@ -2031,31 +2076,11 @@ elf32_avr_relax_delete_bytes (bfd *abfd, (unsigned int) (symval + irel->r_addend), (unsigned int) shrinked_insn_address); - /* If we padded bytes, then the boundary didn't change, - so there's no need to adjust addends pointing at the boundary. - If we didn't pad, then we actually shrank the boundary, so - addends pointing at the boundary need to be adjusted too. */ - addend_within_shrink_boundary = did_pad - ? ((symval + irel->r_addend) < shrink_boundary) - : ((symval + irel->r_addend) <= shrink_boundary); - - if (symval <= shrinked_insn_address - && (symval + irel->r_addend) > shrinked_insn_address - && addend_within_shrink_boundary) - { - if (elf32_avr_is_diff_reloc (irel)) - { - elf32_avr_adjust_diff_reloc_value (abfd, isec, irel, + elf32_avr_adjust_reloc_if_spans_insn (abfd, isec, irel, symval, shrinked_insn_address, - count); - } - - irel->r_addend -= count; - - if (debug_relax) - printf ("Relocation's addend needed to be fixed \n"); - } + shrink_boundary, + count); } /* else...Reference symbol is absolute. No adjustment needed. */ } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 76f09bd..05a4776 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -4693,10 +4693,17 @@ do_ifunc_pointer: symbols it's the symbol itself relative to GOT. */ if (h != NULL /* See PLT32 handling. */ - && h->plt.offset != (bfd_vma) -1 + && (h->plt.offset != (bfd_vma) -1 + || eh->plt_got.offset != (bfd_vma) -1) && htab->elf.splt != NULL) { - if (htab->plt_bnd != NULL) + if (eh->plt_got.offset != (bfd_vma) -1) + { + /* Use the GOT PLT. */ + resolved_plt = htab->plt_got; + plt_offset = eh->plt_got.offset; + } + else if (htab->plt_bnd != NULL) { resolved_plt = htab->plt_bnd; plt_offset = eh->plt_bnd.offset; diff --git a/bfd/version.h b/bfd/version.h index 2734af3..e6f720e 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20161113 +#define BFD_VERSION_DATE 20161116 #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/binutils/ChangeLog b/binutils/ChangeLog index 4c4bb6b..3347bdb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,12 @@ +2016-11-14 Rudy + + PR binutils/20814 + * dlltool.c (struct export): Remove hint field. + (make_one_lib_file): Store the ordinal value for IDATA6 not the + hint. + (gen_lib_file): Delete reference to hint field. + (mangle_defs): Delete computation of hint field. + 2016-11-11 Nick Clifton PR binutils/20751 diff --git a/binutils/dlltool.c b/binutils/dlltool.c index e7b40ee..4cde91a 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -780,10 +780,9 @@ typedef struct export int ordinal; int constant; int noname; /* Don't put name in image file. */ - int private; /* Don't put reference in import lib. */ + int private; /* Don't put reference in import lib. */ int data; - int hint; - int forward; /* Number of forward label, 0 means no forward. */ + int forward; /* Number of forward label, 0 means no forward. */ struct export *next; } export_type; @@ -2776,10 +2775,8 @@ make_one_lib_file (export_type *exp, int i, int delay) case IDATA6: if (!exp->noname) { - /* This used to add 1 to exp->hint. I don't know - why it did that, and it does not match what I see - in programs compiled with the MS tools. */ - int idx = exp->hint; + int idx = exp->ordinal; + if (exp->its_name) si->size = strlen (exp->its_name) + 3; else @@ -3263,7 +3260,6 @@ gen_lib_file (int delay) alias_exp.noname = exp->noname; alias_exp.private = exp->private; alias_exp.data = exp->data; - alias_exp.hint = exp->hint; alias_exp.forward = exp->forward; alias_exp.next = exp->next; n = make_one_lib_file (&alias_exp, i + PREFIX_ALIAS_BASE, delay); @@ -3927,10 +3923,8 @@ mangle_defs (void) { /* First work out the minimum ordinal chosen. */ export_type *exp; - - int i; - int hint = 0; export_type **d_export_vec = xmalloc (sizeof (export_type *) * d_nfuncs); + int i; inform (_("Processing definitions")); @@ -3959,11 +3953,6 @@ mangle_defs (void) qsort (d_exports_lexically, i, sizeof (export_type *), nfunc); - /* Fill exp entries with their hint values. */ - for (i = 0; i < d_nfuncs; i++) - if (!d_exports_lexically[i]->noname || show_allnames) - d_exports_lexically[i]->hint = hint++; - inform (_("Processed definitions")); } diff --git a/gas/ChangeLog b/gas/ChangeLog index f5836ac..613833b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2016-11-15 Nick Clifton + + PR gas/20803 + * config/tc-sparc.c (cons_fix_new_sparc): Use unaligned relocs in + the .eh_frame section. + 2016-11-13 Anthony Green * config/tc-moxie.c (md_assemble): Assemble 'bad' opcode. diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index 70f5bfb..d7b9a98 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -4957,7 +4957,10 @@ cons_fix_new_sparc (fragS *frag, case 8: r = BFD_RELOC_SPARC_TLS_DTPOFF64; break; } } - else if (sparc_no_align_cons) + else if (sparc_no_align_cons + || /* PR 20803 - relocs in the .eh_frame section + need to support unaligned access. */ + strcmp (now_seg->name, ".eh_frame") == 0) { switch (nbytes) { diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b4398f6..666beb6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,50 @@ +2016-11-15 Pedro Alves + + * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to + 38237baf99386101934cd93278023aa4ae523ec0. + * gnulib/configure, gnulib/config.in: Regenerate. + * gnulib/import/Makefile.am: Regenerate. + * gnulib/import/Makefile.in: Regenerate. + * gnulib/import/canonicalize-lgpl.c: Update. + * gnulib/import/extra/snippet/c++defs.h: Update. + * gnulib/import/m4/stdint.m4: Update. + * gnulib/import/m4/stdlib_h.m4: Update. + * gnulib/import/math.in.h: Update. + * gnulib/import/stdlib.in.h: Update. + * gnulib/import/sys_time.in.h: Update. + +2016-11-15 Pedro Alves + + * common/common-defs.h: Update comment. + * common/gdb_unique_ptr.h: Update header comment and copyright + year. + (gdb::unique_ptr, gdb::move): Delete. + +2016-11-15 Pedro Alves + + * ada-lang.c (create_excep_cond_exprs): Use std::move instead of + gdb::move. + * break-catch-throw.c (handle_gnu_v3_exceptions): Use + std::unique_ptr instead of gdb::unique_ptr. + * breakpoint.c (watch_command_1): Use std::move instead of + gdb::move. + * cli/cli-dump.c (dump_memory_to_file, restore_binary_file): Use + std::unique_ptr instead of gdb::unique_ptr. + * dtrace-probe.c (dtrace_process_dof_probe): Use std::move instead + of gdb::move. + * elfread.c (elf_read_minimal_symbols): Use std::unique_ptr + instead of gdb::unique_ptr. + * mi/mi-main.c (mi_cmd_data_read_memory): Use std::unique_ptr + instead of gdb::unique_ptr. + * parse.c (parse_expression_for_completion): Use std::move instead + of gdb::move. + * printcmd.c (display_command): std::move instead of gdb::move. + +2016-11-14 Markus Metzger + + * nat/linux-btrace.c (perf_event_read): Allow data_head < size. + * nat/linux-btrace.c (perf_event_read_all): Do not adjust size. + 2016-11-12 Tom Tromey * rust-exp.y (super_name): Use std::vector. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index d9b46c6..73f7964 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -12347,7 +12347,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c) s = cond_string; TRY { - exp = gdb::move (parse_exp_1 (&s, bl->address, + exp = std::move (parse_exp_1 (&s, bl->address, block_for_pc (bl->address), 0)); } @@ -12360,7 +12360,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c) END_CATCH } - ada_loc->excep_cond_expr = gdb::move (exp); + ada_loc->excep_cond_expr = std::move (exp); } do_cleanups (old_chain); diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index 6136a57..955b2ff 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -399,7 +399,7 @@ handle_gnu_v3_exceptions (int tempflag, char *except_rx, char *cond_string, _("invalid type-matching regexp")); } - gdb::unique_ptr cp (new exception_catchpoint ()); + std::unique_ptr cp (new exception_catchpoint ()); init_catchpoint (&cp->base, get_current_arch (), tempflag, cond_string, &gnu_v3_exception_catchpoint_ops); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 245e078..d139747 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -11378,7 +11378,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty, b->thread = thread; b->disposition = disp_donttouch; b->pspace = current_program_space; - w->exp = gdb::move (exp); + w->exp = std::move (exp); w->exp_valid_block = exp_valid_block; w->cond_exp_valid_block = cond_exp_valid_block; if (just_location) diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index eb7f69d..781c638 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -236,7 +236,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format) /* FIXME: Should use read_memory_partial() and a magic blocking value. */ - gdb::unique_ptr buf (new gdb_byte[count]); + std::unique_ptr buf (new gdb_byte[count]); read_memory (lo, buf.get (), count); /* Have everything. Open/write the data. */ @@ -550,7 +550,7 @@ restore_binary_file (const char *filename, struct callback_data *data) perror_with_name (filename); /* Now allocate a buffer and read the file contents. */ - gdb::unique_ptr buf (new gdb_byte[len]); + std::unique_ptr buf (new gdb_byte[len]); if (fread (buf.get (), 1, len, file) != len) perror_with_name (filename); diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 8fbb4bf..69254c8 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -87,7 +87,7 @@ #define EXTERN_C_PUSH extern "C" { #define EXTERN_C_POP } hooks/post-receive -- Repository for Project Archer.