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

7 years agoreadelf: Handle E_MIPS_MACH_5900
Maciej W. Rozycki [Thu, 21 Sep 2017 23:54:19 +0000 (00:54 +0100)] 
readelf: Handle E_MIPS_MACH_5900

Fix commit e407c74b5b60 ("Support for MIPS R5900 (Sony Playstation 2)"),
<https://sourceware.org/ml/binutils/2012-12/msg00240.html>, and add the
handling of E_MIPS_MACH_5900, correctly showing `5900' among `Flags:' in
the output of `-h' rather than `unknown CPU'.

binutils/
* readelf.c (get_machine_flags) <E_MIPS_MACH_5900>: New case.

gas/
* testsuite/gas/mips/elf_mach_5900.d: New test.
* testsuite/gas/mips/mips.exp: Run it.

(cherry picked from commit ef272caa7482bd9031e82a2e6f1b81870fe2129e)

7 years agoRe Revert previous change to bfd/development.sh, setting the development flag back...
Nick Clifton [Thu, 21 Sep 2017 14:17:28 +0000 (15:17 +0100)] 
Re Revert previous change to bfd/development.sh, setting the development flag back to true.

This flag should only be set in release tarballs, not on branches,
as branches will continue to receive development updates.

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

7 years agoAdd --no-relax option.
James Clarke [Fri, 4 Aug 2017 05:44:21 +0000 (22:44 -0700)] 
Add --no-relax option.

gold/
* options.h (General_options): Set a non-NULL second help string
argument for relax to allow --no-relax.

7 years agoSet the development flag to false on the 2.29 branch.
Nick Clifton [Wed, 20 Sep 2017 08:45:15 +0000 (09:45 +0100)] 
Set the development flag to false on the 2.29 branch.

* development.sh (development): Set to false.

7 years ago[GOLD] PowerPC function address in non-PIC
Alan Modra [Tue, 19 Sep 2017 23:47:56 +0000 (09:17 +0930)] 
[GOLD] PowerPC function address in non-PIC

ppc32, like many targets, defines the address of a function as the PLT
call stub code for functions referenced but not defined in a non-PIC
executable.  ppc32 gold, unlike other targets, inherits the ppc64
multiple stub capability for dealing with very large binaries where
one set of stubs can't be reached from all code locations.  This means
there can be multiple choices of address for a function, which might
cause function pointer comparison failures.  So for ppc32, make
non-branch references always use the first stub group.

(PowerPC64 ELFv1 is always PIC so doesn't need to define the address
of an external function as the PLT stub.  PowerPC64 ELFv2 needs a
special set of global entry stubs to serve as the address of external
functions, so it too is not affected by this bug.)

* powerpc.cc (Target_powerpc::Branch_info::make_stub): Put
stubs for ppc32 non-branch relocs in first stub table.
(Target_powerpc::Relocate::relocate): Resolve similarly.

(cherry picked from commit 64b5d6d785eb4c337b7c071ab9607186541a8b14)

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

7 years agoFix spelling ypos in changelog entries binutils-2_29_1.1
Nick Clifton [Tue, 19 Sep 2017 14:18:16 +0000 (15:18 +0100)] 
Fix spelling ypos in changelog entries

7 years agoImport xtensa patches from the mainline sources to fix name lookup and sorting.
Nick Clifton [Tue, 19 Sep 2017 13:59:01 +0000 (14:59 +0100)] 
Import xtensa patches from the mainline sources to fix name lookup and sorting.

* xtensa-isa.c (xtensa_isa_init): Don't update lookup table
entries for sysregs with negative indices.

* emultempl/xtensaelf.em (xtensa_wild_group_interleave_callback):
Only check for by_name sorting.

7 years agoChangeLog fixes
Alan Modra [Tue, 19 Sep 2017 08:30:58 +0000 (18:00 +0930)] 
ChangeLog fixes

7 years agoPowerPC64 stubs don't match calculated size
Alan Modra [Tue, 19 Sep 2017 03:52:49 +0000 (13:22 +0930)] 
PowerPC64 stubs don't match calculated size

After the PR 21411 fix, the linker generated .eh_frame for ppc64 glink
can be edited by the generic code.  The sequence of events goes
something like:
1) Some object file adds .eh_frame aligned to 8, making the output
   .eh_frame aligned to at least 8, so linker generated .eh_frame FDE
   is padded to an 8 byte boundary.
2) All .eh_frame past the glink .eh_frame is garbage collected.
3) Generic code detects that last FDE (the glink .eh_frame) doesn't
   need to be padded to an 8 byte boundary, reducing size from 88 to
   84.
4) elf64-ppc.c check fails.

PR 21441
* elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
size.

(cherry picked from commit 25516cc573ff3551a7ac0538e1d3de5811c7199e)

7 years agoPR22150, ld keeps a version reference for gc'd symbols
Alan Modra [Tue, 19 Sep 2017 02:29:30 +0000 (11:59 +0930)] 
PR22150, ld keeps a version reference for gc'd symbols

elf_gc_sweep_symbol should run after verdefs are calculated, since
the verdef code creates symbols for the versions.  However,
elf_gc_sweep_symbol needs to run before verrefs so as to not emit
useless verrefs for symbols that are gc'd.

I've also removed a _bfd_elf_link_renumber_dynsyms calls added by
Maciej after I fussed about it when reviewing.  On further examination
the call appears to be unnecessary.  Looking at renumber_dynsyms also
made me realize that the test to exclude .gnu.version has been wrong
since 2016-04-26 (git commit d5486c4372), so fix that too.

PR 22150
* elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
symbols before calculating verrefs.  Don't renumber dynsyms
after gc.  Exclude .gnu.version when zero or one dynsym.
Localize some vars and reindent.

(cherry picked from commit 3d13f3e9bda5aada68915f5d958f731ae79ed41d)

7 years ago[GOLD, PowerPC] Add --no-stub-group-multi
Alan Modra [Tue, 19 Sep 2017 02:15:51 +0000 (11:45 +0930)] 
[GOLD, PowerPC] Add --no-stub-group-multi

The trouble with stubs per output section is that ppc32 uses a plt
stub as the address of a global function.  This needs to be unique,
otherwise we'll get multiple addresses for a function.

Obviously this is only a partial solution, since ppc32 will get
multiple stubs when code is larger than 33M.  A proper fix will
involve selecting a unique stub to use for non-branch relocs.

* options.h (stub-group-multi): Default to true.  Add
--no-stub-group-multi.

(cherry picked from commit ab502e635e78a6c6c9c8abf3072bfeedaca9c26f)

7 years agoRemove .eh_frame zero terminators
Alan Modra [Thu, 31 Aug 2017 10:09:14 +0000 (19:39 +0930)] 
Remove .eh_frame zero terminators

The machinery to do this was there, but not enabled if the terminator
was the only thing in the section.

bfd/
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
for a section containing just a terminator.  Allow multiple
terminators at end of section.
* elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
sections when not adding alignment.  Assert on terminator in
the middle of FDEs.
ld/
* testsuite/ld-elf/eh3.d: Update.
* testsuite/ld-elf/eh4.d: Update.

(cherry picked from commit 9866ffe25a0fe73f5153f2720650baf0dd9cc828)

7 years agoPR22048, Incorrect .eh_frame section in libc.so
Alan Modra [Thu, 31 Aug 2017 03:18:37 +0000 (12:48 +0930)] 
PR22048, Incorrect .eh_frame section in libc.so

PR 21441
PR 22048
* elflink.c (bfd_elf_discard_info): Don't pad embedded zero
terminators.

(cherry picked from commit af471f828cc74d65b50a7531ba2c69522266cfe9)

7 years agoPR21441, Unnecessary padding of .eh_frame section
Alan Modra [Sun, 13 Aug 2017 23:55:17 +0000 (09:25 +0930)] 
PR21441, Unnecessary padding of .eh_frame section

Until all .eh_frame sections have been edited we don't know their
sizes.  So it isn't possible to properly decide whether a non-empty
.eh_frame section follows a given section until editing is complete.

bfd/
PR 21441
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
alignment padding here.
* elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
in a reverse pass over sections.
ld/
PR 21441
* testsuite/ld-x86-64/pr21038a.d: Adjust.
* testsuite/ld-x86-64/pr21038a-now.d: Adjust.

(cherry picked from commit 79a94a2ad1e6e2f227de07427481e4bb8be84504)

7 years agoRevert "Import patch from mainline to improve padding of .eh_frame sections."
Alan Modra [Tue, 19 Sep 2017 04:52:26 +0000 (14:22 +0930)] 
Revert "Import patch from mainline to improve padding of .eh_frame sections."

This reverts commit 35e01275b59ac867d342379d457e732b5acda6a3.

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

7 years agold: Require GCC 5 or above for 3 x86 tests
H.J. Lu [Wed, 9 Aug 2017 03:20:43 +0000 (20:20 -0700)] 
ld: Require GCC 5 or above for 3 x86 tests

Require GCC 5 or above for 3 x86 tests which fail with GCC 4.9.3.

PR ld/21924
* testsuite/ld-i386/i386.exp: Require GCC 5 or above for
"weakundef1 with PIE" test.
* testsuite/ld-x86-64/tls.exp: Require GCC 5 or above for
"tlsdesc1" and "tlsdesc1 with PIE" tests.

(cherry picked from commit 25d28c91b89d8f4a7e78b98b01e2c2382cea3e60)

7 years agoCheck error return from bfd_canonicalize_dynamic_reloc
H.J. Lu [Mon, 18 Sep 2017 20:05:25 +0000 (13:05 -0700)] 
Check error return from bfd_canonicalize_dynamic_reloc

Since bfd_canonicalize_dynamic_reloc returns -1 on error, check it in
elf_i386_get_synthetic_symtab and elf_x86_64_get_synthetic_symtab.

PR ld/22148
* elf32-i386.c (elf_i386_get_synthetic_symtab): Check error
return from bfd_canonicalize_dynamic_reloc.
* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.

(cherry picked from commit 94670f6cf11fc29cc6db6814b38c4305d9bcac96)

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

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

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

7 years agoBump version to 2.29.1 and regenerate configure files binutils-2_29_1
Nick Clifton [Fri, 15 Sep 2017 12:10:29 +0000 (13:10 +0100)] 
Bump version to 2.29.1 and regenerate configure files

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

7 years agoImport patch from mainline to fix an address violation when parsing a corrupt PE...
Nick Clifton [Thu, 14 Sep 2017 10:27:40 +0000 (11:27 +0100)] 
Import patch from mainline to fix an address violation when parsing a corrupt PE binary.

PR binutils/22113
* peXXigen.c (pe_print_idata): Extend check for HintName vector
entries.

7 years agoRevert "Add enable-gold and enable-ld to src-release"
Alan Modra [Thu, 14 Sep 2017 09:08:44 +0000 (18:38 +0930)] 
Revert "Add enable-gold and enable-ld to src-release"

This reverts commit bd926929f0fae108e24cb51d9f9546b27f0a04df.

7 years agoAdd enable-gold and enable-ld to src-release
matt rice [Wed, 13 Sep 2017 16:46:22 +0000 (09:46 -0700)] 
Add enable-gold and enable-ld to src-release

So that the tarball picks up gold bison output.

* src-release.sh (do_proto_toplev): Enable gold during release process.

(cherry picked from commit 255300f5a96079a9860934c44bb9521e7aca45de)