Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44e2f10331 | ||
|
|
7ebe52e094 | ||
|
|
657a137353 | ||
|
|
641de405d4 | ||
|
|
573da04b92 | ||
|
|
7e207e03e1 | ||
|
|
bcf6b8fc61 | ||
|
|
cda67f08c6 | ||
|
|
ee71b8b866 | ||
|
|
f634ca7229 | ||
|
|
4d81b36c26 | ||
|
|
c8b1392361 | ||
|
|
0d84a0dc21 | ||
|
|
a2090b7bf0 | ||
|
|
7b7e8e4d29 |
14 changed files with 4639 additions and 7 deletions
17
binutils-CVE-2019-14250.patch
Normal file
17
binutils-CVE-2019-14250.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
--- binutils.orig/libiberty/simple-object-elf.c 2019-08-09 14:13:51.677330065 +0100
|
||||||
|
+++ binutils-2.32/libiberty/simple-object-elf.c 2019-08-09 14:14:31.177076298 +0100
|
||||||
|
@@ -549,6 +549,14 @@ simple_object_elf_match (unsigned char h
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (eor->shstrndx == 0)
|
||||||
|
+ {
|
||||||
|
+ *errmsg = "invalid ELF shstrndx == 0";
|
||||||
|
+ *err = 0;
|
||||||
|
+ XDELETE (eor);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return (void *) eor;
|
||||||
|
}
|
||||||
|
|
||||||
110
binutils-CVE-2019-9071.patch
Normal file
110
binutils-CVE-2019-9071.patch
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
--- binutils.orig/libiberty/cp-demangle.c 2019-04-10 10:31:27.854997707 +0100
|
||||||
|
+++ binutils-2.31.1/libiberty/cp-demangle.c 2019-04-10 16:00:35.820350978 +0100
|
||||||
|
@@ -858,7 +858,7 @@ CP_STATIC_IF_GLIBCPP_V3
|
||||||
|
int
|
||||||
|
cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
|
||||||
|
{
|
||||||
|
- if (p == NULL || s == NULL || len == 0)
|
||||||
|
+ if (p == NULL || s == NULL || len <= 0)
|
||||||
|
return 0;
|
||||||
|
p->d_printing = 0;
|
||||||
|
p->type = DEMANGLE_COMPONENT_NAME;
|
||||||
|
@@ -4032,7 +4032,7 @@ d_growable_string_callback_adapter (cons
|
||||||
|
are larger than the actual numbers encountered. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
-d_count_templates_scopes (int *num_templates, int *num_scopes,
|
||||||
|
+d_count_templates_scopes (struct d_print_info *dpi,
|
||||||
|
const struct demangle_component *dc)
|
||||||
|
{
|
||||||
|
if (dc == NULL)
|
||||||
|
@@ -4052,13 +4052,13 @@ d_count_templates_scopes (int *num_templ
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_TEMPLATE:
|
||||||
|
- (*num_templates)++;
|
||||||
|
+ dpi->num_copy_templates++;
|
||||||
|
goto recurse_left_right;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_REFERENCE:
|
||||||
|
case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
|
||||||
|
if (d_left (dc)->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM)
|
||||||
|
- (*num_scopes)++;
|
||||||
|
+ dpi->num_saved_scopes++;
|
||||||
|
goto recurse_left_right;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_QUAL_NAME:
|
||||||
|
@@ -4122,42 +4122,42 @@ d_count_templates_scopes (int *num_templ
|
||||||
|
case DEMANGLE_COMPONENT_TAGGED_NAME:
|
||||||
|
case DEMANGLE_COMPONENT_CLONE:
|
||||||
|
recurse_left_right:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- d_left (dc));
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- d_right (dc));
|
||||||
|
+ /* PR 89394 - Check for too much recursion. */
|
||||||
|
+ if (dpi->recursion > MAX_RECURSION_COUNT)
|
||||||
|
+ /* FIXME: There ought to be a way to report to the
|
||||||
|
+ user that the recursion limit has been reached. */
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ ++ dpi->recursion;
|
||||||
|
+ d_count_templates_scopes (dpi, d_left (dc));
|
||||||
|
+ d_count_templates_scopes (dpi, d_right (dc));
|
||||||
|
+ -- dpi->recursion;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_CTOR:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- dc->u.s_ctor.name);
|
||||||
|
+ d_count_templates_scopes (dpi, dc->u.s_ctor.name);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_DTOR:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- dc->u.s_dtor.name);
|
||||||
|
+ d_count_templates_scopes (dpi, dc->u.s_dtor.name);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- dc->u.s_extended_operator.name);
|
||||||
|
+ d_count_templates_scopes (dpi, dc->u.s_extended_operator.name);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_FIXED_TYPE:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- dc->u.s_fixed.length);
|
||||||
|
+ d_count_templates_scopes (dpi, dc->u.s_fixed.length);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
|
||||||
|
case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- d_left (dc));
|
||||||
|
+ d_count_templates_scopes (dpi, d_left (dc));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DEMANGLE_COMPONENT_LAMBDA:
|
||||||
|
case DEMANGLE_COMPONENT_DEFAULT_ARG:
|
||||||
|
- d_count_templates_scopes (num_templates, num_scopes,
|
||||||
|
- dc->u.s_unary_num.sub);
|
||||||
|
+ d_count_templates_scopes (dpi, dc->u.s_unary_num.sub);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -4192,8 +4192,12 @@ d_print_init (struct d_print_info *dpi,
|
||||||
|
dpi->next_copy_template = 0;
|
||||||
|
dpi->num_copy_templates = 0;
|
||||||
|
|
||||||
|
- d_count_templates_scopes (&dpi->num_copy_templates,
|
||||||
|
- &dpi->num_saved_scopes, dc);
|
||||||
|
+ d_count_templates_scopes (dpi, dc);
|
||||||
|
+ /* If we did not reach the recursion limit then reset the
|
||||||
|
+ current recursion value back to 0, so that we can print
|
||||||
|
+ the templates. */
|
||||||
|
+ if (dpi->recursion < MAX_RECURSION_COUNT)
|
||||||
|
+ dpi->recursion = 0;
|
||||||
|
dpi->num_copy_templates *= dpi->num_saved_scopes;
|
||||||
|
|
||||||
|
dpi->current_template = NULL;
|
||||||
13
binutils-CVE-2019-9073.patch
Normal file
13
binutils-CVE-2019-9073.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- binutils.orig/binutils/objdump.c 2019-02-25 16:12:30.394056901 +0000
|
||||||
|
+++ binutils-2.31.1/binutils/objdump.c 2019-02-25 16:13:07.224778005 +0000
|
||||||
|
@@ -2993,7 +2993,9 @@ dump_bfd_header (bfd *abfd)
|
||||||
|
static void
|
||||||
|
dump_bfd_private_header (bfd *abfd)
|
||||||
|
{
|
||||||
|
- bfd_print_private_bfd_data (abfd, stdout);
|
||||||
|
+ if (!bfd_print_private_bfd_data (abfd, stdout))
|
||||||
|
+ non_fatal (_("warning: private headers incomplete: %s"),
|
||||||
|
+ bfd_errmsg (bfd_get_error ()));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
32
binutils-CVE-2019-9074.patch
Normal file
32
binutils-CVE-2019-9074.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
--- binutils.orig/bfd/pei-x86_64.c 2019-02-25 16:12:29.798061414 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/pei-x86_64.c 2019-02-25 17:09:02.783425236 +0000
|
||||||
|
@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||||
|
/* virt_size might be zero for objects. */
|
||||||
|
if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0)
|
||||||
|
{
|
||||||
|
- stop = (datasize / onaline) * onaline;
|
||||||
|
+ stop = datasize;
|
||||||
|
virt_size_is_zero = TRUE;
|
||||||
|
}
|
||||||
|
else if (datasize < stop)
|
||||||
|
@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||||
|
_("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"),
|
||||||
|
pdata_section->name, (unsigned long) datasize,
|
||||||
|
(unsigned long) stop);
|
||||||
|
- /* Be sure not to read passed datasize. */
|
||||||
|
- stop = datasize / onaline;
|
||||||
|
+ /* Be sure not to read past datasize. */
|
||||||
|
+ stop = datasize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Display functions table. */
|
||||||
|
@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||||
|
altent += imagebase;
|
||||||
|
|
||||||
|
if (altent >= pdata_vma
|
||||||
|
- && (altent + PDATA_ROW_SIZE <= pdata_vma
|
||||||
|
- + pei_section_data (abfd, pdata_section)->virt_size))
|
||||||
|
+ && altent - pdata_vma + PDATA_ROW_SIZE <= stop)
|
||||||
|
{
|
||||||
|
pex64_get_runtime_function
|
||||||
|
(abfd, &arf, &pdata[altent - pdata_vma]);
|
||||||
73
binutils-CVE-2019-9075.patch
Normal file
73
binutils-CVE-2019-9075.patch
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
diff -rup binutils.orig/bfd/archive64.c binutils-2.31.1/bfd/archive64.c
|
||||||
|
--- binutils.orig/bfd/archive64.c 2019-02-26 11:17:11.882530151 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/archive64.c 2019-02-26 11:19:18.422488805 +0000
|
||||||
|
@@ -100,8 +100,6 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab
|
||||||
|
return FALSE;
|
||||||
|
carsyms = ardata->symdefs;
|
||||||
|
stringbase = ((char *) ardata->symdefs) + carsym_size;
|
||||||
|
- stringbase[stringsize] = 0;
|
||||||
|
- stringend = stringbase + stringsize;
|
||||||
|
|
||||||
|
raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
|
||||||
|
if (raw_armap == NULL)
|
||||||
|
@@ -115,15 +113,17 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab
|
||||||
|
goto release_raw_armap;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ stringend = stringbase + stringsize;
|
||||||
|
+ *stringend = 0;
|
||||||
|
for (i = 0; i < nsymz; i++)
|
||||||
|
{
|
||||||
|
carsyms->file_offset = bfd_getb64 (raw_armap + i * 8);
|
||||||
|
carsyms->name = stringbase;
|
||||||
|
- if (stringbase < stringend)
|
||||||
|
- stringbase += strlen (stringbase) + 1;
|
||||||
|
+ stringbase += strlen (stringbase);
|
||||||
|
+ if (stringbase != stringend)
|
||||||
|
+ ++stringbase;
|
||||||
|
++carsyms;
|
||||||
|
}
|
||||||
|
- *stringbase = '\0';
|
||||||
|
|
||||||
|
ardata->symdef_count = nsymz;
|
||||||
|
ardata->first_file_filepos = bfd_tell (abfd);
|
||||||
|
diff -rup binutils.orig/bfd/archive.c binutils-2.31.1/bfd/archive.c
|
||||||
|
--- binutils.orig/bfd/archive.c 2019-02-26 11:17:11.884530134 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/archive.c 2019-02-26 11:18:33.354859687 +0000
|
||||||
|
@@ -1014,6 +1014,7 @@ do_slurp_coff_armap (bfd *abfd)
|
||||||
|
int *raw_armap, *rawptr;
|
||||||
|
struct artdata *ardata = bfd_ardata (abfd);
|
||||||
|
char *stringbase;
|
||||||
|
+ char *stringend;
|
||||||
|
bfd_size_type stringsize;
|
||||||
|
bfd_size_type parsed_size;
|
||||||
|
carsym *carsyms;
|
||||||
|
@@ -1073,22 +1074,20 @@ do_slurp_coff_armap (bfd *abfd)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* OK, build the carsyms. */
|
||||||
|
- for (i = 0; i < nsymz && stringsize > 0; i++)
|
||||||
|
+ stringend = stringbase + stringsize;
|
||||||
|
+ *stringend = 0;
|
||||||
|
+ for (i = 0; i < nsymz; i++)
|
||||||
|
{
|
||||||
|
bfd_size_type len;
|
||||||
|
|
||||||
|
rawptr = raw_armap + i;
|
||||||
|
carsyms->file_offset = swap ((bfd_byte *) rawptr);
|
||||||
|
carsyms->name = stringbase;
|
||||||
|
- /* PR 17512: file: 4a1d50c1. */
|
||||||
|
- len = strnlen (stringbase, stringsize);
|
||||||
|
- if (len < stringsize)
|
||||||
|
- len ++;
|
||||||
|
- stringbase += len;
|
||||||
|
- stringsize -= len;
|
||||||
|
+ stringbase += strlen (stringbase);
|
||||||
|
+ if (stringbase != stringend)
|
||||||
|
+ ++stringbase;
|
||||||
|
carsyms++;
|
||||||
|
}
|
||||||
|
- *stringbase = 0;
|
||||||
|
|
||||||
|
ardata->symdef_count = nsymz;
|
||||||
|
ardata->first_file_filepos = bfd_tell (abfd);
|
||||||
16
binutils-CVE-2019-9077.patch
Normal file
16
binutils-CVE-2019-9077.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
--- binutils.orig/binutils/readelf.c 2019-02-26 11:17:12.414525772 +0000
|
||||||
|
+++ binutils-2.31.1/binutils/readelf.c 2019-02-26 12:11:40.642876742 +0000
|
||||||
|
@@ -16009,6 +16009,13 @@ process_mips_specific (Filedata * fileda
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* PR 24243 */
|
||||||
|
+ if (sect->sh_size < sizeof (* eopt))
|
||||||
|
+ {
|
||||||
|
+ error (_("The MIPS options section is too small.\n"));
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
eopt = (Elf_External_Options *) get_data (NULL, filedata, options_offset, 1,
|
||||||
|
sect->sh_size, _("options"));
|
||||||
|
if (eopt)
|
||||||
20
binutils-aarch64-gold-PLT-for-MOVW_ABS.patch
Normal file
20
binutils-aarch64-gold-PLT-for-MOVW_ABS.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
--- binutils.orig/gold/aarch64.cc 2019-05-21 11:24:07.642560743 +0100
|
||||||
|
+++ binutils-2.32/gold/aarch64.cc 2019-05-21 11:25:02.425157682 +0100
|
||||||
|
@@ -6496,6 +6496,17 @@ Target_aarch64<size, big_endian>::Scan::
|
||||||
|
gold_error(_("%s: unsupported reloc %u in pos independent link."),
|
||||||
|
object->name().c_str(), r_type);
|
||||||
|
}
|
||||||
|
+ // Make a PLT entry if necessary.
|
||||||
|
+ if (gsym->needs_plt_entry())
|
||||||
|
+ {
|
||||||
|
+ target->make_plt_entry(symtab, layout, gsym);
|
||||||
|
+ // Since this is not a PC-relative relocation, we may be
|
||||||
|
+ // taking the address of a function. In that case we need to
|
||||||
|
+ // set the entry in the dynamic symbol table to the address of
|
||||||
|
+ // the PLT entry.
|
||||||
|
+ if (gsym->is_from_dynobj() && !parameters->options().shared())
|
||||||
|
+ gsym->set_needs_dynsym_value();
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case elfcpp::R_AARCH64_LD_PREL_LO19: // 273
|
||||||
2081
binutils-addr2line-fixes.patch
Normal file
2081
binutils-addr2line-fixes.patch
Normal file
File diff suppressed because it is too large
Load diff
39
binutils-disassembling-efi-files.patch
Normal file
39
binutils-disassembling-efi-files.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
diff -rup binutils.orig/bfd/coffgen.c binutils-2.31.1/bfd/coffgen.c
|
||||||
|
--- binutils.orig/bfd/coffgen.c 2019-03-06 08:49:19.500586870 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/coffgen.c 2019-03-06 08:49:45.798394582 +0000
|
||||||
|
@@ -2289,7 +2289,7 @@ coff_find_nearest_line_with_names (bfd *
|
||||||
|
information. So try again, using a bias against the address sought. */
|
||||||
|
if (coff_data (abfd)->dwarf2_find_line_info != NULL)
|
||||||
|
{
|
||||||
|
- bfd_signed_vma bias;
|
||||||
|
+ bfd_signed_vma bias = 0;
|
||||||
|
|
||||||
|
/* Create a cache of the result for the next call. */
|
||||||
|
if (sec_data == NULL && section->owner == abfd)
|
||||||
|
@@ -2301,10 +2301,11 @@ coff_find_nearest_line_with_names (bfd *
|
||||||
|
|
||||||
|
if (sec_data != NULL && sec_data->saved_bias)
|
||||||
|
bias = sec_data->saved_bias;
|
||||||
|
- else
|
||||||
|
+ else if (symbols)
|
||||||
|
{
|
||||||
|
bias = _bfd_dwarf2_find_symbol_bias (symbols,
|
||||||
|
& coff_data (abfd)->dwarf2_find_line_info);
|
||||||
|
+
|
||||||
|
if (sec_data)
|
||||||
|
{
|
||||||
|
sec_data->saved_bias = TRUE;
|
||||||
|
Only in binutils-2.31.1/bfd: coffgen.c.orig
|
||||||
|
diff -rup binutils.orig/bfd/dwarf2.c binutils-2.31.1/bfd/dwarf2.c
|
||||||
|
--- binutils.orig/bfd/dwarf2.c 2019-03-06 08:49:19.498586884 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/dwarf2.c 2019-03-06 08:49:45.799394575 +0000
|
||||||
|
@@ -4463,7 +4463,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol **
|
||||||
|
|
||||||
|
stash = (struct dwarf2_debug *) *pinfo;
|
||||||
|
|
||||||
|
- if (stash == NULL)
|
||||||
|
+ if (stash == NULL || symbols == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (unit = stash->all_comp_units; unit; unit = unit->next_unit)
|
||||||
|
Only in binutils-2.31.1/bfd: dwarf2.c.orig
|
||||||
68
binutils-do-not-warn-about-debuginfo-files.patch
Normal file
68
binutils-do-not-warn-about-debuginfo-files.patch
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
diff -rup binutils.orig/bfd/elf-bfd.h binutils-2.32/bfd/elf-bfd.h
|
||||||
|
--- binutils.orig/bfd/elf-bfd.h 2019-07-02 16:03:41.758007318 +0100
|
||||||
|
+++ binutils-2.32/bfd/elf-bfd.h 2019-07-02 16:04:02.025862020 +0100
|
||||||
|
@@ -2749,6 +2749,8 @@ extern bfd_vma elf64_r_sym (bfd_vma);
|
||||||
|
extern bfd_vma elf32_r_info (bfd_vma, bfd_vma);
|
||||||
|
extern bfd_vma elf32_r_sym (bfd_vma);
|
||||||
|
|
||||||
|
+extern bfd_boolean is_debuginfo_file (bfd *);
|
||||||
|
+
|
||||||
|
/* Large common section. */
|
||||||
|
extern asection _bfd_elf_large_com_section;
|
||||||
|
|
||||||
|
Only in binutils-2.32/bfd: elf-bfd.h.orig
|
||||||
|
diff -rup binutils.orig/bfd/elf.c binutils-2.32/bfd/elf.c
|
||||||
|
--- binutils.orig/bfd/elf.c 2019-07-02 16:03:42.101004858 +0100
|
||||||
|
+++ binutils-2.32/bfd/elf.c 2019-07-02 16:04:23.909705141 +0100
|
||||||
|
@@ -5807,6 +5807,35 @@ assign_file_positions_for_load_sections
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Determine if a bfd is a debuginfo file. Unfortunately there
|
||||||
|
+ is no defined method for detecting such files, so we have to
|
||||||
|
+ use heuristics instead. */
|
||||||
|
+
|
||||||
|
+bfd_boolean
|
||||||
|
+is_debuginfo_file (bfd *abfd)
|
||||||
|
+{
|
||||||
|
+ if (abfd == NULL || bfd_get_flavour (abfd) != bfd_target_elf_flavour)
|
||||||
|
+ return FALSE;
|
||||||
|
+
|
||||||
|
+ Elf_Internal_Shdr **start_headers = elf_elfsections (abfd);
|
||||||
|
+ Elf_Internal_Shdr **end_headers = start_headers + elf_numsections (abfd);
|
||||||
|
+ Elf_Internal_Shdr **headerp;
|
||||||
|
+
|
||||||
|
+ for (headerp = start_headers; headerp < end_headers; headerp ++)
|
||||||
|
+ {
|
||||||
|
+ Elf_Internal_Shdr *header = * headerp;
|
||||||
|
+
|
||||||
|
+ /* Debuginfo files do not have any allocated SHT_PROGBITS sections.
|
||||||
|
+ The only allocated sections are SHT_NOBITS or SHT_NOTES. */
|
||||||
|
+ if ((header->sh_flags & SHF_ALLOC) == SHF_ALLOC
|
||||||
|
+ && header->sh_type != SHT_NOBITS
|
||||||
|
+ && header->sh_type != SHT_NOTE)
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return TRUE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Assign file positions for the other sections. */
|
||||||
|
|
||||||
|
static bfd_boolean
|
||||||
|
@@ -5840,7 +5869,13 @@ assign_file_positions_for_non_load_secti
|
||||||
|
BFD_ASSERT (hdr->sh_offset == hdr->bfd_section->filepos);
|
||||||
|
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
|
||||||
|
{
|
||||||
|
- if (hdr->sh_size != 0)
|
||||||
|
+ if (hdr->sh_size != 0
|
||||||
|
+ /* PR 24717 - debuginfo files are known to be not strictly
|
||||||
|
+ compliant with the ELF standard. In particular they often
|
||||||
|
+ have .note.gnu.property sections that are outside of any
|
||||||
|
+ loadable segment. This is not a problem for such files,
|
||||||
|
+ so do not warn about them. */
|
||||||
|
+ && ! is_debuginfo_file (abfd))
|
||||||
|
_bfd_error_handler
|
||||||
|
/* xgettext:c-format */
|
||||||
|
(_("%pB: warning: allocated section `%s' not in segment"),
|
||||||
|
Only in binutils-2.32/bfd: elf.c.orig
|
||||||
1999
binutils-improved-note-merging.patch
Normal file
1999
binutils-improved-note-merging.patch
Normal file
File diff suppressed because it is too large
Load diff
12
binutils-ppc64-local-ifunc-relocs.patch
Normal file
12
binutils-ppc64-local-ifunc-relocs.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
--- binutils.orig/bfd/elf64-ppc.c 2019-02-20 10:58:09.700552616 +0000
|
||||||
|
+++ binutils-2.31.1/bfd/elf64-ppc.c 2019-02-20 10:59:15.989062349 +0000
|
||||||
|
@@ -13530,7 +13530,8 @@ write_plt_relocs_for_local_syms (struct
|
||||||
|
}
|
||||||
|
|
||||||
|
val = sym->st_value + ent->addend;
|
||||||
|
- val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
|
||||||
|
+ if (ELF_ST_TYPE (sym->st_info) != STT_GNU_IFUNC)
|
||||||
|
+ val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
|
||||||
|
if (sym_sec != NULL && sym_sec->output_section != NULL)
|
||||||
|
val += sym_sec->output_offset + sym_sec->output_section->vma;
|
||||||
|
|
||||||
38
binutils-x86-no-scale-8bit-displacements.patch
Normal file
38
binutils-x86-no-scale-8bit-displacements.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
Only in binutils-2.31.1/gas: ChangeLog.orig
|
||||||
|
diff -rup binutils.orig/gas/config/tc-i386.c binutils-2.31.1/gas/config/tc-i386.c
|
||||||
|
--- binutils.orig/gas/config/tc-i386.c 2019-04-10 10:31:32.788961110 +0100
|
||||||
|
+++ binutils-2.31.1/gas/config/tc-i386.c 2019-04-10 10:31:57.669774802 +0100
|
||||||
|
@@ -7857,7 +7857,8 @@ output_disp (fragS *insn_start_frag, off
|
||||||
|
int size = disp_size (n);
|
||||||
|
offsetT val = i.op[n].disps->X_add_number;
|
||||||
|
|
||||||
|
- val = offset_in_range (val >> i.memshift, size);
|
||||||
|
+ val = offset_in_range (val >> (size == 1 ? i.memshift : 0),
|
||||||
|
+ size);
|
||||||
|
p = frag_more (size);
|
||||||
|
md_number_to_chars (p, val, size);
|
||||||
|
}
|
||||||
|
Only in binutils-2.31.1/gas/config: tc-i386.c.orig
|
||||||
|
Only in binutils-2.31.1/gas/testsuite/gas/i386: evex-no-scale-32.d
|
||||||
|
Only in binutils-2.31.1/gas/testsuite/gas/i386: evex-no-scale-64.d
|
||||||
|
Only in binutils-2.31.1/gas/testsuite/gas/i386: evex-no-scale.s
|
||||||
|
diff -rup binutils.orig/gas/testsuite/gas/i386/i386.exp binutils-2.31.1/gas/testsuite/gas/i386/i386.exp
|
||||||
|
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2019-04-10 10:31:32.160965768 +0100
|
||||||
|
+++ binutils-2.31.1/gas/testsuite/gas/i386/i386.exp 2019-04-10 10:31:57.670774795 +0100
|
||||||
|
@@ -224,6 +224,7 @@ if [expr ([istarget "i*86-*-*"] || [ist
|
||||||
|
run_dump_test "evex-lig512-intel"
|
||||||
|
run_dump_test "evex-wig1"
|
||||||
|
run_dump_test "evex-wig1-intel"
|
||||||
|
+ run_dump_test "evex-no-scale-32"
|
||||||
|
run_dump_test "sse2avx"
|
||||||
|
run_list_test "inval-avx" "-al"
|
||||||
|
run_list_test "inval-avx512f" "-al"
|
||||||
|
@@ -733,6 +734,7 @@ if [expr ([istarget "i*86-*-*"] || [ista
|
||||||
|
run_dump_test "x86-64-evex-lig512-intel"
|
||||||
|
run_dump_test "x86-64-evex-wig1"
|
||||||
|
run_dump_test "x86-64-evex-wig1-intel"
|
||||||
|
+ run_dump_test "evex-no-scale-64"
|
||||||
|
run_dump_test "x86-64-sse2avx"
|
||||||
|
run_list_test "x86-64-inval-avx" "-al"
|
||||||
|
run_list_test "x86-64-inval-avx512f" "-al"
|
||||||
|
Only in binutils-2.31.1/gas/testsuite/gas/i386: i386.exp.orig
|
||||||
128
binutils.spec
128
binutils.spec
|
|
@ -1,3 +1,13 @@
|
||||||
|
|
||||||
|
Summary: A GNU collection of binary utilities
|
||||||
|
Name: %{?cross}binutils%{?_with_debug:-debug}
|
||||||
|
Version: 2.31.1
|
||||||
|
Release: 37%{?dist}
|
||||||
|
License: GPLv3+
|
||||||
|
URL: https://sourceware.org/binutils
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
# Binutils SPEC file. Can be invoked with the following parameters:
|
# Binutils SPEC file. Can be invoked with the following parameters:
|
||||||
|
|
||||||
# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils.
|
# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils.
|
||||||
|
|
@ -72,13 +82,6 @@
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
Summary: A GNU collection of binary utilities
|
|
||||||
Name: %{?cross}binutils%{?_with_debug:-debug}
|
|
||||||
Version: 2.31.1
|
|
||||||
Release: 23%{?dist}
|
|
||||||
License: GPLv3+
|
|
||||||
URL: https://sourceware.org/binutils
|
|
||||||
|
|
||||||
# Note - the Linux Kernel binutils releases are too unstable and contain
|
# Note - the Linux Kernel binutils releases are too unstable and contain
|
||||||
# too many controversial patches so we stick with the official FSF version
|
# too many controversial patches so we stick with the official FSF version
|
||||||
# instead.
|
# instead.
|
||||||
|
|
@ -225,6 +228,61 @@ Patch26: binutils-gas-input-matches-output.patch
|
||||||
# Lifetime: Fixed in 2.32
|
# Lifetime: Fixed in 2.32
|
||||||
Patch27: binutils-alignment-of-decompressed-sections.patch
|
Patch27: binutils-alignment-of-decompressed-sections.patch
|
||||||
|
|
||||||
|
# Purpose: Correct the generation of relocations for local ifuncs on PowerPC64
|
||||||
|
# Lifetime: Fixed in 2.32
|
||||||
|
Patch28: binutils-ppc64-local-ifunc-relocs.patch
|
||||||
|
|
||||||
|
# Purpose: Improve objdump's handling of corrupt input files.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch29: binutils-CVE-2019-9073.patch
|
||||||
|
|
||||||
|
# Purpose: Stop illegal memory access parsing corrupt PE files.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch30: binutils-CVE-2019-9074.patch
|
||||||
|
|
||||||
|
# Purpose: Stop illegal memory access parsing corrupt archives.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch31: binutils-CVE-2019-9075.patch
|
||||||
|
|
||||||
|
# Purpose: Stop illegal memory access parsing a corrupt MIPS binary.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch32: binutils-CVE-2019-9077.patch
|
||||||
|
|
||||||
|
# Purpose: Stop a seg-fault when disassembling an EFI binary.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch33: binutils-disassembling-efi-files.patch
|
||||||
|
|
||||||
|
# Purpose: Fix a bug handling 8-bit displacements in some x86 insns.
|
||||||
|
# Lifetime: Fixed in 2.32
|
||||||
|
Patch34: binutils-x86-no-scale-8bit-displacements.patch
|
||||||
|
|
||||||
|
# Purpose: Fix a stack exhaustion problem in libiberty's name demangling code.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch35: binutils-CVE-2019-9071.patch
|
||||||
|
|
||||||
|
# Purpose: Have the GOLD linker for AArch64 generate PLT entries for MOVW_ABS
|
||||||
|
# relocations if necessary.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch36: binutils-aarch64-gold-PLT-for-MOVW_ABS.patch
|
||||||
|
|
||||||
|
# Purpose: Stop the BFD library from issueing warning messages about allocated
|
||||||
|
# sections being found outside of loadable segments, if they are
|
||||||
|
# found inside debuginfo files.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch37: binutils-do-not-warn-about-debuginfo-files.patch
|
||||||
|
|
||||||
|
# Purpose: Add check to libiberty library in order to prevent an integer overflow in the gold linker.
|
||||||
|
# Lifetime: Fixed in 2.33
|
||||||
|
Patch38: binutils-CVE-2019-14250.patch
|
||||||
|
|
||||||
|
# Purpose: Improve objcopy's ability to merge GNU build attribute notes.
|
||||||
|
# Lifetime: Fixed in 2.34
|
||||||
|
Patch39: binutils-improved-note-merging.patch
|
||||||
|
|
||||||
|
# Purpose: Improve addr2line's ability to translate addresses into file/line numbers.
|
||||||
|
# Lifetime: Fixed in 2.34
|
||||||
|
Patch40: binutils-addr2line-fixes.patch
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
Provides: bundled(libiberty)
|
Provides: bundled(libiberty)
|
||||||
|
|
@ -369,6 +427,19 @@ using libelf instead of BFD.
|
||||||
%patch25 -p1
|
%patch25 -p1
|
||||||
%patch26 -p1
|
%patch26 -p1
|
||||||
%patch27 -p1
|
%patch27 -p1
|
||||||
|
%patch28 -p1
|
||||||
|
%patch29 -p1
|
||||||
|
%patch30 -p1
|
||||||
|
%patch31 -p1
|
||||||
|
%patch32 -p1
|
||||||
|
%patch33 -p1
|
||||||
|
%patch34 -p1
|
||||||
|
%patch35 -p1
|
||||||
|
%patch36 -p1
|
||||||
|
%patch37 -p1
|
||||||
|
%patch38 -p1
|
||||||
|
%patch39 -p1
|
||||||
|
%patch40 -p1
|
||||||
|
|
||||||
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
||||||
# FIXME - this is no longer true. Maybe try reinstating autotool use ?
|
# FIXME - this is no longer true. Maybe try reinstating autotool use ?
|
||||||
|
|
@ -770,6 +841,49 @@ exit 0
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 02 2020 Nick Clifton <nickc@redhat.com> - 2.31.1-37
|
||||||
|
- Improve the accuracy of addr2line. (#1760967)
|
||||||
|
|
||||||
|
* Thu Nov 21 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-36
|
||||||
|
- Fix a buffer overrun in the note merging code. (#1774507)
|
||||||
|
|
||||||
|
* Thu Nov 07 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-35
|
||||||
|
- Strip: Do not fill note sections with zero bytes if not merging.
|
||||||
|
|
||||||
|
* Thu Oct 31 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-34
|
||||||
|
- Improve objcopy's ability to merge GNU build attribute notes.
|
||||||
|
|
||||||
|
* Fri Aug 09 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-33
|
||||||
|
- Fix potential integer overflow in GOLD. (#1739491)
|
||||||
|
|
||||||
|
* Tue Jul 02 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-32
|
||||||
|
- Stop the BFD library from complaining about sections found inside debuginfo files. (PR 24717)
|
||||||
|
|
||||||
|
* Tue May 21 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-31
|
||||||
|
- Import fix for PR 23870 in order to help building Go binaries.
|
||||||
|
|
||||||
|
* Wed Apr 10 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-30
|
||||||
|
- Fix a stack exhaustion problem in libiberty's name demangling code. (#1680658)
|
||||||
|
- Fix a bug handling 8-bit displacements in x86 insns. (PR 23465)
|
||||||
|
|
||||||
|
* Wed Mar 06 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-29
|
||||||
|
- Stop potential illegal memory access when disassembling an EFI binary. (#1685727)
|
||||||
|
|
||||||
|
* Tue Feb 26 2019 Nick Clifton <nickc@redhat.com> - 2.32.1-28
|
||||||
|
- Stop potential illegal memory access when parsing a corrupt MIPS binary. (#1680676)
|
||||||
|
|
||||||
|
* Tue Feb 26 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-27
|
||||||
|
- Stop potential illegal memory access when parsing corrupt archives. (#1680670)
|
||||||
|
|
||||||
|
* Mon Feb 25 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-26
|
||||||
|
- Stop potential illegal memory access when parsing corrupt PE files. (#1680682)
|
||||||
|
|
||||||
|
* Mon Feb 25 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-25
|
||||||
|
- Improve objdump's handling of corrupt input files. (#1680663)
|
||||||
|
|
||||||
|
* Wed Feb 20 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-24
|
||||||
|
- Correct the generation of relocations for PowerPC local ifuncs. (PR 23937)
|
||||||
|
|
||||||
* Mon Feb 18 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-23
|
* Mon Feb 18 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-23
|
||||||
- Ensure that decompressed sections have the correct alignment. (#1678204)
|
- Ensure that decompressed sections have the correct alignment. (#1678204)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue