]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
7 years agoNew plugin interface to get list of symbols wrapped with --wrap option. binutils-2_29-branch
Sriraman Tallam [Thu, 22 Feb 2018 21:56:46 +0000 (13:56 -0800)] 
New plugin interface to get list of symbols wrapped with --wrap option.

2018-02-22  Sriraman Tallam  <tmsriram@google.com>

* plugin.cc (get_wrap_symbols): New plugin interface.
(load): Add get_wrap_symbols to transfer vector.
* plugin-api.h (ld_plugin_get_wrap_symbols): New plugin interface.
* testsuite/plugin_test.c (onload): Call and check get_wrap_symbols
interface.
* testsuite/plugin_test_wrap_symbols.sh: New test script.
* testsuite/plugin_test_wrap_symbols_1.cc: New file.
* testsuite/plugin_test_wrap_symbols_2.cc: New file.
* testsuite/Makefile.am (plugin_test_wrap_symbols): New test.
* testsuite/Makefile.in: Regenerate.

(cherry picked from commit 0b65c07b97c43e8891c2e14061270878a85222c8)

7 years agoFix symbol resolution with linker plugins for defsym symbols.
Sriraman Tallam [Fri, 16 Feb 2018 01:35:16 +0000 (17:35 -0800)] 
Fix symbol resolution with linker plugins for defsym symbols.

2018-02-07  Sriraman Tallam  <tmsriram@google.com>

* expression.cc (Symbol_expression::set_expr_sym_in_real_elf):
New method.
(Unary_expression::set_expr_sym_in_real_elf): New method.
(Binary_expression::set_expr_sym_in_real_elf): New method.
(Trinary_expression::set_expr_sym_in_real_elf): New method.
* plugin.cc (get_symbol_resolution_info): Fix symbol resolution if
defined or used in defsyms.
* plugin.h (Plugin_manager::is_defsym_def): New method.
(Plugin_manager::Plugin_manager): Initialize defsym_defines_set_.
(Plugin_manager::defsym_defines_set_): New member.
(Plugin_manager::Defsym_defines_set): New typedef.
* script.cc (Script_options::set_defsym_uses_in_real_elf): New method.
(Script_options::find_defsym_defs): New method.
* script.h (Expression::set_expr_sym_in_real_elf): New method.
(Symbol_assignment::is_defsym): New method.
(Symbol_assignment::value): New method.
(Script_options::find_defsym_defs): New method.
(Script_options::set_defsym_uses_in_real_elf): New method.
* testsuite/Makefile.am (plugin_test_defsym): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/plugin_test.c: Check for new symbol resolution.
* testsuite/plugin_test_defsym.sh: New script.
* testsuite/plugin_test_defsym.c: New test source.

(cherry picked from commit 3281b315c89caf1d539a316e41cc095e46482f75)

7 years agoApply:
Eric Christopher [Wed, 8 Nov 2017 22:03:55 +0000 (14:03 -0800)] 
Apply:

2017-11-08  Kyle Butt  <iteratee@google.com>

        * object.cc (do_find_special_sections): Fix a thinko with memmem return
        values and check for != NULL rather than == 0.

7 years agoPR ld/22972 on SPARC.
Eric Botcazou [Wed, 28 Mar 2018 10:17:15 +0000 (12:17 +0200)] 
PR ld/22972 on SPARC.

This is a regression for the corner case of a hidden symbol in a PIC/PIE
binary which is subject to both a new-style GOTDATA relocation and an
old-style GOT relocation.  In this case, depending  on the link order,
the R_SPARC_RELATIVE dynamic relocation for the GOT slot needed because
of the old-style relocation can be replaced with R_SPARC_NONE coming
from the GOTDATA relocation.

The fix simply records whether an old-style GOT relocation is seen for a
symbol and prevents the R_SPARC_NONE from being generated in this case.

bfd/
* elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
has_old_style_got_reloc.
(_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
relocations.  Fix a couple of long lines.
(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
a R_SPARC_NONE for the GOT slot if the symbol is also subject to
old-style GOT relocations.
ld/
* testsuite/ld-sparc/sparc.exp: Add test for mixed GOTDATA/GOT relocs.
* testsuite/ld-sparc/gotop-hidden.c: New file.
* testsuite/ld-sparc/got-hidden32.s: Likewise.
* testsuite/ld-sparc/got-hidden64.s: Likewise.
* testsuite/ld-sparc/pass.out: Likewise.

7 years agoNew option -z,keep-text-section prefix.
Sriraman Tallam [Wed, 7 Mar 2018 20:15:49 +0000 (12:15 -0800)] 
New option -z,keep-text-section prefix.

This option does not merge certain text sections with prefixes
.text.hot, .text.unlikely, .text.startup and .text.exit.

* layout.cc (Layout::default_section_order): Check for text section
prefixes.
(Layout::text_section_name_mapping): New static member.
(Layout::text_section_name_mapping_count): New static member.
(Layout::match_section_name): New static function.
(Layout::output_section_name): Check for text section prefixes.
* layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value.
(Output_section_order::ORDER_TEXT_STARTUP): New enum value.
(Output_section_order::ORDER_TEXT_EXIT): New enum value.
(Output_section_order::ORDER_TEXT_UNLIKELY): New enum value.
(Layout::text_section_name_mapping): New static member.
(Layout::text_section_name_mapping_count): New static member.
(Layout::match_section_name): New static function.
* options.h (keep_text_section_prefix): New -z option.
* testsuite/Makefile.am (keep_text_section_prefix): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/keep_text_section_prefix.cc: New test source.
* testsuite/keep_text_section_prefix.sh: New test script.

(cherry picked from commit 779bdadbea9a62e5a2203651703e15edd321b9d6)

7 years agoAnother merge
Nick Clifton [Thu, 22 Feb 2018 14:39:19 +0000 (14:39 +0000)] 
Another merge

7 years agoFix memory corruption when using memcpy to overwtite a string in place.
A. Wilcox [Thu, 22 Feb 2018 13:00:36 +0000 (13:00 +0000)] 
Fix memory corruption when using memcpy to overwtite a string in place.

PR 22014
* config/tc-mips.c (mips_lookup_insn): Use memmove to strip the
instruction size suffix.

7 years agoFix GOT relocation overflow on SPARC.
Eric Botcazou [Sat, 10 Feb 2018 01:54:58 +0000 (02:54 +0100)] 
Fix GOT relocation overflow on SPARC.

There are 2 failures left in the linker testsuite on SPARC64/Linux and
they are caused by 2 different issues leading to the same end effect:
the overflow of the relocation section for the GOT, i.e. the linker
generates too many dynamic relocations for the GOT wrt the size of the
relocation section, leading to memory corruption and missing relocations
in the final binary.

The first issue was introduced by:
  https://sourceware.org/ml/binutils/2017-06/msg00368.html
which makes the linker generate more R_SPARC_RELATIVE relocations for
the GOT without adjusting the size of the relocation section.  This is
fixed by (1) preventively adjusting this size in allocate_dynrelocs and
(2) generating R_SPARC_NONE if needed when R_SPARC_GOTDATA_OP is relaxed.

The second issue is that we generate a GOT relocation for an undefined
weak symbol with non-default visibility in a PIC binary without accounting
for that  in the size of the relocation section.  Since the address of the
symbol should resolve to 0 at run time, it is fixed by not generating the
relocation at all, i.e. leaving the GOT entry zeroed.

bfd/
* elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
(sparc_elf_append_rela): Assert that there is enough room in section.
(_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
(_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
(allocate_dynrelocs): Remove outdated comments and reorder conditions.
For a symbol subject to a GOT relocation, reserve a slot in the
relocation section if the symbol isn't dynamic and we are in PIC mode.
(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
<R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
<R_SPARC_PC10>: Reorder conditions.  Remove always-false assertion.
(_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
resolved_to_zero.  Do not generate a dynamic GOT relocation for an
undefined weak symbol with non-default visibility.  Remove superfluous
'else' and fix formatting.

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Jan 2018 00:03:47 +0000 (00:03 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Jan 2018 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Jan 2018 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years ago2018-01-12 Eric Christopher <echristo@gmail.com>
Eric Christopher [Fri, 12 Jan 2018 19:12:55 +0000 (11:12 -0800)] 
2018-01-12  Eric Christopher  <echristo@gmail.com>

    Apply from master:
    2018-01-12 Sterling Augustine <saugustine@google.com>

        * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
        conditionals and calls to is_forwarder.

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Jan 2018 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Jan 2018 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Jan 2018 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Jan 2018 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Jan 2018 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Jan 2018 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Jan 2018 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Jan 2018 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Jan 2018 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Jan 2018 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Jan 2018 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Jan 2018 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 31 Dec 2017 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Dec 2017 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Dec 2017 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Dec 2017 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Dec 2017 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 Dec 2017 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 25 Dec 2017 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Dec 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 23 Dec 2017 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 22 Dec 2017 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 21 Dec 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 20 Dec 2017 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 19 Dec 2017 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoPR22626, invalid dynindx used for dynamic relocs against section syms
Alan Modra [Mon, 18 Dec 2017 11:57:08 +0000 (22:27 +1030)] 
PR22626, invalid dynindx used for dynamic relocs against section syms

_bfd_elf_link_renumber_dynsyms is called twice by the linker.  The
first call in bfd_elf_size_dynamic_sections is just to answer the
question as to whether there are there any dynamic symbols.  The
second call in bfd_elf_size_dynsym_hash_dynstr sets the st_shndx value
that dynamic symbols will have.  strip_excluded_output_sections is
called between these two calls.  So sections seen on the first
_bfd_elf_link_renumber_dynsyms pass might differ from those seen on
the second pass.  Unfortunately, that can result in a stripped
section's dynamic symbol being assigned a dynindx on the first pass
but not corrected to the final value (of zero, ie. not dynamic) on the
second pass.  PowerPC, x86, mips, and most other targets that emit
dynamic section symbols, just test that section symbol dynindx is
non-zero before using a given section symbol in dynamic relocations.

This patch prevents _bfd_elf_link_renumber_dynsyms from setting any
section symbol dynindx on the first pass.

PR 22626
* elflink.c (_bfd_elf_link_renumber_dynsyms): Don't set section
dynindx when section_sym_count is NULL.
(bfd_elf_size_dynamic_sections): Pass NULL section_sym_count to
preliminary _bfd_elf_link_renumber_dynsyms call.

(cherry picked from commit 63f452a8bfd9c89b56dcc087cea84151e7a9ec24)

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 18 Dec 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 17 Dec 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 16 Dec 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 15 Dec 2017 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 14 Dec 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 13 Dec 2017 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoDon't mask X_add_number containing a register number
Alan Modra [Tue, 12 Dec 2017 00:26:23 +0000 (10:56 +1030)] 
Don't mask X_add_number containing a register number

It's obviously wrong to mask SPRs to 8 bits.

PR 21118
* config/tc-ppc.c (md_assemble): Don't mask register number.

(cherry picked from commit 4b1c0f7e85f2aec3df3498d04b5beaf45813dea8)

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 12 Dec 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 11 Dec 2017 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 10 Dec 2017 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 9 Dec 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 8 Dec 2017 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 7 Dec 2017 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 6 Dec 2017 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Dec 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 4 Dec 2017 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 3 Dec 2017 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoFix incremental linking failure with GCC 7+.
Cary Coutant [Sat, 2 Dec 2017 06:03:09 +0000 (22:03 -0800)] 
Fix incremental linking failure with GCC 7+.

With the new compiler, we're running out of patch space for the .eh_frame
section. To workaround that issue, we compile the before and after versions
both with no unwind tables.

gold/
PR gold/22309
* testsuite/Makefile.am (two_file_test_1_v1_ndebug.o): Compile with
no EH information.
(two_file_test_1_ndebug.o): Likewise.
* testsuite/Makefile.in: Regenerate.
* testsuite/two_file_test_1.cc: Touch to force recompilation with new
flags.
* testsuite/two_file_test_1_v1.cc: Likewise.

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 2 Dec 2017 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Dec 2017 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoFix internal error in fix_errata on aarch64.
Peter Smith [Thu, 30 Nov 2017 23:07:26 +0000 (15:07 -0800)] 
Fix internal error in fix_errata on aarch64.

The addresses of erratum stubs can be changed by relaxation passes, and
need to be updated.

gold/
PR gold/20765
* aarch64.cc (Aarch64_relobj::update_erratum_address): New method.
(AArch64_relobj::scan_errata): Update addresses in stub table after
relaxation pass.

7 years agoFix problem where erratum stubs are not always applied.
Cary Coutant [Thu, 30 Nov 2017 21:44:28 +0000 (13:44 -0800)] 
Fix problem where erratum stubs are not always applied.

I checked over the results of applying --fix-cortex-a53-843419 to
a very large program (gitit) with two stub tables and thousands
of erratum fixes. I noticed that all the erratum_stubs were being
created but about 1/3 of them were being skipped over by
fix_errata_and_relocate_erratum_stubs(). By skipped over I mean
no branch relocation or adrp -> adr transformation was applied to
the erratum address, leaving the erratum_stub unreachable, and
with a branch with a 0 immediate.

The root cause of the skipped over erratum_stubs is
Erratum_stub::invalidate_erratum_stub() that is used to set
relobj_ to NULL when an erratum_stub has been processed.
Unfortunately relobj_ is used in operator<() so altering relobj
makes the results from erratum_stubs_.lower_bound() as used in
find_erratum_stubs_for_input_section() unreliable.

2017-11-30  Peter Smith  <peter.smith@linaro.org>
    Cary Coutant  <ccoutant@gmail.com>

gold/
PR gold/20765
* aarch64.cc (Erratum_stub::invalidate_erratum_stub): Use erratum_insn_
instead of relobj_ to invalidate the stub.
(Erratum_stub::is_invalidated_erratum_stub): Likewise.

7 years agoFix segfault in relocate_erratum_stub on aarch64.
Peter Smith [Thu, 30 Nov 2017 21:30:58 +0000 (13:30 -0800)] 
Fix segfault in relocate_erratum_stub on aarch64.

The fix for PR21868 (an internal error when --fix-cortex-a53-843419
is applied) has a small mistake in it. When the stub_owner section
needs an erratum fix an incorrect address for the stubs for the section
is given to relocate_erratum_stub. If we are lucky we will get a segfault;
if we aren't, an incorrect patch or data corruption is possible.
The error is visible in PR21868, but the side-effects aren't fatal.

gold/
PR gold/22233
* aarch64.cc (AArch64_relobj::fix_errata_and_relocate_erratum_stubs):
Fix calculation of stub address.

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Nov 2017 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Nov 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Nov 2017 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Nov 2017 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Nov 2017 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Nov 2017 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Nov 2017 00:01:55 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoPR22431, powerpc64 ld segfault when .plt discarded
Alan Modra [Tue, 14 Nov 2017 08:17:34 +0000 (18:47 +1030)] 
PR22431, powerpc64 ld segfault when .plt discarded

The fix for the PR is to not use input_section->output_section->owner
to get to the output bfd, but use the output bfd directly since it is
available nowadays in struct bfd_link_info.

I thought it worth warning when non-empty dynamic sections are
discarded too, which meant a tweak to one of the ld tests to avoid the
warning.

bfd/
PR 22431
* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
non-empty dynamic section.
(ppc_build_one_stub): Take elf_gp from output bfd, not output
section owner.
(ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
ld/
* testsuite/ld-elf/note-3.t: Don't discard .got.

(cherry picked from commit 06bcf5416feae129e239476ab1408e038bba171d)

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Nov 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Nov 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoFix typo in ChangeLog entry.
Cary Coutant [Mon, 20 Nov 2017 02:02:31 +0000 (18:02 -0800)] 
Fix typo in ChangeLog entry.

7 years agoFix DWARF reader to use correct size for DW_FORM_ref_addr.
Cary Coutant [Mon, 20 Nov 2017 01:56:30 +0000 (17:56 -0800)] 
Fix DWARF reader to use correct size for DW_FORM_ref_addr.

2017-11-19  Ian Lance Taylor  <iant@google.com>
    Cary Coutant  <ccoutant@gmail.com>

gold/
* gold/dwarf_reader.h (class Dwarf_info_reader): Add ref_addr_size
method.
* gold/dwarf_reader.cc (Dwarf_die::read_attributes): Use ref_addr_size
for DW_FORM_ref_addr_size.
(Dwarf_die::skip_attributes): Likewise.

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Nov 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Nov 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Nov 2017 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Nov 2017 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Nov 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Nov 2017 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Nov 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Nov 2017 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Nov 2017 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Nov 2017 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Nov 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Nov 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Nov 2017 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Nov 2017 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Nov 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Nov 2017 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoProper bound check in _bfd_doprnt_scan
Alan Modra [Sun, 5 Nov 2017 09:22:13 +0000 (19:52 +1030)] 
Proper bound check in _bfd_doprnt_scan

While an abort after storing out of bounds by one to an array in our
caller is probably OK in practice, it's better to check before storing.

PR 22397
* bfd.c (_bfd_doprnt_scan): Check args index before storing, not
after.

(cherry picked from commit 26a9301057457ae576b51b8127bb805b4e484a6b)

7 years agoPR22397, BFD internal error when message locale isn't C
Alan Modra [Sun, 5 Nov 2017 05:52:55 +0000 (16:22 +1030)] 
PR22397, BFD internal error when message locale isn't C

This adds positional parameter support to the bfd error handler,
something that was lost 2017-04-13 when _doprnt was added with commit
c08bb8dd.  The number of format args is now limited to 9, which is
sufficient for current _bfd_error_handler messages.  If someone
exceeds 9 args they get the joy of modifying this code to support more
args (shouldn't be too difficult).

PR 22397
* bfd.c (union _bfd_doprnt_args): New.
(PRINT_TYPE): Add FIELD arg.  Take value from args.
(_bfd_doprnt): Replace ap parameter with args.  Adjust all
PRINT_TYPE invocations and reading of format args to suit.
Move "%%" handling out of switch handling args.  Support
positional parameters.
(_bfd_doprnt_scan): New function.
(error_handler_internal): Call _bfd_doprnt_scan and read args.

(cherry picked from commit 7167fe4c70ea74f1bb74a6130bb7e6bf5ca354ee)

7 years agoRename _doprnt -> _bfd_doprnt to fix DJGPP bfd build (and likely others)
Pedro Alves [Wed, 11 Oct 2017 11:47:25 +0000 (12:47 +0100)] 
Rename _doprnt -> _bfd_doprnt to fix DJGPP bfd build (and likely others)

Building bfd/ for DJGPP, I see:

 ../../src/bfd/bfd.c:642:1: error: conflicting types for '_doprnt'
  _doprnt (FILE *stream, const char *format, va_list ap)
  ^~~~~~~
 In file included from ../../src/bfd/sysdep.h:37:0,
  from ../../src/bfd/bfd.c:367:
 /usr/lib64/gcc/i586-pc-msdosdjgpp/6.1.0/include-fixed/stdio.h:171:5: note: previous declaration of '_doprnt' was here
  int _doprnt(const char *_fmt, va_list _args, FILE *_f);
      ^~~~~~~

Possible fixes the build on other systems too -- _doprnt was/is an
exported symbol on old Unix/BSD systems too.

bfd/ChangeLog:
2017-10-11  Pedro Alves  <palves@redhat.com>

* bfd.c (_doprnt): Rename to ...
(_bfd_doprnt): ... this.
(error_handler_internal): Adjust.

(cherry picked from commit 8f314ad58ec824ce6c8467af29f11583f79a80ea)

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Nov 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Nov 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Nov 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Nov 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agofrv-elf --gc-sections failures
Alan Modra [Mon, 30 Oct 2017 01:32:42 +0000 (12:02 +1030)] 
frv-elf --gc-sections failures

git commit 81742b83e9 exposed an frv-elf bug, with the object id not
matching the hash table id.

* elf32-frv.c (ELF_TARGET_ID): Don't define for generic
elf target.

7 years agorelocs_compatible test for gc-sections
Alan Modra [Sun, 29 Oct 2017 23:50:29 +0000 (10:20 +1030)] 
relocs_compatible test for gc-sections

I noticed when looking at pr22300 that before calling check_relocs we
have an elf_object_id test (added for pr11933) as well as the
relocs_compatible test.  I believe backend gc_mark_hook and
gc_sweep_hook ought to be protected similarly from being confused by
unexpected relocations (for example, both elf64-ppc.c and elf32-ppc.c
use _bfd_elf_relocs_compatible, so I think it would be possible for
the ppc64 gc_mark_hook to be presented with a ppc32 relocatable
object).

* elflink.c (elf_gc_sweep): Test elf_object_id in addition to
relocs_compatible.
(bfd_elf_gc_sections): Likewise.

7 years agoPR22300, Abort in elf32_hppa_relocate_section building polyml
Alan Modra [Sat, 28 Oct 2017 03:40:55 +0000 (14:10 +1030)] 
PR22300, Abort in elf32_hppa_relocate_section building polyml

polyml produces object files with the wrong OS/ABI for hppa-linux.
This, along with the fact that elf32-hppa.c is using the strictest
backend relocs_compatible, results in wrong merging of ELF symbols.

So, remove the relocs_compatible check in _bfd_elf_merge_symbol.
_bfd_elf_merge_symbol is only called nowadays from within blocks
protected by is_elf_hash_table, so "we are doing an ELF link" as the
removed comment says, is true.

Also relax relocs_compatible for hppa and powerpc.  relocs_compatible
is used for more than just merging symbols, as the name suggests.
This allows objects that are in fact reasonably compatible to be
linked.

PR 22300
* elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
* elf32-hppa.c (elf_backend_relocs_compatible): Define.
* elf32-ppc.c (elf_backend_relocs_compatible): Define.
* elf64-ppc.c (elf_backend_relocs_compatible): Define.

(cherry picked from commit c0e331c794d6bd75d9be9bea6145513074c33f39)

7 years agoPR22348, conflicting global vars in crx and cr16
Alan Modra [Wed, 25 Oct 2017 11:29:14 +0000 (21:59 +1030)] 
PR22348, conflicting global vars in crx and cr16

include/
PR 22348
* opcode/cr16.h (instruction): Delete.
(cr16_words, cr16_allWords, cr16_currInsn): Delete.
* opcode/crx.h (crx_cst4_map): Rename from cst4_map.
(crx_cst4_maps): Rename from cst4_maps.
(crx_no_op_insn): Rename from no_op_insn.
(instruction): Delete.
opcodes/
PR 22348
* cr16-dis.c (cr16_cinvs, instruction, cr16_currInsn): Make static.
(cr16_words, cr16_allWords, processing_argument_number): Likewise.
(imm4flag, size_changed): Likewise.
* crx-dis.c (crx_cinvs, NUMCINVS, instruction, currInsn): Likewise.
(words, allWords, processing_argument_number): Likewise.
(cst4flag, size_changed): Likewise.
* crx-opc.c (crx_cst4_map): Rename from cst4_map.
(crx_cst4_maps): Rename from cst4_maps.
(crx_no_op_insn): Rename from no_op_insn.
gas/
PR 22348
* config/tc-crx.c (instruction, output_opcode): Make static.
(relocatable, ins_parse, cur_arg_num): Likewise.
(parse_insn): Adjust for renamed opcodes globals.
(check_range): Likewise

(cherry picked from commit e5d70d6b5a5c2832ad199ac1b91f68324b4a12c9)