]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
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)

7 years agoAllow for __gnu_lto_slim prefixed with extra "_"
Alan Modra [Wed, 25 Oct 2017 05:02:52 +0000 (15:32 +1030)] 
Allow for __gnu_lto_slim prefixed with extra "_"

Some targets prefix global symbols with "_".

bfd/
* archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
optionally prefixed with "_".
* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
binutils/
* nm.c (filter_symbols): Match "__gnu_lto_slim" optionally prefixed
with "_".
gold/
* symtab.cc (Symbol_table::add_from_relobj): Match "__gnu_lto_slim"
optionally prefixed with "_".
ld/
* testsuite/ld-plugin/lto-3r.d: Match "__gnu_lto_v" optionally
prefixed with "_".
* testsuite/ld-plugin/lto-5r.d: Likewise.

(cherry picked from commit e601d38b7cc222345d4128f45db18529b9fb477b)

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 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 [Tue, 31 Oct 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Oct 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, 29 Oct 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Oct 2017 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Oct 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, 25 Oct 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Oct 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, 23 Oct 2017 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Oct 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, 19 Oct 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

7 years ago[GOLD] Fix powerpc64 optimization of TOC accesses
Alan Modra [Tue, 17 Oct 2017 14:03:05 +0000 (00:33 +1030)] 
[GOLD] Fix powerpc64 optimization of TOC accesses

Fixes a thinko.  Given code that puts variables into the TOC (a bad
idea, but some see the TOC as a small data section) this bug could
result in an attempt to optimize a sequence that should not be
optimized.

* powerpc.cc (Target_powerpc::Scan::local): Correct dst_off
calculation for TOC16 relocs.
(Target_powerpc::Scan::global): Likewise.

(cherry picked from commit 412294daf8786fd9060059b8be7fc59a35e13922)

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

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Oct 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, 15 Oct 2017 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Oct 2017 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Oct 2017 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Oct 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Oct 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

7 years agobfd_error_on_input is for archives
Alan Modra [Thu, 5 Oct 2017 00:36:44 +0000 (11:06 +1030)] 
bfd_error_on_input is for archives

* elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
fini_array error value.

(cherry picked from commit 8c6716e57eb991ba6ceb07011045d626652aaf01)

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

7 years agoPR22245, Fix potential UB in bfd_set_error
Pavel I. Kryukov [Tue, 3 Oct 2017 19:42:07 +0000 (22:42 +0300)] 
PR22245, Fix potential UB in bfd_set_error

Passing enum as a first argument to variadic argument function
may lead to undefined behavior. The explanation on CERT site:
https://www.securecoding.cert.org/confluence/display/cplusplus/
EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start

The bug was found by Kirill Nedostoev (nedostoev.ka@phystech.edu)
when he tried to build GNU binutils with Clang 7.

PR 22245
* bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
undergoes default promotion.
* bfd-in2.h: Regenerate.

(cherry picked from commit 9ba5f27cdd15d22d6c5739ff5d2b1c81d796e114)

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

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

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Oct 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

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

7 years agoPR22220, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY
Alan Modra [Thu, 28 Sep 2017 07:41:38 +0000 (17:11 +0930)] 
PR22220, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY

non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.

bfd/
PR 22220
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr22220.h,
* testsuite/ld-plugin/pr22220lib.cc,
* testsuite/ld-plugin/pr22220lib.ver,
* testsuite/ld-plugin/pr22220main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.

(cherry picked from commit 1a3b5c34fe371f618402f811a981839c9191ff9f)

7 years ago[GOLD] Set non-exec stack for ppc64
Alan Modra [Fri, 22 Sep 2017 01:34:41 +0000 (11:04 +0930)] 
[GOLD] Set non-exec stack for ppc64

gcc doesn't emit stack notes for ELFv1, since ELFv1 never needs an
executable stack.  Note that ELFv1 is usually big-endian and ELFv2
little-endian, but the ABI is really orthogonal to endiannes.

* powerpc.cc (Target_powerpc<64,*>::powerpc_info): Set
is_default_stack_executable false.

(cherry picked from commit ec76901011c5af6a565936d4ad87247c51901b58)

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

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

7 years agox86-64: Don't pass output_bfd to info->callbacks->minfo
H.J. Lu [Tue, 26 Sep 2017 21:41:22 +0000 (14:41 -0700)] 
x86-64: Don't pass output_bfd to info->callbacks->minfo

Don't pass output_bfd to info->callbacks->minfo when dumping local IFUNC
functions in the map file.

PR ld/22199
* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
output_bfd to info->callbacks->minfo.

(cherry picked from commit ac69a0d75bf472a140e5405c8a90420d5f63a998)

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

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

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Sep 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, 23 Sep 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agox86: Guard against corrupted PLT
H.J. Lu [Fri, 22 Sep 2017 21:15:40 +0000 (14:15 -0700)] 
x86: Guard against corrupted PLT

There should be only one entry in PLT for a given symbol.  Set howto to
NULL after processing a PLT entry to guard against corrupted PLT so that
the duplicated PLT entries are skipped.

PR binutils/22170
 * elf32-i386.c (elf_i386_get_synthetic_symtab): Guard against
 corrupted PLT.
 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.

(cherry picked from commit 61e3bf5f83f7e505b6bc51ef65426e5b31e6e360)

7 years agox86: Return -1 if bfd_canonicalize_dynamic_reloc returns 0
H.J. Lu [Fri, 22 Sep 2017 14:25:16 +0000 (07:25 -0700)] 
x86: Return -1 if bfd_canonicalize_dynamic_reloc returns 0

Stop if bfd_canonicalize_dynamic_reloc returns 0.

PR binutils/22163
* elf32-i386.c (elf_i386_get_synthetic_symtab): Also return -1
if bfd_canonicalize_dynamic_reloc returns 0.
* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.

(cherry picked from commit b69e9267d15a09ce3f3d4599eae2952dfc6df502)

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