binutils.git
7 years agoPR22770: MIPS: Fix GOT page counter in multi-got links
James Cowgill [Thu, 1 Mar 2018 11:55:18 +0000 (11:55 +0000)]
PR22770: MIPS: Fix GOT page counter in multi-got links

The record_got_page_entry function records and updates the maximum
number of GOT page entries which may be required by an object. In the
case where an existing GOT page entry was expanded, only the entry
belonging to the master GOT would have its page count updated. This leaves
the entry belonging to the object GOT with the num_pages count of 1 it
was originally initialized with. Later on when GOTs are being merged in a
multi-got link, this causes the value of entry->num_pages in
add_got_page_entries to always be 1 and underestimates the number of pages
required for the new entry. This in turn leads to an assertion failure in
get_got_page_offset where we run out of pages.

Fix by not inserting Got_page_entrys into the object's GOT at all and
later on adding the total number of page entries recorded for the
object's GOT into the new merged GOT. This is safe because
got_page_entries_ is used for no other purpose in the object's GOT, and
page_gotno_ for the object's GOT should already be incremented by the correct
amount in record_got_page_entry. Remove Got_page_entry::num_pages which
is now unused.

gold/
2018-03-01  James Cowgill  <james.cowgill@mips.com>

PR gold/22770
* mips.cc (Mips_got_info::record_got_page_entry): Don't insert
Got_page_entry for object's GOT.
(Mips_got_info::add_got_page_entries): Add all pages from from's GOT.
Rename to add_got_page_count.
(Got_page_entry): Remove num_pages.

Gbp-Pq: Name pr22770-v3.patch

7 years agopr22905
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22905

# DP: Prevent illegal memory accesses triggered by integer overflow
# DP: when parsing corrupt DWARF information on a 32-bit host.

From d11ae95ea3403559f052903ab053f43ad7821e37 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 1 Mar 2018 16:14:08 +0000
Subject: [PATCH] Prevent illegal memory accesses triggered by integer overflow
 when parsing corrupt DWARF information on a 32-bit host.

PR 22905
* dwarf.c (display_debug_ranges): Check that the offset loaded
from the range_entry structure is valid.

Gbp-Pq: Name pr22905.diff

7 years agopr22887
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22887

# DP: PR22887, null pointer dereference in aout_32_swap_std_reloc_out

From 116acb2c268c89c89186673a7c92620d21825b25 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 28 Feb 2018 22:09:50 +1030
Subject: [PATCH] PR22887, null pointer dereference in
 aout_32_swap_std_reloc_out

PR 22887
* aoutx.h (swap_std_reloc_in): Correct r_index bound check.

Gbp-Pq: Name pr22887.diff

7 years agopr22895
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22895

# DP: Catch integer overflows/underflows when parsing corrupt DWARF FORM blocks.

From 12c963421d045a127c413a0722062b9932c50aa9 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 28 Feb 2018 11:50:49 +0000
Subject: [PATCH] Catch integer overflows/underflows when parsing corrupt DWARF
 FORM blocks.

PR 22895
PR 22893
* dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
pointer.  Drop unused abfd parameter.  Check the size of the block
before initialising the data field.  Return the end pointer if the
size is invalid.
(read_attribute_value): Adjust invocations of read_n_bytes.

Gbp-Pq: Name pr22895.diff

7 years agopr22894
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22894

# DP: Fix potential integer overflow when reading corrupt dwarf1

From eef104664efb52965d85a28bc3fc7c77e52e48e2 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 28 Feb 2018 10:13:54 +0000
Subject: [PATCH] Fix potential integer overflow when reading corrupt dwarf1
 debug information.

PR 22894
* dwarf1.c (parse_die): Check the length of form blocks before
advancing the data pointer.

Gbp-Pq: Name pr22894.diff

7 years agopr22741
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22741

# DP: PR22741, objcopy segfault on fuzzed COFF object

From eb77f6a4621795367a39cdd30957903af9dbb815 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Sat, 27 Jan 2018 08:19:33 +1030
Subject: [PATCH] PR22741, objcopy segfault on fuzzed COFF object

PR 22741
* coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
range before converting to a symbol table pointer.

Gbp-Pq: Name pr22741.diff

7 years agoPrevent attempts to call strncpy with a zero-length field by chacking the size of...
Nick Clifton [Tue, 6 Feb 2018 15:48:29 +0000 (15:48 +0000)]
Prevent attempts to call strncpy with a zero-length field by chacking the size of debuglink sections.

PR 22794
* opncls.c (bfd_get_debug_link_info_1): Check the size of the
section before attempting to read it in.
(bfd_get_alt_debug_link_info): Likewise.

Gbp-Pq: Name pr22794.diff

7 years agoPR22769, crash when running 32-bit objdump on corrupted file
Alan Modra [Thu, 1 Feb 2018 07:31:00 +0000 (18:01 +1030)]
PR22769, crash when running 32-bit objdump on corrupted file

PR 22769
* objdump.c (load_specific_debug_section): Check for overflow
when adding one to section size for a string section terminator.

Gbp-Pq: Name pr22769.diff

7 years agoPR22746, crash when running 32-bit objdump on corrupted file
Alan Modra [Thu, 25 Jan 2018 11:17:41 +0000 (21:47 +1030)]
PR22746, crash when running 32-bit objdump on corrupted file

Avoid unsigned int overflow by performing bfd_size_type multiplication.

PR 22746
* elfcode.h (elf_object_p): Avoid integer overflow.

Gbp-Pq: Name pr22746.diff

7 years agopr22734
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
pr22734

# DP: Fix PR binutils/22734, taken from the trunk.

2018-01-30  Nick Clifton  <nickc@redhat.com>

PR 22734
* doc/binutils.texi (nm): Update description to point out that
zero-initialized values can also be shown as type B, b, S or s
since they can be stored in the BSS section.

Gbp-Pq: Name pr22734.diff

7 years agogold-no-keep-files-mapped
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
gold-no-keep-files-mapped

# DP: gold on 32bit archs: Release mapped files after each pass.

Gbp-Pq: Name gold-no-keep-files-mapped.diff

7 years agostrings-whitespace-arg
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
strings-whitespace-arg

binutils/

* strings.c(long_options): include-all-whitespace does not take
an extra argument.

Gbp-Pq: Name strings-whitespace-arg.diff

7 years agoi18n-fr
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
i18n-fr

===================================================================

Gbp-Pq: Name i18n-fr.diff

7 years agogold-mips
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
gold-mips

# DP: Fix gold on mips64 targets.

gold/

2016-08-09  Aurelien Jarno  <aurelien@aurel32.net>

* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.

Gbp-Pq: Name gold-mips.diff

7 years agomips64-default-n64
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
mips64-default-n64

===================================================================

Gbp-Pq: Name mips64-default-n64.diff

7 years agoaarch64-libpath
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
aarch64-libpath

===================================================================

Gbp-Pq: Name aarch64-libpath.diff

7 years agogprof-build
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
gprof-build

# DP: Fix gprof build error.

Gbp-Pq: Name gprof-build.diff

7 years ago_ld_doc_remove_xref
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_ld_doc_remove_xref

# DP: In ld.texi, remove cross reference to BFD internals documentation.

Gbp-Pq: Name 164_ld_doc_remove_xref.diff

7 years ago_gold_dummy_zoption
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_gold_dummy_zoption

# DP: let gold accept a dummy -z buildd-<random-string> option.

Gbp-Pq: Name 161_gold_dummy_zoption.diff

7 years ago_ar_scripts_with_tilde
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_ar_scripts_with_tilde

===================================================================

Gbp-Pq: Name 157_ar_scripts_with_tilde.patch

7 years ago_bfd_pic
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_bfd_pic

Gbp-Pq: Name 136_bfd_pic.patch

7 years ago_bfd_version
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_bfd_version

Gbp-Pq: Name 135_bfd_version.patch

7 years ago_ld_bootstrap_testsuite
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_ld_bootstrap_testsuite

Upstream status: proposed patch

Gbp-Pq: Name 131_ld_bootstrap_testsuite.patch

7 years ago_gold_disable_testsuite_build
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_gold_disable_testsuite_build

Upstream status: local

Gbp-Pq: Name 130_gold_disable_testsuite_build.patch

7 years ago_multiarch_libpath
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_multiarch_libpath

# DP: Add multiarch directories to linker search path for ld and gold.

Gbp-Pq: Name 129_multiarch_libpath.patch

7 years ago_ppc64_powerpc_biarch
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_ppc64_powerpc_biarch

===================================================================

Gbp-Pq: Name 128_ppc64_powerpc_biarch.patch

7 years ago_bash_in_ld_testsuite
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_bash_in_ld_testsuite

===================================================================

Gbp-Pq: Name 013_bash_in_ld_testsuite.patch

7 years ago_check_ldrunpath_length
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_check_ldrunpath_length

cases where -rpath isn't specified. (#151024)

Gbp-Pq: Name 012_check_ldrunpath_length.patch

7 years ago_better_file_error
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_better_file_error

directory. (#45832)

Gbp-Pq: Name 006_better_file_error.patch

7 years ago_gprof_see_also_monitor
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_gprof_see_also_monitor

===================================================================

Gbp-Pq: Name 003_gprof_see_also_monitor.patch

7 years ago_gprof_profile_arcs
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_gprof_profile_arcs

===================================================================

Gbp-Pq: Name 002_gprof_profile_arcs.patch

7 years ago_ld_makefile_patch
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
_ld_makefile_patch

Upstream status: N/A
Date: ??

Gbp-Pq: Name 001_ld_makefile_patch.patch

7 years agobranch-version
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
branch-version

# DP: Don't bump the version when doing distro builds

git diff e43d51b14d0039506ec42941001f3ca56387a80e 8db5daf9efe8a6174d3b10ac7bba8c178836e9ce

Gbp-Pq: Name branch-version.diff

7 years agobranch-updates
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
branch-updates

# DP: updates from the binutils-2.30 branch

# git diff 8db5daf9efe8a6174d3b10ac7bba8c178836e9ce d69b2ceb6fbfc80949e56b5bb4def8ba849bb3cf

Gbp-Pq: Name branch-updates.diff

7 years agobinutils (2.30-22) unstable; urgency=medium
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
binutils (2.30-22) unstable; urgency=medium

  * Update, taken from the 2.30 branch 20180622.
    - x86 gas: Replace CET bit with IBT and SHSTK bits.

[dgit import unpatched binutils 2.30-22]

7 years agoImport binutils_2.30-22.debian.tar.xz
Matthias Klose [Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)]
Import binutils_2.30-22.debian.tar.xz

[dgit import tarball binutils 2.30-22 binutils_2.30-22.debian.tar.xz]

7 years agoImport binutils_2.30.orig.tar.xz
Matthias Klose [Mon, 29 Jan 2018 13:29:38 +0000 (13:29 +0000)]
Import binutils_2.30.orig.tar.xz

[dgit import orig binutils_2.30.orig.tar.xz]