From 3dad3f6ff4c1d58208229bcc830d709c88811119 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 30 2021 19:51:41 +0000 Subject: import gcc-toolset-10-binutils-2.35-6.el8 --- diff --git a/.gcc-toolset-10-binutils.metadata b/.gcc-toolset-10-binutils.metadata index cd74f7b..b652d5f 100644 --- a/.gcc-toolset-10-binutils.metadata +++ b/.gcc-toolset-10-binutils.metadata @@ -1,2 +1,2 @@ -cd45a512af1c8a508976c1beb4f5825b3bb89f4d SOURCES/binutils-2.32.tar.xz +6bdd090ce268b6d6c3442516021c4e4b5019e303 SOURCES/binutils-2.35.tar.xz d3e5c9fc829ed40648110da6fe46c2fb1ed8aadb SOURCES/standards.info.gz diff --git a/.gitignore b/.gitignore index 8c92155..847a734 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/binutils-2.32.tar.xz +SOURCES/binutils-2.35.tar.xz SOURCES/standards.info.gz diff --git a/SOURCES/binutils-2.29-filename-in-error-messages.patch b/SOURCES/binutils-2.29-filename-in-error-messages.patch index d8ce241..60750a1 100644 --- a/SOURCES/binutils-2.29-filename-in-error-messages.patch +++ b/SOURCES/binutils-2.29-filename-in-error-messages.patch @@ -1,6 +1,6 @@ ---- binutils.orig/binutils/readelf.c 2018-01-22 15:48:10.450701702 +0000 -+++ binutils-2.30.0/binutils/readelf.c 2018-01-22 15:55:26.739588657 +0000 -@@ -19019,75 +19019,85 @@ process_file (char * file_name) +--- binutils.orig/binutils/readelf.c 2020-07-24 14:55:25.163647522 +0100 ++++ binutils-2.35/binutils/readelf.c 2020-07-24 15:02:39.613851369 +0100 +@@ -20729,79 +20729,92 @@ process_file (char * file_name) Filedata * filedata = NULL; struct stat statbuf; char armag[SARMAG]; @@ -61,64 +61,63 @@ if (fread (armag, SARMAG, 1, filedata->handle) != 1) { - error (_("%s: Failed to read file's magic number\n"), file_name); -- fclose (filedata->handle); ++ error (_("Failed to read file's magic number\n")); + fclose (filedata->handle); - free (filedata); - return FALSE; -- } -- -- filedata->file_size = (bfd_size_type) statbuf.st_size; -- -- if (memcmp (armag, ARMAG, SARMAG) == 0) -- { ++ goto done; + } + + filedata->file_size = (bfd_size_type) statbuf.st_size; + + if (memcmp (armag, ARMAG, SARMAG) == 0) + { - if (! process_archive (filedata, FALSE)) - ret = FALSE; -- } -- else if (memcmp (armag, ARMAGT, SARMAG) == 0) -- { ++ if (process_archive (filedata, FALSE)) ++ ret = TRUE; + } + else if (memcmp (armag, ARMAGT, SARMAG) == 0) + { - if ( ! process_archive (filedata, TRUE)) - ret = FALSE; -+ error (_("Failed to read file's magic number\n")); ++ if (process_archive (filedata, TRUE)) ++ ret = TRUE; } else { -- if (do_archive_index) + if (do_archive_index && !check_all) - error (_("File %s is not an archive so its index cannot be displayed.\n"), - file_name); -+ filedata->file_size = (bfd_size_type) statbuf.st_size; ++ error (_("Not an archive so its index cannot be displayed.\n")); + + rewind (filedata->handle); + filedata->archive_file_size = filedata->archive_file_offset = 0; -- rewind (filedata->handle); -- archive_file_size = archive_file_offset = 0; -- - if (! process_object (filedata)) - ret = FALSE; -+ if (memcmp (armag, ARMAG, SARMAG) == 0) -+ { -+ if (process_archive (filedata, FALSE)) -+ ret = TRUE; -+ } -+ else if (memcmp (armag, ARMAGT, SARMAG) == 0) -+ { -+ if (process_archive (filedata, TRUE)) -+ ret = TRUE; -+ } -+ else -+ { -+ if (do_archive_index) -+ error (_("Not an archive so its index cannot be displayed.\n")); -+ -+ rewind (filedata->handle); -+ archive_file_size = archive_file_offset = 0; -+ -+ if (process_object (filedata)) -+ ret = TRUE; -+ } ++ if (process_object (filedata)) ++ ret = TRUE; } - fclose (filedata->handle); +- fclose (filedata->handle); +- free (filedata->section_headers); +- free (filedata->program_headers); +- free (filedata->string_table); +- free (filedata->dump.dump_sects); +- free (filedata); + done: - free (filedata); ++ if (filedata) ++ { ++ fclose (filedata->handle); ++ free (filedata->section_headers); ++ free (filedata->program_headers); ++ free (filedata->string_table); ++ free (filedata->dump.dump_sects); ++ free (filedata); ++ } + free (program_name); + program_name = saved_program_name; - return ret; - } + free (ba_cache.strtab); + ba_cache.strtab = NULL; diff --git a/SOURCES/binutils-2.29-revert-PLT-elision.patch b/SOURCES/binutils-2.29-revert-PLT-elision.patch index c5478f0..746a551 100644 --- a/SOURCES/binutils-2.29-revert-PLT-elision.patch +++ b/SOURCES/binutils-2.29-revert-PLT-elision.patch @@ -79,17 +79,6 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd binutils-2.29.1/l +#... [ ]*[a-f0-9]+: 90 nop #pass -diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd ---- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 13:32:39.412064336 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 15:06:35.148842897 +0000 -@@ -1,7 +1,3 @@ - #... --Disassembly of section .plt.got: -- --[a-f0-9]+ <[_a-z]+@plt>: - [ ]*[a-f0-9]+: f3 0f 1e fa endbr64 --[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <[_a-z]+> - #pass diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd --- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000 +++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000 @@ -264,3 +253,13 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/tes 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133 DW_CFA_nop DW_CFA_nop +--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 14:55:25.370646189 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 15:06:58.124189348 +0100 +@@ -1,7 +1,3 @@ + #... +-Disassembly of section .plt.got: +- +-[a-f0-9]+ <[_a-z]+@plt>: + [ ]*[a-f0-9]+: f3 0f 1e fa endbr64 +-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*> + #pass diff --git a/SOURCES/binutils-CVE-2019-1010204.patch b/SOURCES/binutils-CVE-2019-1010204.patch new file mode 100644 index 0000000..56434b1 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-1010204.patch @@ -0,0 +1,15 @@ +--- binutils.orig/gold/fileread.cc 2019-08-06 14:22:08.669313110 +0100 ++++ binutils-2.32/gold/fileread.cc 2019-08-06 14:22:28.799177543 +0100 +@@ -381,6 +381,12 @@ File_read::do_read(off_t start, section_ + ssize_t bytes; + if (this->whole_file_view_ != NULL) + { ++ // See PR 23765 for an example of a testcase that triggers this error. ++ if (((ssize_t) start) < 0) ++ gold_fatal(_("%s: read failed, starting offset (%#llx) less than zero"), ++ this->filename().c_str(), ++ static_cast(start)); ++ + bytes = this->size_ - start; + if (static_cast(bytes) >= size) + { diff --git a/SOURCES/binutils-CVE-2019-12972.patch b/SOURCES/binutils-CVE-2019-12972.patch deleted file mode 100644 index 2b88488..0000000 --- a/SOURCES/binutils-CVE-2019-12972.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- binutils.orig/bfd/elfcode.h 2020-05-13 11:18:04.792779506 +0100 -+++ binutils-2.32/bfd/elfcode.h 2020-05-13 11:19:36.270101134 +0100 -@@ -750,12 +750,9 @@ elf_object_p (bfd *abfd) - != 0)) - abfd->flags &= ~D_PAGED; - } -- } - -- /* A further sanity check. */ -- if (i_ehdrp->e_shnum != 0) -- { -- if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)) -+ if (i_ehdrp->e_shstrndx >= elf_numsections (abfd) -+ || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB) - { - /* PR 2257: - We used to just goto got_wrong_format_error here diff --git a/SOURCES/binutils-CVE-2019-14250.patch b/SOURCES/binutils-CVE-2019-14250.patch deleted file mode 100644 index c37b92e..0000000 --- a/SOURCES/binutils-CVE-2019-14250.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- 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; - } - diff --git a/SOURCES/binutils-CVE-2019-14444.patch b/SOURCES/binutils-CVE-2019-14444.patch deleted file mode 100644 index ad554f5..0000000 --- a/SOURCES/binutils-CVE-2019-14444.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- binutils.orig/binutils/readelf.c 2019-08-13 10:03:33.518792590 +0100 -+++ binutils-2.32/binutils/readelf.c 2019-08-13 10:04:22.885418269 +0100 -@@ -13234,7 +13234,7 @@ apply_relocations (Filedata * - } - - rloc = start + rp->r_offset; -- if ((rloc + reloc_size) > end || (rloc < start)) -+ if (rloc >= end || (rloc + reloc_size) > end || (rloc < start)) - { - warn (_("skipping invalid relocation offset 0x%lx in section %s\n"), - (unsigned long) rp->r_offset, diff --git a/SOURCES/binutils-CVE-2019-17450.patch b/SOURCES/binutils-CVE-2019-17450.patch deleted file mode 100644 index c664ee8..0000000 --- a/SOURCES/binutils-CVE-2019-17450.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- binutils.orig/bfd/dwarf2.c 2019-11-13 11:49:52.211121564 +0000 -+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:53:26.991423055 +0000 -@@ -2813,8 +2813,8 @@ static bfd_boolean comp_unit_maybe_decod - - static bfd_boolean - find_abstract_instance (struct comp_unit * unit, -- bfd_byte * orig_info_ptr, - struct attribute * attr_ptr, -+ unsigned int recur_count, - const char ** pname, - bfd_boolean * is_linkage, - char ** filename_ptr, -@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit - struct attribute attr; - const char *name = NULL; - -+ if (recur_count == 100) -+ { -+ _bfd_error_handler -+ (_("DWARF error: abstract instance recursion detected")); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ } -+ - /* DW_FORM_ref_addr can reference an entry in a different CU. It - is an offset from the .debug_info section, not the current CU. */ - if (attr_ptr->form == DW_FORM_ref_addr) -@@ -2962,15 +2970,7 @@ find_abstract_instance (struct comp_unit - info_ptr, info_ptr_end); - if (info_ptr == NULL) - break; -- /* It doesn't ever make sense for DW_AT_specification to -- refer to the same DIE. Stop simple recursion. */ -- if (info_ptr == orig_info_ptr) -- { -- _bfd_error_handler -- (_("DWARF error: abstract instance recursion detected")); -- bfd_set_error (bfd_error_bad_value); -- return FALSE; -- } -+ - switch (attr.name) - { - case DW_AT_name: -@@ -2984,7 +2984,7 @@ find_abstract_instance (struct comp_unit - } - break; - case DW_AT_specification: -- if (!find_abstract_instance (unit, info_ptr, &attr, -+ if (!find_abstract_instance (unit, &attr, recur_count + 1, - &name, is_linkage, - filename_ptr, linenumber_ptr)) - return FALSE; -@@ -3200,7 +3200,7 @@ scan_unit_for_symbols (struct comp_unit - - case DW_AT_abstract_origin: - case DW_AT_specification: -- if (!find_abstract_instance (unit, info_ptr, &attr, -+ if (!find_abstract_instance (unit, &attr, 0, - &func->name, - &func->is_linkage, - &func->file, diff --git a/SOURCES/binutils-CVE-2019-17451.patch b/SOURCES/binutils-CVE-2019-17451.patch deleted file mode 100644 index 0f503a3..0000000 --- a/SOURCES/binutils-CVE-2019-17451.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- binutils.orig/bfd/dwarf2.c 2019-11-13 11:32:09.395430104 +0000 -+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:33:17.272899503 +0000 -@@ -4440,7 +4440,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, - for (total_size = 0; - msec; - msec = find_debug_info (debug_bfd, debug_sections, msec)) -- total_size += msec->size; -+ { -+ /* Catch PR25070 testcase overflowing size calculation here. */ -+ if (total_size + msec->size < total_size -+ || total_size + msec->size < msec->size) -+ { -+ bfd_set_error (bfd_error_no_memory); -+ return FALSE; -+ } -+ total_size += msec->size; -+ } - - stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size); - if (stash->info_ptr_memory == NULL) diff --git a/SOURCES/binutils-CVE-2019-9071.patch b/SOURCES/binutils-CVE-2019-9071.patch deleted file mode 100644 index f4ef3bc..0000000 --- a/SOURCES/binutils-CVE-2019-9071.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- 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 > DEMANGLE_RECURSION_LIMIT) -+ /* 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 < DEMANGLE_RECURSION_LIMIT) -+ dpi->recursion = 0; - dpi->num_copy_templates *= dpi->num_saved_scopes; - - dpi->current_template = NULL; diff --git a/SOURCES/binutils-CVE-2019-9073.patch b/SOURCES/binutils-CVE-2019-9073.patch deleted file mode 100644 index 37256f4..0000000 --- a/SOURCES/binutils-CVE-2019-9073.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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 diff --git a/SOURCES/binutils-CVE-2019-9074.patch b/SOURCES/binutils-CVE-2019-9074.patch deleted file mode 100644 index 84f0fd5..0000000 --- a/SOURCES/binutils-CVE-2019-9074.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- 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]); diff --git a/SOURCES/binutils-CVE-2019-9075.patch b/SOURCES/binutils-CVE-2019-9075.patch deleted file mode 100644 index ec3e8ca..0000000 --- a/SOURCES/binutils-CVE-2019-9075.patch +++ /dev/null @@ -1,73 +0,0 @@ -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); diff --git a/SOURCES/binutils-CVE-2019-9077.patch b/SOURCES/binutils-CVE-2019-9077.patch deleted file mode 100644 index 1790bfa..0000000 --- a/SOURCES/binutils-CVE-2019-9077.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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) diff --git a/SOURCES/binutils-PELC-licence-corrections.patch b/SOURCES/binutils-PELC-licence-corrections.patch index c0e7462..e6bf2fe 100644 --- a/SOURCES/binutils-PELC-licence-corrections.patch +++ b/SOURCES/binutils-PELC-licence-corrections.patch @@ -1,11 +1,9 @@ ---- binutils.orig/gold/ftruncate.c 2019-06-25 11:36:51.074941484 +0100 -+++ binutils-2.32/gold/ftruncate.c 2019-06-25 11:37:28.108690037 +0100 -@@ -1,7 +1,6 @@ - /* ftruncate emulations that work on some System V's. +--- binutils.orig/gold/ftruncate.c 2020-07-24 15:12:47.000947859 +0100 ++++ binutils-2.35/gold/ftruncate.c 2020-07-24 15:19:17.602438295 +0100 +@@ -1,5 +1,4 @@ +-/* ftruncate emulations that work on some System V's. - This file is in the public domain. */ ++/* ftruncate emulations that work on some System V's. */ --/* Copyright (C) 2012-2019 Free Software Foundation, Inc. -+ Copyright (C) 2012-2019 Free Software Foundation, Inc. - - This file is part of gold. + /* Copyright (C) 2012-2020 Free Software Foundation, Inc. diff --git a/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch b/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch deleted file mode 100644 index d0db8c8..0000000 --- a/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch +++ /dev/null @@ -1,866 +0,0 @@ -diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.32/bfd/elfnn-aarch64.c ---- binutils.orig/bfd/elfnn-aarch64.c 2019-07-02 17:30:19.407892712 +0100 -+++ binutils-2.32/bfd/elfnn-aarch64.c 2019-07-02 17:35:21.874749884 +0100 -@@ -2579,6 +2579,9 @@ struct elf_aarch64_link_hash_table - unsigned int top_index; - asection **input_list; - -+ /* JUMP_SLOT relocs for variant PCS symbols may be present. */ -+ int variant_pcs; -+ - /* The offset into splt of the PLT entry for the TLS descriptor - resolver. Special values are 0, if not necessary (or not found - to be necessary yet), and -1 if needed but not determined -@@ -2790,6 +2793,31 @@ elfNN_aarch64_copy_indirect_symbol (stru - _bfd_elf_link_hash_copy_indirect (info, dir, ind); - } - -+/* Merge non-visibility st_other attributes. */ -+ -+static void -+elfNN_aarch64_merge_symbol_attribute (struct elf_link_hash_entry *h, -+ const Elf_Internal_Sym *isym, -+ bfd_boolean definition ATTRIBUTE_UNUSED, -+ bfd_boolean dynamic ATTRIBUTE_UNUSED) -+{ -+ unsigned int isym_sto = isym->st_other & ~ELF_ST_VISIBILITY (-1); -+ unsigned int h_sto = h->other & ~ELF_ST_VISIBILITY (-1); -+ -+ if (isym_sto == h_sto) -+ return; -+ -+ if (isym_sto & ~STO_AARCH64_VARIANT_PCS) -+ /* Not fatal, this callback cannot fail. */ -+ _bfd_error_handler (_("unknown attribute for symbol `%s': 0x%02x"), -+ h->root.root.string, isym_sto); -+ -+ /* Note: Ideally we would warn about any attribute mismatch, but -+ this api does not allow that without substantial changes. */ -+ if (isym_sto & STO_AARCH64_VARIANT_PCS) -+ h->other |= STO_AARCH64_VARIANT_PCS; -+} -+ - /* Destroy an AArch64 elf linker hash table. */ - - static void -@@ -8370,6 +8398,12 @@ elfNN_aarch64_allocate_dynrelocs (struct - updated. */ - - htab->root.srelplt->reloc_count++; -+ -+ /* Mark the DSO in case R__JUMP_SLOT relocs against -+ variant PCS symbols are present. */ -+ if (h->other & STO_AARCH64_VARIANT_PCS) -+ htab->variant_pcs = 1; -+ - } - else - { -@@ -8958,6 +8992,10 @@ elfNN_aarch64_size_dynamic_sections (bfd - || !add_dynamic_entry (DT_JMPREL, 0)) - return FALSE; - -+ if (htab->variant_pcs -+ && !add_dynamic_entry (DT_AARCH64_VARIANT_PCS, 0)) -+ return FALSE; -+ - if (htab->tlsdesc_plt - && (!add_dynamic_entry (DT_TLSDESC_PLT, 0) - || !add_dynamic_entry (DT_TLSDESC_GOT, 0))) -@@ -9708,6 +9746,9 @@ const struct elf_size_info elfNN_aarch64 - #define elf_backend_copy_indirect_symbol \ - elfNN_aarch64_copy_indirect_symbol - -+#define elf_backend_merge_symbol_attribute \ -+ elfNN_aarch64_merge_symbol_attribute -+ - /* Create .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts - to them in our hash. */ - #define elf_backend_create_dynamic_sections \ -diff -rup binutils.orig/binutils/readelf.c binutils-2.32/binutils/readelf.c ---- binutils.orig/binutils/readelf.c 2019-07-02 17:30:18.890896375 +0100 -+++ binutils-2.32/binutils/readelf.c 2019-07-02 17:32:25.008002901 +0100 -@@ -1797,6 +1797,19 @@ dump_relocations (Filedata * fi - } - - static const char * -+get_aarch64_dynamic_type (unsigned long type) -+{ -+ switch (type) -+ { -+ case DT_AARCH64_BTI_PLT: return "AARCH64_BTI_PLT"; -+ case DT_AARCH64_PAC_PLT: return "AARCH64_PAC_PLT"; -+ case DT_AARCH64_VARIANT_PCS: return "AARCH64_VARIANT_PCS"; -+ default: -+ return NULL; -+ } -+} -+ -+static const char * - get_mips_dynamic_type (unsigned long type) - { - switch (type) -@@ -2169,6 +2182,9 @@ get_dynamic_type (Filedata * filedata, u - - switch (filedata->file_header.e_machine) - { -+ case EM_AARCH64: -+ result = get_aarch64_dynamic_type (type); -+ break; - case EM_MIPS: - case EM_MIPS_RS3_LE: - result = get_mips_dynamic_type (type); -@@ -11054,6 +11070,22 @@ get_solaris_symbol_visibility (unsigned - } - - static const char * -+get_aarch64_symbol_other (unsigned int other) -+{ -+ static char buf[32]; -+ -+ if (other & STO_AARCH64_VARIANT_PCS) -+ { -+ other &= ~STO_AARCH64_VARIANT_PCS; -+ if (other == 0) -+ return "VARIANT_PCS"; -+ snprintf (buf, sizeof buf, "VARIANT_PCS | %x", other); -+ return buf; -+ } -+ return NULL; -+} -+ -+static const char * - get_mips_symbol_other (unsigned int other) - { - switch (other) -@@ -11164,6 +11196,9 @@ get_symbol_other (Filedata * filedata, u - - switch (filedata->file_header.e_machine) - { -+ case EM_AARCH64: -+ result = get_aarch64_symbol_other (other); -+ break; - case EM_MIPS: - result = get_mips_symbol_other (other); - break; -diff -rup binutils.orig/gas/config/tc-aarch64.c binutils-2.32/gas/config/tc-aarch64.c ---- binutils.orig/gas/config/tc-aarch64.c 2019-07-02 17:30:19.131894667 +0100 -+++ binutils-2.32/gas/config/tc-aarch64.c 2019-07-02 17:35:45.202584620 +0100 -@@ -1938,6 +1938,28 @@ s_aarch64_elf_cons (int nbytes) - demand_empty_rest_of_line (); - } - -+/* Mark symbol that it follows a variant PCS convention. */ -+ -+static void -+s_variant_pcs (int ignored ATTRIBUTE_UNUSED) -+{ -+ char *name; -+ char c; -+ symbolS *sym; -+ asymbol *bfdsym; -+ elf_symbol_type *elfsym; -+ -+ c = get_symbol_name (&name); -+ if (!*name) -+ as_bad (_("Missing symbol name in directive")); -+ sym = symbol_find_or_make (name); -+ restore_line_pointer (c); -+ demand_empty_rest_of_line (); -+ bfdsym = symbol_get_bfdsym (sym); -+ elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym); -+ gas_assert (elfsym); -+ elfsym->internal_elf_sym.st_other |= STO_AARCH64_VARIANT_PCS; -+} - #endif /* OBJ_ELF */ - - /* Output a 32-bit word, but mark as an instruction. */ -@@ -2084,6 +2106,7 @@ const pseudo_typeS md_pseudo_table[] = { - {"long", s_aarch64_elf_cons, 4}, - {"xword", s_aarch64_elf_cons, 8}, - {"dword", s_aarch64_elf_cons, 8}, -+ {"variant_pcs", s_variant_pcs, 0}, - #endif - {0, 0, 0} - }; -@@ -9320,3 +9343,35 @@ aarch64_copy_symbol_attributes (symbolS - { - AARCH64_GET_FLAG (dest) = AARCH64_GET_FLAG (src); - } -+ -+#ifdef OBJ_ELF -+/* Same as elf_copy_symbol_attributes, but without copying st_other. -+ This is needed so AArch64 specific st_other values can be independently -+ specified for an IFUNC resolver (that is called by the dynamic linker) -+ and the symbol it resolves (aliased to the resolver). In particular, -+ if a function symbol has special st_other value set via directives, -+ then attaching an IFUNC resolver to that symbol should not override -+ the st_other setting. Requiring the directive on the IFUNC resolver -+ symbol would be unexpected and problematic in C code, where the two -+ symbols appear as two independent function declarations. */ -+ -+void -+aarch64_elf_copy_symbol_attributes (symbolS *dest, symbolS *src) -+{ -+ struct elf_obj_sy *srcelf = symbol_get_obj (src); -+ struct elf_obj_sy *destelf = symbol_get_obj (dest); -+ if (srcelf->size) -+ { -+ if (destelf->size == NULL) -+ destelf->size = XNEW (expressionS); -+ *destelf->size = *srcelf->size; -+ } -+ else -+ { -+ if (destelf->size != NULL) -+ free (destelf->size); -+ destelf->size = NULL; -+ } -+ S_SET_SIZE (dest, S_GET_SIZE (src)); -+} -+#endif -diff -rup binutils.orig/gas/config/tc-aarch64.h binutils-2.32/gas/config/tc-aarch64.h ---- binutils.orig/gas/config/tc-aarch64.h 2019-07-02 17:30:19.136894632 +0100 -+++ binutils-2.32/gas/config/tc-aarch64.h 2019-07-02 17:35:45.202584620 +0100 -@@ -130,6 +130,12 @@ void aarch64_copy_symbol_attributes (sym - (aarch64_copy_symbol_attributes (DEST, SRC)) - #endif - -+#ifdef OBJ_ELF -+void aarch64_elf_copy_symbol_attributes (symbolS *, symbolS *); -+#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \ -+ aarch64_elf_copy_symbol_attributes (DEST, SRC) -+#endif -+ - #define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) \ - (NEXT_CHAR == ':' || (NEXT_CHAR == '/' && aarch64_data_in_code ())) - #define tc_canonicalize_symbol_name(str) aarch64_canonicalize_symbol_name (str); -diff -rup binutils.orig/gas/doc/c-aarch64.texi binutils-2.32/gas/doc/c-aarch64.texi ---- binutils.orig/gas/doc/c-aarch64.texi 2019-07-02 17:30:19.125894710 +0100 -+++ binutils-2.32/gas/doc/c-aarch64.texi 2019-07-02 17:35:11.362824354 +0100 -@@ -425,6 +425,12 @@ should only be done if it is really nece - - @c VVVVVVVVVVVVVVVVVVVVVVVVVV - -+@cindex @code{.variant_pcs} directive, AArch64 -+@item .variant_pcs @var{symbol} -+This directive marks @var{symbol} referencing a function that may -+follow a variant procedure call standard with different register -+usage convention from the base procedure call standard. -+ - @c WWWWWWWWWWWWWWWWWWWWWWWWWW - @c XXXXXXXXXXXXXXXXXXXXXXXXXX - -diff -rup binutils.orig/include/elf/aarch64.h binutils-2.32/include/elf/aarch64.h ---- binutils.orig/include/elf/aarch64.h 2019-07-02 17:30:18.850896658 +0100 -+++ binutils-2.32/include/elf/aarch64.h 2019-07-02 17:32:55.678785616 +0100 -@@ -36,6 +36,15 @@ - #define SHF_COMDEF 0x80000000 /* Section may be multiply defined - in the input to a link step. */ - -+/* Processor specific dynamic array tags. */ -+#define DT_AARCH64_BTI_PLT (DT_LOPROC + 1) -+#define DT_AARCH64_PAC_PLT (DT_LOPROC + 3) -+#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5) -+ -+/* AArch64-specific values for st_other. */ -+#define STO_AARCH64_VARIANT_PCS 0x80 /* Symbol may follow different call -+ convention from the base PCS. */ -+ - /* Relocation types. */ - - START_RELOC_NUMBERS (elf_aarch64_reloc_type) -diff -rup binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp ---- binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:30:18.922896148 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:35:21.875749878 +0100 -@@ -371,6 +371,10 @@ run_dump_test_lp64 "rela-abs-relative-op - - run_dump_test_lp64 "pie-bind-locally" - -+run_dump_test_lp64 "variant_pcs-r" -+run_dump_test_lp64 "variant_pcs-shared" -+run_dump_test_lp64 "variant_pcs-now" -+ - set aarch64elflinktests { - {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} - {} "copy-reloc-so.so"} ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.d 2019-07-02 17:35:11.362824354 +0100 -@@ -0,0 +1,10 @@ -+#objdump: -t -+ -+.*: file format .* -+ -+SYMBOL TABLE: -+0+ l d \.text 0+ \.text -+0+ l d \.data 0+ \.data -+0+ l d \.bss 0+ \.bss -+0+ l \.text 0+ func -+0+ \*UND\* 0+ 0x80 foobar ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.s 2019-07-02 17:35:11.362824354 +0100 -@@ -0,0 +1,8 @@ -+.text -+.variant_pcs foobar -+func: -+ bl foobar -+ b foobar -+ -+.data -+.xword foobar ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.d 2019-07-02 17:35:11.362824354 +0100 -@@ -0,0 +1,9 @@ -+#objdump: -t -+ -+.*: file format .* -+ -+SYMBOL TABLE: -+0+ l d \.text 0+ \.text -+0+ l d \.data 0+ \.data -+0+ l d \.bss 0+ \.bss -+0+ l \.text 0+ 0x80 foo ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.s 2019-07-02 17:35:11.362824354 +0100 -@@ -0,0 +1,4 @@ -+.text -+.variant_pcs foo -+foo: -+ ret ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.s 2019-07-02 17:35:45.202584620 +0100 -@@ -0,0 +1,20 @@ -+.text -+.global foo_vpcs -+.global foo_base -+.global alias_vpcs -+.global alias_base -+ -+.variant_pcs foo_vpcs -+.variant_pcs alias_vpcs -+ -+foo_vpcs: -+foo_base: -+ bl foo_vpcs -+ bl foo_base -+ bl alias_vpcs -+ bl alias_base -+ -+/* Check that the STO_AARCH64_VARIANT_PCS is not affected by .set. */ -+ -+.set alias_base, foo_vpcs -+.set alias_vpcs, foo_base ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.d 2019-07-02 17:35:45.202584620 +0100 -@@ -0,0 +1,12 @@ -+#objdump: -t -+ -+.*: file format .* -+ -+SYMBOL TABLE: -+0+ l d \.text 0+ \.text -+0+ l d \.data 0+ \.data -+0+ l d \.bss 0+ \.bss -+0+ g \.text 0+ 0x80 foo_vpcs -+0+ g \.text 0+ foo_base -+0+ g \.text 0+ 0x80 alias_vpcs -+0+ g \.text 0+ alias_base ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-1.s 2019-07-02 17:35:21.875749878 +0100 -@@ -0,0 +1,59 @@ -+.text -+ -+.variant_pcs f_spec_global_default_def -+.variant_pcs f_spec_global_default_undef -+.variant_pcs f_spec_global_hidden_def -+.variant_pcs f_spec_local -+.variant_pcs f_spec_global_default_ifunc -+.variant_pcs f_spec_global_hidden_ifunc -+.variant_pcs f_spec_local_ifunc -+ -+.global f_spec_global_default_def -+.global f_spec_global_default_undef -+.global f_spec_global_hidden_def -+.global f_spec_global_default_ifunc -+.global f_spec_global_hidden_ifunc -+.global f_base_global_default_def -+.global f_base_global_default_undef -+.global f_base_global_hidden_def -+.global f_base_global_default_ifunc -+.global f_base_global_hidden_ifunc -+ -+.hidden f_spec_global_hidden_def -+.hidden f_spec_global_hidden_ifunc -+.hidden f_base_global_hidden_def -+.hidden f_base_global_hidden_ifunc -+ -+.type f_spec_global_default_ifunc, %gnu_indirect_function -+.type f_spec_global_hidden_ifunc, %gnu_indirect_function -+.type f_spec_local_ifunc, %gnu_indirect_function -+.type f_base_global_default_ifunc, %gnu_indirect_function -+.type f_base_global_hidden_ifunc, %gnu_indirect_function -+.type f_base_local_ifunc, %gnu_indirect_function -+ -+f_spec_global_default_def: -+f_spec_global_hidden_def: -+f_spec_local: -+f_base_global_default_def: -+f_base_global_hidden_def: -+f_base_local: -+f_spec_global_default_ifunc: -+f_spec_global_hidden_ifunc: -+f_spec_local_ifunc: -+f_base_global_default_ifunc: -+f_base_global_hidden_ifunc: -+f_base_local_ifunc: -+ bl f_spec_global_default_def -+ bl f_spec_global_default_undef -+ bl f_spec_global_hidden_def -+ bl f_spec_local -+ bl f_base_global_default_def -+ bl f_base_global_default_undef -+ bl f_base_global_hidden_def -+ bl f_base_local -+ bl f_spec_global_default_ifunc -+ bl f_spec_global_hidden_ifunc -+ bl f_spec_local_ifunc -+ bl f_base_global_default_ifunc -+ bl f_base_global_hidden_ifunc -+ bl f_base_local_ifunc ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-2.s 2019-07-02 17:35:21.875749878 +0100 -@@ -0,0 +1,47 @@ -+.text -+ -+.variant_pcs f_spec_global_default_def -+.variant_pcs f_spec_global_default_undef -+.variant_pcs f_spec_global_hidden_def -+.variant_pcs f_spec_local2 -+.variant_pcs f_spec_global_default_ifunc -+.variant_pcs f_spec_global_hidden_ifunc -+.variant_pcs f_spec_local2_ifunc -+ -+.global f_spec_global_default_def -+.global f_spec_global_default_undef -+.global f_spec_global_hidden_def -+.global f_spec_global_default_ifunc -+.global f_spec_global_hidden_ifunc -+.global f_base_global_default_def -+.global f_base_global_default_undef -+.global f_base_global_hidden_def -+.global f_base_global_default_ifunc -+.global f_base_global_hidden_ifunc -+ -+.hidden f_spec_global_hidden_def -+.hidden f_spec_global_hidden_ifunc -+.hidden f_base_global_hidden_def -+.hidden f_base_global_hidden_ifunc -+ -+.type f_spec_local2_ifunc, %gnu_indirect_function -+.type f_base_local2_ifunc, %gnu_indirect_function -+ -+f_spec_local2: -+f_base_local2: -+f_spec_local2_ifunc: -+f_base_local2_ifunc: -+ bl f_spec_global_default_def -+ bl f_spec_global_default_undef -+ bl f_spec_global_hidden_def -+ bl f_spec_local2 -+ bl f_base_global_default_def -+ bl f_base_global_default_undef -+ bl f_base_global_hidden_def -+ bl f_base_local2 -+ bl f_spec_global_default_ifunc -+ bl f_spec_global_hidden_ifunc -+ bl f_spec_local2_ifunc -+ bl f_base_global_default_ifunc -+ bl f_base_global_hidden_ifunc -+ bl f_base_local2_ifunc ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs.ld 2019-07-02 17:35:37.100642017 +0100 -@@ -0,0 +1,23 @@ -+/* Script for .variant_pcs symbol tests. */ -+OUTPUT_ARCH(aarch64) -+ENTRY(_start) -+SECTIONS -+{ -+ /* Read-only sections, merged into text segment: */ -+ PROVIDE (__executable_start = 0x8000); . = 0x8000; -+ .text : -+ { -+ *(.before) -+ *(.text) -+ *(.after) -+ } =0 -+ . = 0x9000; -+ .got : { *(.got) *(.got.plt)} -+ . = 0x10000; -+ .rela.dyn : { *(.rela.ifunc) } -+ . = 0x11000; -+ .rela.plt : { *(.rela.plt) *(.rela.iplt) } -+ . = 0x12340000; -+ .far : { *(.far) } -+ .ARM.attributes 0 : { *(.ARM.atttributes) } -+} ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-02 17:34:37.557063849 +0100 -@@ -0,0 +1,67 @@ -+#source: variant_pcs-1.s -+#source: variant_pcs-2.s -+#ld: -shared --hash-style=sysv -T variant_pcs.ld -z now -+#readelf: -rsW -+ -+Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: -+ Offset Info Type Symbol's Value Symbol's Name \+ Addend -+0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 -+0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 -+0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0 -+0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0 -+0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 -+0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 -+0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038 -+0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038 -+ -+Symbol table '\.dynsym' contains 7 entries: -+ Num: Value Size Type Bind Vis Ndx Name -+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -+ 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -+ -+Symbol table '\.symtab' contains 35 entries: -+ Num: Value Size Type Bind Vis Ndx Name -+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -+ 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1 -+ 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2 -+ 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3 -+ 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4 -+ 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5 -+ 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6 -+ 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 -+ 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 -+ 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc -+ 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local -+ 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc -+ 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 -+ 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS -+ 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc -+ 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def -+ 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x -+ 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-02 17:35:35.244655166 +0100 -@@ -0,0 +1,60 @@ -+#source: variant_pcs-1.s -+#source: variant_pcs-2.s -+#ld: -r -+#readelf: -rsW -+ -+Relocation section '\.rela\.text' at offset .* contains 24 entries: -+ Offset Info Type Symbol's Value Symbol's Name \+ Addend -+0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 -+0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 -+0000000000000008 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0 -+0000000000000010 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0 -+0000000000000014 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0 -+0000000000000018 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0 -+0000000000000020 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 -+0000000000000024 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0 -+0000000000000028 000000060000011b R_AARCH64_CALL26 f_spec_local_ifunc\(\) f_spec_local_ifunc \+ 0 -+000000000000002c 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 -+0000000000000030 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0 -+0000000000000034 000000070000011b R_AARCH64_CALL26 f_base_local_ifunc\(\) f_base_local_ifunc \+ 0 -+0000000000000038 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 -+000000000000003c 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 -+0000000000000040 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0 -+0000000000000048 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0 -+000000000000004c 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0 -+0000000000000050 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0 -+0000000000000058 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 -+000000000000005c 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0 -+0000000000000060 0000000c0000011b R_AARCH64_CALL26 f_spec_local2_ifunc\(\) f_spec_local2_ifunc \+ 0 -+0000000000000064 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 -+0000000000000068 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0 -+000000000000006c 0000000d0000011b R_AARCH64_CALL26 f_base_local2_ifunc\(\) f_base_local2_ifunc \+ 0 -+ -+Symbol table '\.symtab' contains 26 entries: -+ Num: Value Size Type Bind Vis Ndx Name -+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -+ 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 -+ 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 -+ 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 -+ 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -+ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -+ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc -+ 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local -+ 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -+ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -+ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc -+ 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 -+ 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -+ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -+ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc -+ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def -+ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -+ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc ---- /dev/null 2019-07-02 08:01:33.386842704 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-02 17:34:45.635006622 +0100 -@@ -0,0 +1,67 @@ -+#source: variant_pcs-1.s -+#source: variant_pcs-2.s -+#ld: -shared --hash-style=sysv -T variant_pcs.ld -+#readelf: -rsW -+ -+Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: -+ Offset Info Type Symbol's Value Symbol's Name \+ Addend -+0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 -+0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 -+0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0 -+0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0 -+0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 -+0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 -+0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038 -+0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000 -+0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038 -+ -+Symbol table '\.dynsym' contains 7 entries: -+ Num: Value Size Type Bind Vis Ndx Name -+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -+ 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -+ -+Symbol table '\.symtab' contains 35 entries: -+ Num: Value Size Type Bind Vis Ndx Name -+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -+ 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1 -+ 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2 -+ 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3 -+ 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4 -+ 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5 -+ 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6 -+ 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 -+ 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 -+ 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc -+ 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local -+ 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc -+ 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 -+ 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x -+ 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS -+ 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc -+ 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def -+ 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x -+ 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc ---- binutils.orig/bfd/archive.c 2019-07-03 10:06:20.527408416 +0100 -+++ binutils-2.32/bfd/archive.c 2019-07-03 10:06:57.887142988 +0100 -@@ -1076,8 +1076,6 @@ do_slurp_coff_armap (bfd *abfd) - *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; -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:06:20.012412075 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:20:51.959203582 +0100 -@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri - Num: Value Size Type Bind Vis Ndx Name - 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND - 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] - 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] - 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc - - Symbol table '\.symtab' contains 35 entries: -@@ -40,28 +40,28 @@ Symbol table '\.symtab' contains 35 entr - 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 - 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 - 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\] -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] - 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x - 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\] -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] - 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x - 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS - 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_global_hidden_def \[VARIANT_PCS\] - 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc - 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def - 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] - 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x - 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] - 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] - 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:06:20.012412075 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:14:28.152933189 +0100 -@@ -37,24 +37,24 @@ Symbol table '\.symtab' contains 26 entr - 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 - 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 - 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\] -+ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] - 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x - 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\] -+ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] - 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x - 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] -+ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_spec_global_hidden_def \[VARIANT_PCS\] - 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc -- 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] - 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def -- 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] - 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] - 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:06:20.012412075 +0100 -+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:19:00.760994532 +0100 -@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri - Num: Value Size Type Bind Vis Ndx Name - 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND - 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] - 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] - 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc - - Symbol table '\.symtab' contains 35 entries: -@@ -40,28 +40,28 @@ Symbol table '\.symtab' contains 35 entr - 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 - 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 - 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\] -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] - 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x - 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\] -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] - 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x - 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS - 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_global_hidden_def \[VARIANT_PCS\] - 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc - 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def - 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] - 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x - 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] - 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] - 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc diff --git a/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch b/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch deleted file mode 100644 index 2cdb734..0000000 --- a/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- 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::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 diff --git a/SOURCES/binutils-aarch64-ld-testsuite-fixes.patch b/SOURCES/binutils-aarch64-ld-testsuite-fixes.patch new file mode 100644 index 0000000..45eeb7a --- /dev/null +++ b/SOURCES/binutils-aarch64-ld-testsuite-fixes.patch @@ -0,0 +1,200 @@ +diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-now.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2020-07-28 13:07:26.192507117 +0100 ++++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-now.d 2020-07-28 13:09:47.205905999 +0100 +@@ -23,10 +23,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr + 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 + 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 + 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x + 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* + 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x + 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS + 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC +- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* + 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc + 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def + 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ +- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x + 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-r.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2020-07-28 13:07:26.184507150 +0100 ++++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-r.d 2020-07-28 13:08:20.069277447 +0100 +@@ -37,24 +37,24 @@ Symbol table '\.symtab' contains 26 entr + 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 + 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 + 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT .* ++ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT .* + 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x + 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT .* ++ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT .* + 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x + 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN .* + 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc +- 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT .* + 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def +- 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN .* + 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* + 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-shared.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2020-07-28 13:07:26.183507154 +0100 ++++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2020-07-28 13:09:00.519105015 +0100 +@@ -23,10 +23,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr + 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 + 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 + 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x + 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* + 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x + 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS + 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC +- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* + 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc + 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def + 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ +- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x + 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:07:26.246506887 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:10:51.694631104 +0100 +@@ -1,6 +1,6 @@ + #... +-.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DEF +-.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DEF_IRONLY +-.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DEF_IRONLY +-.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DEF_IRONLY ++.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* ++.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* ++.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* ++.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* + #pass +diff -rup binutils.orig/ld/testsuite/ld-elf/indirect.exp binutils-2.35/ld/testsuite/ld-elf/indirect.exp +--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2020-07-28 13:37:46.473794149 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/indirect.exp 2020-07-28 14:10:44.867990380 +0100 +@@ -229,7 +229,7 @@ set pie_tests { + + run_ld_link_exec_tests $pie_tests + +-foreach t [list indirect5c indirect5d indirect6c indirect6d] { ++foreach t [list indirect6c indirect6d] { + set testname [concat $t "dynsym"] + if { [check_dynamic_syms tmpdir/$t] } { + pass $testname +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:37:46.393794486 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 14:14:14.632159645 +0100 +@@ -1,6 +1,6 @@ + #... +-.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* +-.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* +-.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* +-.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* ++.*func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* ++.*func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* ++.*func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* ++.*func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* + #pass +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.35/ld/testsuite/ld-plugin/plugin.exp +--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2020-07-28 15:07:51.601384963 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin.exp 2020-07-28 15:11:38.753471155 +0100 +@@ -301,6 +301,9 @@ if { !$can_compile || $failed_compile } + run_ld_link_tests $plugin_tests + + if { [is_elf_format] \ ++ && ![istarget "aarch64*-*-*"] \ ++ && ![istarget "s390*-*-*"] \ ++ && ![istarget "i686*-*-*"] \ + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { diff --git a/SOURCES/binutils-aarch64-plt-sh_entsize.patch b/SOURCES/binutils-aarch64-plt-sh_entsize.patch new file mode 100644 index 0000000..41912f1 --- /dev/null +++ b/SOURCES/binutils-aarch64-plt-sh_entsize.patch @@ -0,0 +1,27 @@ +diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c +--- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 17:20:30.607580720 +0100 ++++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 17:22:45.629741124 +0100 +@@ -9513,8 +9513,10 @@ elfNN_aarch64_init_small_plt0_entry (bfd + + memcpy (htab->root.splt->contents, htab->plt0_entry, + htab->plt_header_size); +- elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = +- htab->plt_header_size; ++ /* PR 26312: Explicitly set the sh_entsize to 0 so that ++ consumers do not think that the section contains fixed ++ sized objects. */ ++ elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0; + + plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma + + htab->root.sgotplt->output_offset +@@ -9616,10 +9618,6 @@ elfNN_aarch64_finish_dynamic_sections (b + { + elfNN_aarch64_init_small_plt0_entry (output_bfd, htab); + +- elf_section_data (htab->root.splt->output_section)-> +- this_hdr.sh_entsize = htab->plt_entry_size; +- +- + if (htab->root.tlsdesc_plt && !(info->flags & DF_BIND_NOW)) + { + BFD_ASSERT (htab->root.tlsdesc_got != (bfd_vma)-1); diff --git a/SOURCES/binutils-add-sym-cache-to-elf-link-hash.patch b/SOURCES/binutils-add-sym-cache-to-elf-link-hash.patch new file mode 100644 index 0000000..85b2006 --- /dev/null +++ b/SOURCES/binutils-add-sym-cache-to-elf-link-hash.patch @@ -0,0 +1,1981 @@ +diff -rup binutils.orig/bfd/elf-bfd.h binutils-2.35/bfd/elf-bfd.h +--- binutils.orig/bfd/elf-bfd.h 2020-07-30 15:04:05.366466702 +0100 ++++ binutils-2.35/bfd/elf-bfd.h 2020-07-30 15:04:16.707393960 +0100 +@@ -549,6 +549,16 @@ enum elf_target_os + is_nacl /* Native Client. */ + }; + ++/* Used by bfd_sym_from_r_symndx to cache a small number of local ++ symbols. */ ++#define LOCAL_SYM_CACHE_SIZE 32 ++struct sym_cache ++{ ++ bfd *abfd; ++ unsigned long indx[LOCAL_SYM_CACHE_SIZE]; ++ Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE]; ++}; ++ + /* ELF linker hash table. */ + + struct elf_link_hash_table +@@ -676,6 +686,9 @@ struct elf_link_hash_table + /* A linked list of dynamic BFD's loaded in the link. */ + struct elf_link_loaded_list *dyn_loaded; + ++ /* Small local sym cache. */ ++ struct sym_cache sym_cache; ++ + /* Short-cuts to get to dynamic linker sections. */ + asection *sgot; + asection *sgotplt; +@@ -717,16 +730,6 @@ struct elf_link_hash_table + /* Returns TRUE if the hash table is a struct elf_link_hash_table. */ + #define is_elf_hash_table(htab) \ + (((struct bfd_link_hash_table *) (htab))->type == bfd_link_elf_hash_table) +- +-/* Used by bfd_sym_from_r_symndx to cache a small number of local +- symbols. */ +-#define LOCAL_SYM_CACHE_SIZE 32 +-struct sym_cache +-{ +- bfd *abfd; +- unsigned long indx[LOCAL_SYM_CACHE_SIZE]; +- Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE]; +-}; + + /* Constant information held for an ELF backend. */ + +diff -rup binutils.orig/bfd/elf32-arm.c binutils-2.35/bfd/elf32-arm.c +--- binutils.orig/bfd/elf32-arm.c 2020-07-30 15:04:05.376466638 +0100 ++++ binutils-2.35/bfd/elf32-arm.c 2020-07-30 15:04:16.708393953 +0100 +@@ -3390,9 +3390,6 @@ struct elf32_arm_link_hash_table + bfd_vma offset; + } tls_ldm_got; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* For convenience in allocate_dynrelocs. */ + bfd * obfd; + +@@ -15316,7 +15313,7 @@ elf32_arm_check_relocs (bfd *abfd, struc + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -16871,7 +16868,8 @@ elf32_arm_size_dynamic_sections (bfd * o + s->size += 4; + } + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, symndx); ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ibfd, ++ symndx); + if (isym == NULL) + return FALSE; + +diff -rup binutils.orig/bfd/elf32-bfin.c binutils-2.35/bfd/elf32-bfin.c +--- binutils.orig/bfd/elf32-bfin.c 2020-07-30 15:04:05.377466632 +0100 ++++ binutils-2.35/bfd/elf32-bfin.c 2020-07-30 15:04:16.709393947 +0100 +@@ -4791,16 +4791,6 @@ struct bfin_link_hash_entry + struct bfin_pcrel_relocs_copied *pcrel_relocs_copied; + }; + +-/* bfin ELF linker hash table. */ +- +-struct bfin_link_hash_table +-{ +- struct elf_link_hash_table root; +- +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +-}; +- + #define bfin_hash_entry(ent) ((struct bfin_link_hash_entry *) (ent)) + + static struct bfd_hash_entry * +@@ -4829,15 +4819,14 @@ bfin_link_hash_newfunc (struct bfd_hash_ + static struct bfd_link_hash_table * + bfin_link_hash_table_create (bfd * abfd) + { +- struct bfin_link_hash_table *ret; +- size_t amt = sizeof (struct bfin_link_hash_table); ++ struct elf_link_hash_table *ret; ++ size_t amt = sizeof (struct elf_link_hash_table); + + ret = bfd_zmalloc (amt); + if (ret == NULL) + return NULL; + +- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, +- bfin_link_hash_newfunc, ++ if (!_bfd_elf_link_hash_table_init (ret, abfd, bfin_link_hash_newfunc, + sizeof (struct elf_link_hash_entry), + BFIN_ELF_DATA)) + { +@@ -4845,9 +4834,7 @@ bfin_link_hash_table_create (bfd * abfd) + return NULL; + } + +- ret->sym_cache.abfd = NULL; +- +- return &ret->root.root; ++ return &ret->root; + } + + /* The size in bytes of an entry in the procedure linkage table. */ +@@ -5418,10 +5405,6 @@ struct bfd_elf_special_section const elf + + #define bfd_elf32_bfd_is_local_label_name \ + bfin_is_local_label_name +-#define bfin_hash_table(p) \ +- ((struct bfin_link_hash_table *) (p)->hash) +- +- + + #define elf_backend_create_dynamic_sections \ + _bfd_elf_create_dynamic_sections +diff -rup binutils.orig/bfd/elf32-csky.c binutils-2.35/bfd/elf32-csky.c +--- binutils.orig/bfd/elf32-csky.c 2020-07-30 15:04:05.378466625 +0100 ++++ binutils-2.35/bfd/elf32-csky.c 2020-07-30 15:04:16.709393947 +0100 +@@ -1208,9 +1208,6 @@ struct csky_elf_link_hash_table + { + struct elf_link_hash_table elf; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Data for R_CKCORE_TLS_LDM32 relocations. */ + union + { +@@ -2477,7 +2474,7 @@ csky_elf_check_relocs (bfd * abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -2584,7 +2581,7 @@ csky_elf_check_relocs (bfd * abfd, + asection *s; + Elf_Internal_Sym *loc_isym; + +- loc_isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ loc_isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (loc_isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-hppa.c binutils-2.35/bfd/elf32-hppa.c +--- binutils.orig/bfd/elf32-hppa.c 2020-07-30 15:04:05.368466689 +0100 ++++ binutils-2.35/bfd/elf32-hppa.c 2020-07-30 15:04:16.709393947 +0100 +@@ -286,9 +286,6 @@ struct elf32_hppa_link_hash_table + /* Set if we need a .plt stub to support lazy dynamic linking. */ + unsigned int need_plt_stub:1; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Data for LDM relocations. */ + union + { +@@ -1465,7 +1462,7 @@ elf32_hppa_check_relocs (bfd *abfd, + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -4038,7 +4035,7 @@ elf32_hppa_relocate_section (bfd *output + else + { + Elf_Internal_Sym *isym +- = bfd_sym_from_r_symndx (&htab->sym_cache, ++ = bfd_sym_from_r_symndx (&htab->etab.sym_cache, + input_bfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.35/bfd/elf32-i386.c +--- binutils.orig/bfd/elf32-i386.c 2020-07-30 15:04:05.380466612 +0100 ++++ binutils-2.35/bfd/elf32-i386.c 2020-07-30 15:04:16.710393941 +0100 +@@ -1158,7 +1158,7 @@ elf_i386_tls_transition (struct bfd_link + { + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); + } +@@ -1251,7 +1251,7 @@ elf_i386_convert_load_reloc (bfd *abfd, + else + { + local_ref = TRUE; +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, + r_symndx); + abs_symbol = isym->st_shndx == SHN_ABS; + } +@@ -1529,7 +1529,7 @@ elf_i386_check_relocs (bfd *abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + goto error_return; +@@ -1859,7 +1859,7 @@ elf_i386_check_relocs (bfd *abfd, + void **vpp; + asection *s; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + goto error_return; +diff -rup binutils.orig/bfd/elf32-m32r.c binutils-2.35/bfd/elf32-m32r.c +--- binutils.orig/bfd/elf32-m32r.c 2020-07-30 15:04:05.370466676 +0100 ++++ binutils-2.35/bfd/elf32-m32r.c 2020-07-30 15:04:16.710393941 +0100 +@@ -1498,20 +1498,6 @@ struct elf_m32r_pcrel_relocs_copied + bfd_size_type count; + }; + +-/* m32r ELF linker hash table. */ +- +-struct elf_m32r_link_hash_table +-{ +- struct elf_link_hash_table root; +- +- /* Short-cuts to get to dynamic linker sections. */ +- asection *sdynbss; +- asection *srelbss; +- +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +-}; +- + /* Traverse an m32r ELF linker hash table. */ + + #define m32r_elf_link_hash_traverse(table, func, info) \ +@@ -1524,21 +1510,21 @@ struct elf_m32r_link_hash_table + + #define m32r_elf_hash_table(p) \ + (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ +- == M32R_ELF_DATA ? ((struct elf_m32r_link_hash_table *) ((p)->hash)) : NULL) ++ == M32R_ELF_DATA ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL) + + /* Create an m32r ELF linker hash table. */ + + static struct bfd_link_hash_table * + m32r_elf_link_hash_table_create (bfd *abfd) + { +- struct elf_m32r_link_hash_table *ret; +- size_t amt = sizeof (struct elf_m32r_link_hash_table); ++ struct elf_link_hash_table *ret; ++ size_t amt = sizeof (struct elf_link_hash_table); + + ret = bfd_zmalloc (amt); + if (ret == NULL) + return NULL; + +- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, ++ if (!_bfd_elf_link_hash_table_init (ret, abfd, + _bfd_elf_link_hash_newfunc, + sizeof (struct elf_link_hash_entry), + M32R_ELF_DATA)) +@@ -1547,7 +1533,7 @@ m32r_elf_link_hash_table_create (bfd *ab + return NULL; + } + +- return &ret->root.root; ++ return &ret->root; + } + + /* Create dynamic sections when linking against a dynamic object. */ +@@ -1555,7 +1541,7 @@ m32r_elf_link_hash_table_create (bfd *ab + static bfd_boolean + m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) + { +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + flagword flags, pltflags; + asection *s; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); +@@ -1578,7 +1564,7 @@ m32r_elf_create_dynamic_sections (bfd *a + pltflags |= SEC_READONLY; + + s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags); +- htab->root.splt = s; ++ htab->splt = s; + if (s == NULL + || !bfd_set_section_alignment (s, bed->plt_alignment)) + return FALSE; +@@ -1598,7 +1584,7 @@ m32r_elf_create_dynamic_sections (bfd *a + h = (struct elf_link_hash_entry *) bh; + h->def_regular = 1; + h->type = STT_OBJECT; +- htab->root.hplt = h; ++ htab->hplt = h; + + if (bfd_link_pic (info) + && ! bfd_elf_link_record_dynamic_symbol (info, h)) +@@ -1609,12 +1595,12 @@ m32r_elf_create_dynamic_sections (bfd *a + bed->default_use_rela_p + ? ".rela.plt" : ".rel.plt", + flags | SEC_READONLY); +- htab->root.srelplt = s; ++ htab->srelplt = s; + if (s == NULL + || !bfd_set_section_alignment (s, ptralign)) + return FALSE; + +- if (htab->root.sgot == NULL ++ if (htab->sgot == NULL + && !_bfd_elf_create_got_section (abfd, info)) + return FALSE; + +@@ -1669,7 +1655,7 @@ static bfd_boolean + m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *h) + { +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd *dynobj; + asection *s; + +@@ -1796,7 +1782,7 @@ static bfd_boolean + allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) + { + struct bfd_link_info *info; +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + struct elf_dyn_relocs *p; + + if (h->root.type == bfd_link_hash_indirect) +@@ -1807,7 +1793,7 @@ allocate_dynrelocs (struct elf_link_hash + if (htab == NULL) + return FALSE; + +- if (htab->root.dynamic_sections_created ++ if (htab->dynamic_sections_created + && h->plt.refcount > 0) + { + /* Make sure this symbol is output as a dynamic symbol. +@@ -1821,7 +1807,7 @@ allocate_dynrelocs (struct elf_link_hash + + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) + { +- asection *s = htab->root.splt; ++ asection *s = htab->splt; + + /* If this is the first .plt entry, make room for the special + first entry. */ +@@ -1847,10 +1833,10 @@ allocate_dynrelocs (struct elf_link_hash + + /* We also need to make an entry in the .got.plt section, which + will be placed in the .got section by the linker script. */ +- htab->root.sgotplt->size += 4; ++ htab->sgotplt->size += 4; + + /* We also need to make an entry in the .rel.plt section. */ +- htab->root.srelplt->size += sizeof (Elf32_External_Rela); ++ htab->srelplt->size += sizeof (Elf32_External_Rela); + } + else + { +@@ -1878,13 +1864,13 @@ allocate_dynrelocs (struct elf_link_hash + return FALSE; + } + +- s = htab->root.sgot; ++ s = htab->sgot; + + h->got.offset = s->size; + s->size += 4; +- dyn = htab->root.dynamic_sections_created; ++ dyn = htab->dynamic_sections_created; + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)) +- htab->root.srelgot->size += sizeof (Elf32_External_Rela); ++ htab->srelgot->size += sizeof (Elf32_External_Rela); + } + else + h->got.offset = (bfd_vma) -1; +@@ -1944,7 +1930,7 @@ allocate_dynrelocs (struct elf_link_hash + if (!h->non_got_ref + && ((h->def_dynamic + && !h->def_regular) +- || (htab->root.dynamic_sections_created ++ || (htab->dynamic_sections_created + && (h->root.type == bfd_link_hash_undefweak + || h->root.type == bfd_link_hash_undefined)))) + { +@@ -1984,7 +1970,7 @@ static bfd_boolean + m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info) + { +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd *dynobj; + asection *s; + bfd_boolean relocs; +@@ -1998,10 +1984,10 @@ m32r_elf_size_dynamic_sections (bfd *out + if (htab == NULL) + return FALSE; + +- dynobj = htab->root.dynobj; ++ dynobj = htab->dynobj; + BFD_ASSERT (dynobj != NULL); + +- if (htab->root.dynamic_sections_created) ++ if (htab->dynamic_sections_created) + { + /* Set the contents of the .interp section to the interpreter. */ + if (bfd_link_executable (info) && !info->nointerp) +@@ -2060,8 +2046,8 @@ m32r_elf_size_dynamic_sections (bfd *out + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; + locsymcount = symtab_hdr->sh_info; + end_local_got = local_got + locsymcount; +- s = htab->root.sgot; +- srel = htab->root.srelgot; ++ s = htab->sgot; ++ srel = htab->srelgot; + for (; local_got < end_local_got; ++local_got) + { + if (*local_got > 0) +@@ -2078,7 +2064,7 @@ m32r_elf_size_dynamic_sections (bfd *out + + /* Allocate global sym .plt and .got entries, and space for global + sym dynamic relocs. */ +- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info); ++ elf_link_hash_traverse (htab, allocate_dynrelocs, info); + + /* We now have determined the sizes of the various dynamic sections. + Allocate memory for them. */ +@@ -2088,9 +2074,9 @@ m32r_elf_size_dynamic_sections (bfd *out + if ((s->flags & SEC_LINKER_CREATED) == 0) + continue; + +- if (s == htab->root.splt +- || s == htab->root.sgot +- || s == htab->root.sgotplt ++ if (s == htab->splt ++ || s == htab->sgot ++ || s == htab->sgotplt + || s == htab->sdynbss) + { + /* Strip this section if we don't need it; see the +@@ -2098,7 +2084,7 @@ m32r_elf_size_dynamic_sections (bfd *out + } + else if (CONST_STRNEQ (bfd_section_name (s), ".rela")) + { +- if (s->size != 0 && s != htab->root.srelplt) ++ if (s->size != 0 && s != htab->srelplt) + relocs = TRUE; + + /* We use the reloc_count field as a counter if we need +@@ -2188,7 +2174,7 @@ m32r_elf_relocate_section (bfd *output_b + Elf_Internal_Rela *rel, *relend; + /* Assume success. */ + bfd_boolean ret = TRUE; +- struct elf_m32r_link_hash_table *htab = m32r_elf_hash_table (info); ++ struct elf_link_hash_table *htab = m32r_elf_hash_table (info); + bfd_vma *local_got_offsets; + asection *sgot, *splt, *sreloc; + bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section); +@@ -2198,8 +2184,8 @@ m32r_elf_relocate_section (bfd *output_b + + local_got_offsets = elf_local_got_offsets (input_bfd); + +- sgot = htab->root.sgot; +- splt = htab->root.splt; ++ sgot = htab->sgot; ++ splt = htab->splt; + sreloc = NULL; + + rel = relocs; +@@ -2295,7 +2281,7 @@ m32r_elf_relocate_section (bfd *output_b + bfd_boolean dyn; + sec = h->root.u.def.section; + +- dyn = htab->root.dynamic_sections_created; ++ dyn = htab->dynamic_sections_created; + sec = h->root.u.def.section; + if (r_type == R_M32R_GOTPC24 + || (r_type == R_M32R_GOTPC_HI_ULO +@@ -2516,7 +2502,7 @@ m32r_elf_relocate_section (bfd *output_b + off = h->got.offset; + BFD_ASSERT (off != (bfd_vma) -1); + +- dyn = htab->root.dynamic_sections_created; ++ dyn = htab->dynamic_sections_created; + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, + bfd_link_pic (info), + h) +@@ -2576,7 +2562,7 @@ m32r_elf_relocate_section (bfd *output_b + + /* We need to generate a R_M32R_RELATIVE reloc + for the dynamic linker. */ +- srelgot = htab->root.srelgot; ++ srelgot = htab->srelgot; + BFD_ASSERT (srelgot != NULL); + + outrel.r_offset = (sgot->output_section->vma +@@ -2892,7 +2878,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) + { +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd_byte *loc; + + #ifdef DEBUG_PIC +@@ -2918,9 +2904,9 @@ m32r_elf_finish_dynamic_symbol (bfd *out + + BFD_ASSERT (h->dynindx != -1); + +- splt = htab->root.splt; +- sgot = htab->root.sgotplt; +- srela = htab->root.srelplt; ++ splt = htab->splt; ++ sgot = htab->sgotplt; ++ srela = htab->srelplt; + BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL); + + /* Get the index in the procedure linkage table which +@@ -3014,8 +3000,8 @@ m32r_elf_finish_dynamic_symbol (bfd *out + /* This symbol has an entry in the global offset table. Set it + up. */ + +- sgot = htab->root.sgot; +- srela = htab->root.srelgot; ++ sgot = htab->sgot; ++ srela = htab->srelgot; + BFD_ASSERT (sgot != NULL && srela != NULL); + + rela.r_offset = (sgot->output_section->vma +@@ -3063,7 +3049,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak)); + +- s = bfd_get_linker_section (htab->root.dynobj, ".rela.bss"); ++ s = bfd_get_linker_section (htab->dynobj, ".rela.bss"); + BFD_ASSERT (s != NULL); + + rela.r_offset = (h->root.u.def.value +@@ -3078,7 +3064,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out + } + + /* Mark some specially defined symbols as absolute. */ +- if (h == htab->root.hdynamic || h == htab->root.hgot) ++ if (h == htab->hdynamic || h == htab->hgot) + sym->st_shndx = SHN_ABS; + + return TRUE; +@@ -3091,7 +3077,7 @@ static bfd_boolean + m32r_elf_finish_dynamic_sections (bfd *output_bfd, + struct bfd_link_info *info) + { +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd *dynobj; + asection *sdyn; + asection *sgot; +@@ -3104,12 +3090,12 @@ m32r_elf_finish_dynamic_sections (bfd *o + if (htab == NULL) + return FALSE; + +- dynobj = htab->root.dynobj; ++ dynobj = htab->dynobj; + +- sgot = htab->root.sgotplt; ++ sgot = htab->sgotplt; + sdyn = bfd_get_linker_section (dynobj, ".dynamic"); + +- if (htab->root.dynamic_sections_created) ++ if (htab->dynamic_sections_created) + { + asection *splt; + Elf32_External_Dyn *dyncon, *dynconend; +@@ -3132,17 +3118,17 @@ m32r_elf_finish_dynamic_sections (bfd *o + break; + + case DT_PLTGOT: +- s = htab->root.sgotplt; ++ s = htab->sgotplt; + goto get_vma; + case DT_JMPREL: +- s = htab->root.srelplt; ++ s = htab->srelplt; + get_vma: + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + break; + + case DT_PLTRELSZ: +- s = htab->root.srelplt; ++ s = htab->srelplt; + dyn.d_un.d_val = s->size; + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + break; +@@ -3150,7 +3136,7 @@ m32r_elf_finish_dynamic_sections (bfd *o + } + + /* Fill in the first entry in the procedure linkage table. */ +- splt = htab->root.splt; ++ splt = htab->splt; + if (splt && splt->size > 0) + { + if (bfd_link_pic (info)) +@@ -3369,7 +3355,7 @@ m32r_elf_check_relocs (bfd *abfd, + struct elf_link_hash_entry **sym_hashes; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; +- struct elf_m32r_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd *dynobj; + asection *sreloc; + +@@ -3384,7 +3370,7 @@ m32r_elf_check_relocs (bfd *abfd, + if (htab == NULL) + return FALSE; + +- dynobj = htab->root.dynobj; ++ dynobj = htab->dynobj; + + rel_end = relocs + sec->reloc_count; + for (rel = relocs; rel < rel_end; rel++) +@@ -3406,7 +3392,7 @@ m32r_elf_check_relocs (bfd *abfd, + } + + /* Some relocs require a global offset table. */ +- if (htab->root.sgot == NULL) ++ if (htab->sgot == NULL) + { + switch (r_type) + { +@@ -3423,7 +3409,7 @@ m32r_elf_check_relocs (bfd *abfd, + case R_M32R_GOTPC_LO: + case R_M32R_GOT24: + if (dynobj == NULL) +- htab->root.dynobj = dynobj = abfd; ++ htab->dynobj = dynobj = abfd; + if (!_bfd_elf_create_got_section (dynobj, info)) + return FALSE; + break; +@@ -3540,7 +3526,7 @@ m32r_elf_check_relocs (bfd *abfd, + struct elf_dyn_relocs **head; + + if (dynobj == NULL) +- htab->root.dynobj = dynobj = abfd; ++ htab->dynobj = dynobj = abfd; + + /* When creating a shared object, we must copy these + relocs into the output file. We create a reloc +diff -rup binutils.orig/bfd/elf32-m68hc1x.h binutils-2.35/bfd/elf32-m68hc1x.h +--- binutils.orig/bfd/elf32-m68hc1x.h 2020-07-30 15:04:05.378466625 +0100 ++++ binutils-2.35/bfd/elf32-m68hc1x.h 2020-07-30 15:04:16.710393941 +0100 +@@ -120,9 +120,6 @@ struct m68hc11_elf_link_hash_table + int top_index; + asection **input_list; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + bfd_boolean (* size_one_stub) (struct bfd_hash_entry*, void*); + bfd_boolean (* build_one_stub) (struct bfd_hash_entry*, void*); + }; +diff -rup binutils.orig/bfd/elf32-m68k.c binutils-2.35/bfd/elf32-m68k.c +--- binutils.orig/bfd/elf32-m68k.c 2020-07-30 15:04:05.363466721 +0100 ++++ binutils-2.35/bfd/elf32-m68k.c 2020-07-30 15:04:16.710393941 +0100 +@@ -889,9 +889,6 @@ struct elf_m68k_link_hash_table + { + struct elf_link_hash_table root; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* The PLT format used by this link, or NULL if the format has not + yet been chosen. */ + const struct elf_m68k_plt_info *plt_info; +@@ -2836,7 +2833,7 @@ elf_m68k_check_relocs (bfd *abfd, + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->sym_cache, ++ isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-metag.c binutils-2.35/bfd/elf32-metag.c +--- binutils.orig/bfd/elf32-metag.c 2020-07-30 15:04:05.379466619 +0100 ++++ binutils-2.35/bfd/elf32-metag.c 2020-07-30 15:04:16.711393934 +0100 +@@ -823,9 +823,6 @@ struct elf_metag_link_hash_table + asection **input_list; + Elf_Internal_Sym **all_local_syms; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Data for LDM relocations. */ + union + { +@@ -2098,7 +2095,7 @@ elf_metag_check_relocs (bfd *abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-microblaze.c binutils-2.35/bfd/elf32-microblaze.c +--- binutils.orig/bfd/elf32-microblaze.c 2020-07-30 15:04:05.367466696 +0100 ++++ binutils-2.35/bfd/elf32-microblaze.c 2020-07-30 15:04:16.711393934 +0100 +@@ -744,9 +744,6 @@ struct elf32_mb_link_hash_table + { + struct elf_link_hash_table elf; + +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_sec; +- + /* TLS Local Dynamic GOT Entry */ + union { + bfd_signed_vma refcount; +@@ -2523,7 +2520,7 @@ microblaze_elf_check_relocs (bfd * abfd, + Elf_Internal_Sym *isym; + void *vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_sec, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-nds32.c binutils-2.35/bfd/elf32-nds32.c +--- binutils.orig/bfd/elf32-nds32.c 2020-07-30 15:04:05.365466709 +0100 ++++ binutils-2.35/bfd/elf32-nds32.c 2020-07-30 15:04:16.712393928 +0100 +@@ -3696,8 +3696,6 @@ nds32_elf_link_hash_table_create (bfd *a + return NULL; + } + +- ret->sdynbss = NULL; +- ret->srelbss = NULL; + ret->sym_ld_script = NULL; + + return &ret->root.root; +@@ -3833,7 +3831,7 @@ nds32_elf_create_dynamic_sections (bfd * + initialize them at run time. The linker script puts the .dynbss + section into the .bss section of the final image. */ + s = bfd_make_section (abfd, ".dynbss"); +- htab->sdynbss = s; ++ htab->root.sdynbss = s; + if (s == NULL + || !bfd_set_section_flags (s, SEC_ALLOC | SEC_LINKER_CREATED)) + return FALSE; +@@ -3852,7 +3850,7 @@ nds32_elf_create_dynamic_sections (bfd * + { + s = bfd_make_section (abfd, (bed->default_use_rela_p + ? ".rela.bss" : ".rel.bss")); +- htab->srelbss = s; ++ htab->root.srelbss = s; + if (s == NULL + || !bfd_set_section_flags (s, flags | SEC_READONLY) + || !bfd_set_section_alignment (s, ptralign)) +@@ -3988,7 +3986,7 @@ nds32_elf_adjust_dynamic_symbol (struct + same memory location for the variable. */ + + htab = nds32_elf_hash_table (info); +- s = htab->sdynbss; ++ s = htab->root.sdynbss; + BFD_ASSERT (s != NULL); + + /* We must generate a R_NDS32_COPY reloc to tell the dynamic linker +@@ -3999,7 +3997,7 @@ nds32_elf_adjust_dynamic_symbol (struct + { + asection *srel; + +- srel = htab->srelbss; ++ srel = htab->root.srelbss; + BFD_ASSERT (srel != NULL); + srel->size += sizeof (Elf32_External_Rela); + h->needs_copy = 1; +@@ -7277,7 +7275,8 @@ nds32_elf_check_relocs (bfd *abfd, struc + void *vpp; + + Elf_Internal_Sym *isym; +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ++ abfd, r_symndx); + if (isym == NULL) + return FALSE; + +diff -rup binutils.orig/bfd/elf32-nds32.h binutils-2.35/bfd/elf32-nds32.h +--- binutils.orig/bfd/elf32-nds32.h 2020-07-30 15:04:05.378466625 +0100 ++++ binutils-2.35/bfd/elf32-nds32.h 2020-07-30 15:04:16.712393928 +0100 +@@ -122,13 +122,6 @@ struct elf_nds32_link_hash_table + { + struct elf_link_hash_table root; + +- /* Short-cuts to get to dynamic linker sections. */ +- asection *sdynbss; +- asection *srelbss; +- +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_cache; +- + /* Target dependent options. */ + int relax_fp_as_gp; /* --mrelax-omit-fp. */ + int eliminate_gc_relocs; /* --meliminate-gc-relocs. */ +diff -rup binutils.orig/bfd/elf32-nios2.c binutils-2.35/bfd/elf32-nios2.c +--- binutils.orig/bfd/elf32-nios2.c 2020-07-30 15:04:05.375466645 +0100 ++++ binutils-2.35/bfd/elf32-nios2.c 2020-07-30 15:04:16.712393928 +0100 +@@ -1808,9 +1808,6 @@ struct elf32_nios2_link_hash_table + bfd_vma offset; + } tls_ldm_got; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + bfd_vma res_n_size; + }; + +@@ -4902,7 +4899,7 @@ nios2_elf32_check_relocs (bfd *abfd, str + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-or1k.c binutils-2.35/bfd/elf32-or1k.c +--- binutils.orig/bfd/elf32-or1k.c 2020-07-30 15:04:05.371466670 +0100 ++++ binutils-2.35/bfd/elf32-or1k.c 2020-07-30 15:04:16.713393921 +0100 +@@ -916,9 +916,6 @@ struct elf_or1k_link_hash_table + { + struct elf_link_hash_table root; + +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_sec; +- + bfd_boolean saw_plta; + }; + +@@ -2151,7 +2148,7 @@ or1k_elf_check_relocs (bfd *abfd, + Elf_Internal_Sym *isym; + void *vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_sec, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-ppc.c binutils-2.35/bfd/elf32-ppc.c +--- binutils.orig/bfd/elf32-ppc.c 2020-07-30 15:04:05.359466747 +0100 ++++ binutils-2.35/bfd/elf32-ppc.c 2020-07-30 15:04:16.713393921 +0100 +@@ -2212,9 +2212,6 @@ struct ppc_elf_link_hash_table + int plt_slot_size; + /* The size of the first PLT entry. */ + int plt_initial_entry_size; +- +- /* Small local sym cache. */ +- struct sym_cache sym_cache; + }; + + /* Rename some of the generic section flags to better document how they +@@ -2952,7 +2949,7 @@ ppc_elf_check_relocs (bfd *abfd, + ifunc = NULL; + if (h == NULL && htab->elf.target_os != is_vxworks) + { +- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -3335,7 +3332,7 @@ ppc_elf_check_relocs (bfd *abfd, + asection *s; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -3495,7 +3492,7 @@ ppc_elf_check_relocs (bfd *abfd, + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-s390.c binutils-2.35/bfd/elf32-s390.c +--- binutils.orig/bfd/elf32-s390.c 2020-07-30 15:04:05.376466638 +0100 ++++ binutils-2.35/bfd/elf32-s390.c 2020-07-30 15:04:16.714393915 +0100 +@@ -746,9 +746,6 @@ struct elf_s390_link_hash_table + bfd_signed_vma refcount; + bfd_vma offset; + } tls_ldm_got; +- +- /* Small local sym cache. */ +- struct sym_cache sym_cache; + }; + + /* Get the s390 ELF linker hash table from a link_info structure. */ +@@ -930,7 +927,7 @@ elf_s390_check_relocs (bfd *abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -1281,7 +1278,7 @@ elf_s390_check_relocs (bfd *abfd, + asection *s; + void *vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -3722,7 +3719,7 @@ elf_s390_finish_dynamic_sections (bfd *o + if (local_plt[i].plt.offset != (bfd_vma) -1) + { + asection *sec = local_plt[i].sec; +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i); ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); + if (isym == NULL) + return FALSE; + +diff -rup binutils.orig/bfd/elf32-sh.c binutils-2.35/bfd/elf32-sh.c +--- binutils.orig/bfd/elf32-sh.c 2020-07-30 15:04:05.376466638 +0100 ++++ binutils-2.35/bfd/elf32-sh.c 2020-07-30 15:04:16.714393915 +0100 +@@ -2160,8 +2160,6 @@ struct elf_sh_link_hash_table + struct elf_link_hash_table root; + + /* Short-cuts to get to dynamic linker sections. */ +- asection *sdynbss; +- asection *srelbss; + asection *sfuncdesc; + asection *srelfuncdesc; + asection *srofixup; +@@ -2169,9 +2167,6 @@ struct elf_sh_link_hash_table + /* The (unloaded but important) VxWorks .rela.plt.unloaded section. */ + asection *srelplt2; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* A counter or offset to track a TLS got entry. */ + union + { +@@ -2439,7 +2434,7 @@ sh_elf_create_dynamic_sections (bfd *abf + section into the .bss section of the final image. */ + s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", + SEC_ALLOC | SEC_LINKER_CREATED); +- htab->sdynbss = s; ++ htab->root.sdynbss = s; + if (s == NULL) + return FALSE; + +@@ -2460,7 +2455,7 @@ sh_elf_create_dynamic_sections (bfd *abf + (bed->default_use_rela_p + ? ".rela.bss" : ".rel.bss"), + flags | SEC_READONLY); +- htab->srelbss = s; ++ htab->root.srelbss = s; + if (s == NULL + || !bfd_set_section_alignment (s, ptralign)) + return FALSE; +@@ -2580,7 +2575,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd + both the dynamic object and the regular object will refer to the + same memory location for the variable. */ + +- s = htab->sdynbss; ++ s = htab->root.sdynbss; + BFD_ASSERT (s != NULL); + + /* We must generate a R_SH_COPY reloc to tell the dynamic linker to +@@ -2591,7 +2586,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd + { + asection *srel; + +- srel = htab->srelbss; ++ srel = htab->root.srelbss; + BFD_ASSERT (srel != NULL); + srel->size += sizeof (Elf32_External_Rela); + h->needs_copy = 1; +@@ -3151,7 +3146,7 @@ sh_elf_size_dynamic_sections (bfd *outpu + || s == htab->root.sgotplt + || s == htab->sfuncdesc + || s == htab->srofixup +- || s == htab->sdynbss) ++ || s == htab->root.sdynbss) + { + /* Strip this section if we don't need it; see the + comment below. */ +@@ -5679,7 +5674,7 @@ sh_elf_check_relocs (bfd *abfd, struct b + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-tic6x.c binutils-2.35/bfd/elf32-tic6x.c +--- binutils.orig/bfd/elf32-tic6x.c 2020-07-30 15:04:05.366466702 +0100 ++++ binutils-2.35/bfd/elf32-tic6x.c 2020-07-30 15:04:16.714393915 +0100 +@@ -46,9 +46,6 @@ struct elf32_tic6x_link_hash_table + /* C6X specific command line arguments. */ + struct elf32_tic6x_params params; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* The output BFD, for convenience. */ + bfd *obfd; + +@@ -2729,7 +2726,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf32-tilepro.c binutils-2.35/bfd/elf32-tilepro.c +--- binutils.orig/bfd/elf32-tilepro.c 2020-07-30 15:04:05.364466715 +0100 ++++ binutils-2.35/bfd/elf32-tilepro.c 2020-07-30 15:04:16.715393908 +0100 +@@ -727,19 +727,11 @@ tilepro_elf_mkobject (bfd *abfd) + #include "elf/common.h" + #include "elf/internal.h" + +-struct tilepro_elf_link_hash_table +-{ +- struct elf_link_hash_table elf; +- +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_cache; +-}; +- + /* Get the Tilepro ELF linker hash table from a link_info structure. */ + #define tilepro_elf_hash_table(p) \ + (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ + == TILEPRO_ELF_DATA \ +- ? ((struct tilepro_elf_link_hash_table *) ((p)->hash)) : NULL) ++ ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL) + + static reloc_howto_type * + tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, +@@ -1184,14 +1176,14 @@ link_hash_newfunc (struct bfd_hash_entry + static struct bfd_link_hash_table * + tilepro_elf_link_hash_table_create (bfd *abfd) + { +- struct tilepro_elf_link_hash_table *ret; +- size_t amt = sizeof (struct tilepro_elf_link_hash_table); ++ struct elf_link_hash_table *ret; ++ size_t amt = sizeof (struct elf_link_hash_table); + +- ret = (struct tilepro_elf_link_hash_table *) bfd_zmalloc (amt); ++ ret = (struct elf_link_hash_table *) bfd_zmalloc (amt); + if (ret == NULL) + return NULL; + +- if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, ++ if (!_bfd_elf_link_hash_table_init (ret, abfd, link_hash_newfunc, + sizeof (struct tilepro_elf_link_hash_entry), + TILEPRO_ELF_DATA)) + { +@@ -1199,7 +1191,7 @@ tilepro_elf_link_hash_table_create (bfd + return NULL; + } + +- return &ret->elf.root; ++ return &ret->root; + } + + /* Create the .got section. */ +@@ -1402,7 +1394,7 @@ static bfd_boolean + tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, + asection *sec, const Elf_Internal_Rela *relocs) + { +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + const Elf_Internal_Rela *rel; +@@ -1423,8 +1415,8 @@ tilepro_elf_check_relocs (bfd *abfd, str + + BFD_ASSERT (is_tilepro_elf (abfd) || num_relocs == 0); + +- if (htab->elf.dynobj == NULL) +- htab->elf.dynobj = abfd; ++ if (htab->dynobj == NULL) ++ htab->dynobj = abfd; + + rel_end = relocs + num_relocs; + for (rel = relocs; rel < rel_end; rel++) +@@ -1569,9 +1561,9 @@ tilepro_elf_check_relocs (bfd *abfd, str + } + } + +- if (htab->elf.sgot == NULL) ++ if (htab->sgot == NULL) + { +- if (!tilepro_elf_create_got_section (htab->elf.dynobj, info)) ++ if (!tilepro_elf_create_got_section (htab->dynobj, info)) + return FALSE; + } + break; +@@ -1716,7 +1708,7 @@ tilepro_elf_check_relocs (bfd *abfd, str + if (sreloc == NULL) + { + sreloc = _bfd_elf_make_dynamic_reloc_section +- (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE); ++ (sec, htab->dynobj, 2, abfd, /*rela?*/ TRUE); + + if (sreloc == NULL) + return FALSE; +@@ -1754,7 +1746,7 @@ tilepro_elf_check_relocs (bfd *abfd, str + { + size_t amt = sizeof *p; + p = ((struct elf_dyn_relocs *) +- bfd_alloc (htab->elf.dynobj, amt)); ++ bfd_alloc (htab->dynobj, amt)); + if (p == NULL) + return FALSE; + p->next = *head; +@@ -1850,14 +1842,14 @@ static bfd_boolean + tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *h) + { +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + asection *s, *srel; + + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + + /* Make sure we know what is going on here. */ +- BFD_ASSERT (htab->elf.dynobj != NULL ++ BFD_ASSERT (htab->dynobj != NULL + && (h->needs_plt + || h->is_weakalias + || (h->def_dynamic +@@ -1947,13 +1939,13 @@ tilepro_elf_adjust_dynamic_symbol (struc + .rel.bss section we are going to use. */ + if ((h->root.u.def.section->flags & SEC_READONLY) != 0) + { +- s = htab->elf.sdynrelro; +- srel = htab->elf.sreldynrelro; ++ s = htab->sdynrelro; ++ srel = htab->sreldynrelro; + } + else + { +- s = htab->elf.sdynbss; +- srel = htab->elf.srelbss; ++ s = htab->sdynbss; ++ srel = htab->srelbss; + } + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) + { +@@ -1971,7 +1963,7 @@ static bfd_boolean + allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + { + struct bfd_link_info *info; +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + struct elf_dyn_relocs *p; + + if (h->root.type == bfd_link_hash_indirect) +@@ -1981,7 +1973,7 @@ allocate_dynrelocs (struct elf_link_hash + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + +- if (htab->elf.dynamic_sections_created ++ if (htab->dynamic_sections_created + && h->plt.refcount > 0) + { + /* Make sure this symbol is output as a dynamic symbol. +@@ -1995,7 +1987,7 @@ allocate_dynrelocs (struct elf_link_hash + + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) + { +- asection *s = htab->elf.splt; ++ asection *s = htab->splt; + + /* Allocate room for the header. */ + if (s->size == 0) +@@ -2021,10 +2013,10 @@ allocate_dynrelocs (struct elf_link_hash + s->size += PLT_ENTRY_SIZE; + + /* We also need to make an entry in the .got.plt section. */ +- htab->elf.sgotplt->size += GOT_ENTRY_SIZE; ++ htab->sgotplt->size += GOT_ENTRY_SIZE; + + /* We also need to make an entry in the .rela.plt section. */ +- htab->elf.srelplt->size += TILEPRO_ELF_RELA_BYTES; ++ htab->srelplt->size += TILEPRO_ELF_RELA_BYTES; + } + else + { +@@ -2060,22 +2052,22 @@ allocate_dynrelocs (struct elf_link_hash + return FALSE; + } + +- s = htab->elf.sgot; ++ s = htab->sgot; + h->got.offset = s->size; + s->size += TILEPRO_BYTES_PER_WORD; + /* R_TILEPRO_IMM16_Xn_TLS_GD entries need 2 consecutive GOT slots. */ + if (tls_type == GOT_TLS_GD) + s->size += TILEPRO_BYTES_PER_WORD; +- dyn = htab->elf.dynamic_sections_created; ++ dyn = htab->dynamic_sections_created; + /* R_TILEPRO_IMM16_Xn_TLS_IE_xxx needs one dynamic relocation, + R_TILEPRO_IMM16_Xn_TLS_GD_xxx needs two if local symbol and two if + global. */ + if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE) +- htab->elf.srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES; ++ htab->srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES; + else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, + bfd_link_pic (info), + h)) +- htab->elf.srelgot->size += TILEPRO_ELF_RELA_BYTES; ++ htab->srelgot->size += TILEPRO_ELF_RELA_BYTES; + } + else + h->got.offset = (bfd_vma) -1; +@@ -2134,7 +2126,7 @@ allocate_dynrelocs (struct elf_link_hash + if (!h->non_got_ref + && ((h->def_dynamic + && !h->def_regular) +- || (htab->elf.dynamic_sections_created ++ || (htab->dynamic_sections_created + && (h->root.type == bfd_link_hash_undefweak + || h->root.type == bfd_link_hash_undefined)))) + { +@@ -2195,14 +2187,14 @@ tilepro_elf_size_dynamic_sections (bfd * + { + (void)output_bfd; + +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + bfd *dynobj; + asection *s; + bfd *ibfd; + + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); +- dynobj = htab->elf.dynobj; ++ dynobj = htab->dynobj; + BFD_ASSERT (dynobj != NULL); + + if (elf_hash_table (info)->dynamic_sections_created) +@@ -2268,8 +2260,8 @@ tilepro_elf_size_dynamic_sections (bfd * + locsymcount = symtab_hdr->sh_info; + end_local_got = local_got + locsymcount; + local_tls_type = _bfd_tilepro_elf_local_got_tls_type (ibfd); +- s = htab->elf.sgot; +- srel = htab->elf.srelgot; ++ s = htab->sgot; ++ srel = htab->srelgot; + for (; local_got < end_local_got; ++local_got, ++local_tls_type) + { + if (*local_got > 0) +@@ -2290,19 +2282,19 @@ tilepro_elf_size_dynamic_sections (bfd * + + /* Allocate global sym .plt and .got entries, and space for global + sym dynamic relocs. */ +- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info); ++ elf_link_hash_traverse (htab, allocate_dynrelocs, info); + + if (elf_hash_table (info)->dynamic_sections_created) + { + /* If the .got section is more than 0x8000 bytes, we add + 0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16 + bit relocations have a greater chance of working. */ +- if (htab->elf.sgot->size >= 0x8000 ++ if (htab->sgot->size >= 0x8000 + && elf_hash_table (info)->hgot->root.u.def.value == 0) + elf_hash_table (info)->hgot->root.u.def.value = 0x8000; + } + +- if (htab->elf.sgotplt) ++ if (htab->sgotplt) + { + struct elf_link_hash_entry *got; + got = elf_link_hash_lookup (elf_hash_table (info), +@@ -2313,14 +2305,14 @@ tilepro_elf_size_dynamic_sections (bfd * + entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ + if ((got == NULL + || !got->ref_regular_nonweak) +- && (htab->elf.sgotplt->size ++ && (htab->sgotplt->size + == GOTPLT_HEADER_SIZE) +- && (htab->elf.splt == NULL +- || htab->elf.splt->size == 0) +- && (htab->elf.sgot == NULL +- || (htab->elf.sgot->size ++ && (htab->splt == NULL ++ || htab->splt->size == 0) ++ && (htab->sgot == NULL ++ || (htab->sgot->size + == get_elf_backend_data (output_bfd)->got_header_size))) +- htab->elf.sgotplt->size = 0; ++ htab->sgotplt->size = 0; + } + + /* The check_relocs and adjust_dynamic_symbol entry points have +@@ -2331,11 +2323,11 @@ tilepro_elf_size_dynamic_sections (bfd * + if ((s->flags & SEC_LINKER_CREATED) == 0) + continue; + +- if (s == htab->elf.splt +- || s == htab->elf.sgot +- || s == htab->elf.sgotplt +- || s == htab->elf.sdynbss +- || s == htab->elf.sdynrelro) ++ if (s == htab->splt ++ || s == htab->sgot ++ || s == htab->sgotplt ++ || s == htab->sdynbss ++ || s == htab->sdynrelro) + { + /* Strip this section if we don't need it; see the + comment below. */ +@@ -2527,7 +2519,7 @@ tilepro_elf_relocate_section (bfd *outpu + Elf_Internal_Sym *local_syms, + asection **local_sections) + { +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + bfd_vma *local_got_offsets; +@@ -2758,7 +2750,7 @@ tilepro_elf_relocate_section (bfd *outpu + case R_TILEPRO_IMM16_X1_GOT_HA: + /* Relocation is to the entry for this symbol in the global + offset table. */ +- if (htab->elf.sgot == NULL) ++ if (htab->sgot == NULL) + abort (); + + if (h != NULL) +@@ -2792,7 +2784,7 @@ tilepro_elf_relocate_section (bfd *outpu + else + { + bfd_put_32 (output_bfd, relocation, +- htab->elf.sgot->contents + off); ++ htab->sgot->contents + off); + h->got.offset |= 1; + } + } +@@ -2820,11 +2812,11 @@ tilepro_elf_relocate_section (bfd *outpu + + /* We need to generate a R_TILEPRO_RELATIVE reloc + for the dynamic linker. */ +- s = htab->elf.srelgot; ++ s = htab->srelgot; + BFD_ASSERT (s != NULL); + +- outrel.r_offset = (htab->elf.sgot->output_section->vma +- + htab->elf.sgot->output_offset ++ outrel.r_offset = (htab->sgot->output_section->vma ++ + htab->sgot->output_offset + + off); + outrel.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE); + outrel.r_addend = relocation; +@@ -2833,7 +2825,7 @@ tilepro_elf_relocate_section (bfd *outpu + } + + bfd_put_32 (output_bfd, relocation, +- htab->elf.sgot->contents + off); ++ htab->sgot->contents + off); + local_got_offsets[r_symndx] |= 1; + } + } +@@ -2845,7 +2837,7 @@ tilepro_elf_relocate_section (bfd *outpu + procedure linkage table. */ + BFD_ASSERT (h != NULL); + +- if (h->plt.offset == (bfd_vma) -1 || htab->elf.splt == NULL) ++ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL) + { + /* We didn't make a PLT entry for this symbol. This + happens when statically linking PIC code, or when +@@ -2853,8 +2845,8 @@ tilepro_elf_relocate_section (bfd *outpu + break; + } + +- relocation = (htab->elf.splt->output_section->vma +- + htab->elf.splt->output_offset ++ relocation = (htab->splt->output_section->vma ++ + htab->splt->output_offset + + h->plt.offset); + unresolved_reloc = FALSE; + break; +@@ -2993,7 +2985,7 @@ tilepro_elf_relocate_section (bfd *outpu + outrel.r_addend = relocation + rel->r_addend; + + if (is_plt) +- sec = htab->elf.splt; ++ sec = htab->splt; + + if (bfd_is_abs_section (sec)) + indx = 0; +@@ -3016,7 +3008,7 @@ tilepro_elf_relocate_section (bfd *outpu + + if (indx == 0) + { +- osec = htab->elf.text_index_section; ++ osec = htab->text_index_section; + indx = elf_section_data (osec)->dynindx; + } + +@@ -3142,7 +3134,7 @@ tilepro_elf_relocate_section (bfd *outpu + local_got_offsets[r_symndx] |= 1; + } + +- if (htab->elf.sgot == NULL) ++ if (htab->sgot == NULL) + abort (); + + if ((off & 1) != 0) +@@ -3153,13 +3145,13 @@ tilepro_elf_relocate_section (bfd *outpu + int indx = 0; + bfd_boolean need_relocs = FALSE; + +- if (htab->elf.srelgot == NULL) ++ if (htab->srelgot == NULL) + abort (); + + if (h != NULL) + { + bfd_boolean dyn; +- dyn = htab->elf.dynamic_sections_created; ++ dyn = htab->dynamic_sections_created; + + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, + bfd_link_pic (info), +@@ -3190,18 +3182,18 @@ tilepro_elf_relocate_section (bfd *outpu + case R_TILEPRO_IMM16_X0_TLS_IE_HA: + case R_TILEPRO_IMM16_X1_TLS_IE_HA: + if (need_relocs) { +- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off); +- outrel.r_offset = (htab->elf.sgot->output_section->vma +- + htab->elf.sgot->output_offset + off); ++ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off); ++ outrel.r_offset = (htab->sgot->output_section->vma ++ + htab->sgot->output_offset + off); + outrel.r_addend = 0; + if (indx == 0) + outrel.r_addend = relocation - dtpoff_base (info); + outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_TPOFF32); +- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot, ++ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot, + &outrel); + } else { + bfd_put_32 (output_bfd, tpoff (info, relocation), +- htab->elf.sgot->contents + off); ++ htab->sgot->contents + off); + } + break; + +@@ -3214,31 +3206,31 @@ tilepro_elf_relocate_section (bfd *outpu + case R_TILEPRO_IMM16_X0_TLS_GD_HA: + case R_TILEPRO_IMM16_X1_TLS_GD_HA: + if (need_relocs) { +- outrel.r_offset = (htab->elf.sgot->output_section->vma +- + htab->elf.sgot->output_offset + off); ++ outrel.r_offset = (htab->sgot->output_section->vma ++ + htab->sgot->output_offset + off); + outrel.r_addend = 0; + outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_DTPMOD32); +- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off); +- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot, ++ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off); ++ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot, + &outrel); + if (indx == 0) + { + BFD_ASSERT (! unresolved_reloc); + bfd_put_32 (output_bfd, + relocation - dtpoff_base (info), +- (htab->elf.sgot->contents + off + ++ (htab->sgot->contents + off + + TILEPRO_BYTES_PER_WORD)); + } + else + { + bfd_put_32 (output_bfd, 0, +- (htab->elf.sgot->contents + off + ++ (htab->sgot->contents + off + + TILEPRO_BYTES_PER_WORD)); + outrel.r_info = ELF32_R_INFO (indx, + R_TILEPRO_TLS_DTPOFF32); + outrel.r_offset += TILEPRO_BYTES_PER_WORD; + tilepro_elf_append_rela_32 (output_bfd, +- htab->elf.srelgot, &outrel); ++ htab->srelgot, &outrel); + } + } + +@@ -3249,9 +3241,9 @@ tilepro_elf_relocate_section (bfd *outpu + symbol binding locally. Mark it as belonging + to module 1, the executable. */ + bfd_put_32 (output_bfd, 1, +- htab->elf.sgot->contents + off ); ++ htab->sgot->contents + off ); + bfd_put_32 (output_bfd, relocation - dtpoff_base (info), +- htab->elf.sgot->contents + off + ++ htab->sgot->contents + off + + TILEPRO_BYTES_PER_WORD); + } + break; +@@ -3411,7 +3403,7 @@ tilepro_elf_finish_dynamic_symbol (bfd * + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) + { +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); +@@ -3431,9 +3423,9 @@ tilepro_elf_finish_dynamic_symbol (bfd * + + BFD_ASSERT (h->dynindx != -1); + +- splt = htab->elf.splt; +- srela = htab->elf.srelplt; +- sgotplt = htab->elf.sgotplt; ++ splt = htab->splt; ++ srela = htab->srelplt; ++ sgotplt = htab->sgotplt; + + if (splt == NULL || srela == NULL) + abort (); +@@ -3481,8 +3473,8 @@ tilepro_elf_finish_dynamic_symbol (bfd * + + /* This symbol has an entry in the GOT. Set it up. */ + +- sgot = htab->elf.sgot; +- srela = htab->elf.srelgot; ++ sgot = htab->sgot; ++ srela = htab->srelgot; + BFD_ASSERT (sgot != NULL && srela != NULL); + + rela.r_offset = (sgot->output_section->vma +@@ -3528,16 +3520,16 @@ tilepro_elf_finish_dynamic_symbol (bfd * + + h->root.u.def.section->output_offset); + rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_COPY); + rela.r_addend = 0; +- if (h->root.u.def.section == htab->elf.sdynrelro) +- s = htab->elf.sreldynrelro; ++ if (h->root.u.def.section == htab->sdynrelro) ++ s = htab->sreldynrelro; + else +- s = htab->elf.srelbss; ++ s = htab->srelbss; + tilepro_elf_append_rela_32 (output_bfd, s, &rela); + } + + /* Mark some specially defined symbols as absolute. */ +- if (h == htab->elf.hdynamic +- || (h == htab->elf.hgot || h == htab->elf.hplt)) ++ if (h == htab->hdynamic ++ || (h == htab->hgot || h == htab->hplt)) + sym->st_shndx = SHN_ABS; + + return TRUE; +@@ -3551,7 +3543,7 @@ tilepro_finish_dyn (bfd *output_bfd, str + asection *splt ATTRIBUTE_UNUSED) + { + Elf32_External_Dyn *dyncon, *dynconend; +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); +@@ -3567,15 +3559,15 @@ tilepro_finish_dyn (bfd *output_bfd, str + switch (dyn.d_tag) + { + case DT_PLTGOT: +- s = htab->elf.sgotplt; ++ s = htab->sgotplt; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; + break; + case DT_JMPREL: +- s = htab->elf.srelplt; ++ s = htab->srelplt; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; + break; + case DT_PLTRELSZ: +- s = htab->elf.srelplt; ++ s = htab->srelplt; + dyn.d_un.d_val = s->size; + break; + default: +@@ -3593,11 +3585,11 @@ tilepro_elf_finish_dynamic_sections (bfd + { + bfd *dynobj; + asection *sdyn; +- struct tilepro_elf_link_hash_table *htab; ++ struct elf_link_hash_table *htab; + + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); +- dynobj = htab->elf.dynobj; ++ dynobj = htab->dynobj; + + sdyn = bfd_get_linker_section (dynobj, ".dynamic"); + +@@ -3606,7 +3598,7 @@ tilepro_elf_finish_dynamic_sections (bfd + asection *splt; + bfd_boolean ret; + +- splt = htab->elf.splt; ++ splt = htab->splt; + BFD_ASSERT (splt != NULL && sdyn != NULL); + + ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt); +@@ -3627,42 +3619,42 @@ tilepro_elf_finish_dynamic_sections (bfd + = PLT_ENTRY_SIZE; + } + +- if (htab->elf.sgotplt) ++ if (htab->sgotplt) + { +- if (bfd_is_abs_section (htab->elf.sgotplt->output_section)) ++ if (bfd_is_abs_section (htab->sgotplt->output_section)) + { + _bfd_error_handler +- (_("discarded output section: `%pA'"), htab->elf.sgotplt); ++ (_("discarded output section: `%pA'"), htab->sgotplt); + return FALSE; + } + +- if (htab->elf.sgotplt->size > 0) ++ if (htab->sgotplt->size > 0) + { + /* Write the first two entries in .got.plt, needed for the dynamic + linker. */ + bfd_put_32 (output_bfd, (bfd_vma) -1, +- htab->elf.sgotplt->contents); ++ htab->sgotplt->contents); + bfd_put_32 (output_bfd, (bfd_vma) 0, +- htab->elf.sgotplt->contents + GOT_ENTRY_SIZE); ++ htab->sgotplt->contents + GOT_ENTRY_SIZE); + } + +- elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize ++ elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize + = GOT_ENTRY_SIZE; + } + +- if (htab->elf.sgot) ++ if (htab->sgot) + { +- if (htab->elf.sgot->size > 0) ++ if (htab->sgot->size > 0) + { + /* Set the first entry in the global offset table to the address of + the dynamic section. */ + bfd_vma val = (sdyn ? + sdyn->output_section->vma + sdyn->output_offset : + 0); +- bfd_put_32 (output_bfd, val, htab->elf.sgot->contents); ++ bfd_put_32 (output_bfd, val, htab->sgot->contents); + } + +- elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize ++ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize + = GOT_ENTRY_SIZE; + } + +diff -rup binutils.orig/bfd/elf64-ppc.c binutils-2.35/bfd/elf64-ppc.c +--- binutils.orig/bfd/elf64-ppc.c 2020-07-30 15:04:05.363466721 +0100 ++++ binutils-2.35/bfd/elf64-ppc.c 2020-07-30 15:04:16.716393902 +0100 +@@ -3250,9 +3250,6 @@ struct ppc_link_hash_table + + /* Incremented every time we size stubs. */ + unsigned int stub_iteration; +- +- /* Small local sym cache. */ +- struct sym_cache sym_cache; + }; + + /* Rename some of the generic section flags to better document how they +@@ -4383,7 +4380,8 @@ ppc64_elf_before_check_relocs (bfd *ibfd + Elf_Internal_Sym *isym; + asection *s; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, r_symndx); ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, ++ r_symndx); + if (isym == NULL) + { + if (elf_section_data (opd)->relocs != relocs) +@@ -4684,7 +4682,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc + } + else + { +- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -4955,7 +4953,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc + { + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -5231,7 +5229,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.35/bfd/elf64-s390.c +--- binutils.orig/bfd/elf64-s390.c 2020-07-30 15:04:05.369466683 +0100 ++++ binutils-2.35/bfd/elf64-s390.c 2020-07-30 15:04:16.716393902 +0100 +@@ -663,9 +663,6 @@ struct elf_s390_link_hash_table + bfd_vma offset; + } tls_ldm_got; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Options passed from the linker. */ + struct s390_elf_params *params; + }; +@@ -852,7 +849,7 @@ elf_s390_check_relocs (bfd *abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -1216,7 +1213,7 @@ elf_s390_check_relocs (bfd *abfd, + asection *s; + void *vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -2258,7 +2255,7 @@ elf_s390_relocate_section (bfd *output_b + & 0xff00f000) == 0xe300c000 + && bfd_get_8 (input_bfd, + contents + rel->r_offset + 3) == 0x04)) +- && (isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ && (isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + input_bfd, r_symndx)) + && isym->st_shndx != SHN_ABS + && h != htab->elf.hdynamic +@@ -3572,7 +3569,7 @@ elf_s390_finish_dynamic_sections (bfd *o + if (local_plt[i].plt.offset != (bfd_vma) -1) + { + asection *sec = local_plt[i].sec; +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i); ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); + if (isym == NULL) + return FALSE; + +diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.35/bfd/elf64-x86-64.c +--- binutils.orig/bfd/elf64-x86-64.c 2020-07-30 15:04:05.365466709 +0100 ++++ binutils-2.35/bfd/elf64-x86-64.c 2020-07-30 15:04:16.717393895 +0100 +@@ -1371,7 +1371,7 @@ elf_x86_64_tls_transition (struct bfd_li + { + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); + } +@@ -1559,7 +1559,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd + if (h == NULL) + { + Elf_Internal_Sym *isym +- = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); ++ = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); + + /* Skip relocation against undefined symbols. */ + if (isym->st_shndx == SHN_UNDEF) +@@ -1907,7 +1907,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + goto error_return; +@@ -2308,7 +2308,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru + asection *s; + void **vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + goto error_return; +diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c +--- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 15:04:05.371466670 +0100 ++++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 15:04:16.717393895 +0100 +@@ -2643,9 +2643,6 @@ struct elf_aarch64_link_hash_table + /* The bytes of the subsequent PLT entry. */ + const bfd_byte *plt_entry; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* For convenience in allocate_dynrelocs. */ + bfd *obfd; + +@@ -7611,7 +7608,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +@@ -7838,7 +7835,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s + asection *s; + void **vpp; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +Only in binutils-2.35/bfd: elfnn-aarch64.c.orig +diff -rup binutils.orig/bfd/elfnn-riscv.c binutils-2.35/bfd/elfnn-riscv.c +--- binutils.orig/bfd/elfnn-riscv.c 2020-07-30 15:04:05.365466709 +0100 ++++ binutils-2.35/bfd/elfnn-riscv.c 2020-07-30 15:04:16.718393889 +0100 +@@ -113,9 +113,6 @@ struct riscv_elf_link_hash_table + /* Short-cuts to get to dynamic linker sections. */ + asection *sdyntdata; + +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_cache; +- + /* The max alignment of output sections. */ + bfd_vma max_alignment; + }; +@@ -681,7 +678,7 @@ riscv_elf_check_relocs (bfd *abfd, struc + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elfxx-mips.c binutils-2.35/bfd/elfxx-mips.c +--- binutils.orig/bfd/elfxx-mips.c 2020-07-30 15:04:05.376466638 +0100 ++++ binutils-2.35/bfd/elfxx-mips.c 2020-07-30 15:04:16.719393882 +0100 +@@ -527,9 +527,6 @@ struct mips_elf_link_hash_table + returns null. */ + asection *(*add_stub_section) (const char *, asection *, asection *); + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Is the PLT header compressed? */ + unsigned int plt_header_is_comp : 1; + }; +@@ -4401,7 +4398,7 @@ mips_elf_resolve_got_page_ref (void **re + Elf_Internal_Sym *isym; + + /* Read in the symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ref->u.abfd, ++ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ref->u.abfd, + ref->symndx); + if (isym == NULL) + { +diff -rup binutils.orig/bfd/elfxx-sparc.c binutils-2.35/bfd/elfxx-sparc.c +--- binutils.orig/bfd/elfxx-sparc.c 2020-07-30 15:04:05.360466741 +0100 ++++ binutils-2.35/bfd/elfxx-sparc.c 2020-07-30 15:04:16.719393882 +0100 +@@ -1391,7 +1391,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, + if (r_symndx < symtab_hdr->sh_info) + { + /* A local symbol. */ +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, ++ r_symndx); + if (isym == NULL) + return FALSE; + +diff -rup binutils.orig/bfd/elfxx-sparc.h binutils-2.35/bfd/elfxx-sparc.h +--- binutils.orig/bfd/elfxx-sparc.h 2020-07-30 15:04:05.367466696 +0100 ++++ binutils-2.35/bfd/elfxx-sparc.h 2020-07-30 15:04:16.719393882 +0100 +@@ -55,9 +55,6 @@ struct _bfd_sparc_elf_link_hash_table + bfd_vma offset; + } tls_ldm_got; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* Used by local STT_GNU_IFUNC symbols. */ + htab_t loc_hash_table; + void *loc_hash_memory; +diff -rup binutils.orig/bfd/elfxx-tilegx.c binutils-2.35/bfd/elfxx-tilegx.c +--- binutils.orig/bfd/elfxx-tilegx.c 2020-07-30 15:04:05.362466728 +0100 ++++ binutils-2.35/bfd/elfxx-tilegx.c 2020-07-30 15:04:16.719393882 +0100 +@@ -835,9 +835,6 @@ struct tilegx_elf_link_hash_table + /* Whether LE transition has been disabled for some of the + sections. */ + bfd_boolean disable_le_transition; +- +- /* Small local sym to section mapping cache. */ +- struct sym_cache sym_cache; + }; + + +@@ -1979,7 +1976,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru + void *vpp; + Elf_Internal_Sym *isym; + +- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ++ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; +diff -rup binutils.orig/bfd/elfxx-x86.h binutils-2.35/bfd/elfxx-x86.h +--- binutils.orig/bfd/elfxx-x86.h 2020-07-30 15:04:05.378466625 +0100 ++++ binutils-2.35/bfd/elfxx-x86.h 2020-07-30 15:04:16.720393876 +0100 +@@ -468,9 +468,6 @@ struct elf_x86_link_hash_table + /* The amount of space used by the jump slots in the GOT. */ + bfd_vma sgotplt_jump_table_size; + +- /* Small local sym cache. */ +- struct sym_cache sym_cache; +- + /* _TLS_MODULE_BASE_ symbol. */ + struct bfd_link_hash_entry *tls_module_base; + diff --git a/SOURCES/binutils-attach-to-group.patch b/SOURCES/binutils-attach-to-group.patch index 7bb5348..f33f861 100644 --- a/SOURCES/binutils-attach-to-group.patch +++ b/SOURCES/binutils-attach-to-group.patch @@ -41,18 +41,17 @@ diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c void obj_elf_section (int push) { -diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo ---- binutils.orig/gas/doc/as.texi 2018-09-24 17:50:06.984172788 +0100 -+++ binutils-2.30/gas/doc/as.texi 2018-09-25 15:19:43.557748972 +0100 -@@ -4407,6 +4407,7 @@ Some machine configurations provide addi +--- binutils.orig/gas/doc/as.texi 2020-07-24 15:12:46.452951381 +0100 ++++ binutils-2.35/gas/doc/as.texi 2020-07-24 15:15:41.742825163 +0100 +@@ -4373,6 +4373,7 @@ Some machine configurations provide addi * Altmacro:: @code{.altmacro} * Ascii:: @code{.ascii "@var{string}"}@dots{} * Asciz:: @code{.asciz "@var{string}"}@dots{} +* Attach_to_group:: @code{.attach_to_group @var{name}} - * Balign:: @code{.balign @var{abs-expr} , @var{abs-expr}} + * Balign:: @code{.balign [@var{abs-expr}[, @var{abs-expr}]]} * Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc * Byte:: @code{.byte @var{expressions}} -@@ -4703,6 +4704,12 @@ trailing zero byte) into consecutive add +@@ -4670,6 +4671,12 @@ trailing zero byte) into consecutive add @code{.asciz} is just like @code{.ascii}, but each string is followed by a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''. @@ -63,6 +62,5 @@ diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo +has been created. + @node Balign - @section @code{.balign[wl] @var{abs-expr}, @var{abs-expr}, @var{abs-expr}} + @section @code{.balign[wl] [@var{abs-expr}[, @var{abs-expr}[, @var{abs-expr}]]]} - diff --git a/SOURCES/binutils-config.patch b/SOURCES/binutils-config.patch new file mode 100644 index 0000000..8456584 --- /dev/null +++ b/SOURCES/binutils-config.patch @@ -0,0 +1,44 @@ +diff -Nrup a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 +--- a/libiberty/aclocal.m4 2019-01-19 09:01:34.000000000 -0700 ++++ b/libiberty/aclocal.m4 2020-01-09 22:00:27.183312982 -0700 +@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then + fi + + AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +-[AC_TRY_RUN([find_stack_direction () ++[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction () + { + static char *addr = 0; + auto char dummy; +diff --git a/config/intdiv0.m4 b/config/intdiv0.m4 +index 55dddcf1..ba906efc 100644 +--- a/config/intdiv0.m4 ++++ b/config/intdiv0.m4 +@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig; + exit (sig != SIGFPE); + } + +-int x = 1; +-int y = 0; +-int z; +-int nan; ++volatile int x = 1; ++volatile int y = 0; ++volatile int z; ++volatile int nan; + + int main () + { +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index f1ce7601..fc20d228 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then + for v in $vars; do + AC_MSG_CHECKING([for $v]) + AC_CACHE_VAL(libiberty_cv_var_$v, +- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])], + [eval "libiberty_cv_var_$v=yes"], + [eval "libiberty_cv_var_$v=no"])]) + if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then diff --git a/SOURCES/binutils-disassembling-efi-files.patch b/SOURCES/binutils-disassembling-efi-files.patch deleted file mode 100644 index 75d4275..0000000 --- a/SOURCES/binutils-disassembling-efi-files.patch +++ /dev/null @@ -1,39 +0,0 @@ -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 diff --git a/SOURCES/binutils-elf-add-objects.patch b/SOURCES/binutils-elf-add-objects.patch new file mode 100644 index 0000000..fbe73bb --- /dev/null +++ b/SOURCES/binutils-elf-add-objects.patch @@ -0,0 +1,36 @@ +--- binutils.orig/bfd/elflink.c 2020-07-31 10:45:48.747912761 +0100 ++++ binutils-2.35/bfd/elflink.c 2020-07-31 10:47:26.336262770 +0100 +@@ -505,6 +505,16 @@ bfd_elf_link_record_dynamic_symbol (stru + const char *name; + size_t indx; + ++ if (h->root.type == bfd_link_hash_defined ++ || h->root.type == bfd_link_hash_defweak) ++ { ++ /* An IR symbol should not be made dynamic. */ ++ if (h->root.u.def.section != NULL ++ && h->root.u.def.section->owner != NULL ++ && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0) ++ return TRUE; ++ } ++ + /* XXX: The ABI draft says the linker must turn hidden and + internal symbols into STB_LOCAL symbols when producing the + DSO. However, if ld.so honors st_other in the dynamic table, +@@ -5199,15 +5209,11 @@ elf_link_add_object_symbols (bfd *abfd, + break; + } + +- /* Don't add DT_NEEDED for references from the dummy bfd nor +- for unmatched symbol. */ + if (!add_needed + && matched + && definition + && ((dynsym +- && h->ref_regular_nonweak +- && (old_bfd == NULL +- || (old_bfd->flags & BFD_PLUGIN) == 0)) ++ && h->ref_regular_nonweak) + || (h->ref_dynamic_nonweak + && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0 + && !on_needed_list (elf_dt_name (abfd), diff --git a/SOURCES/binutils-fix-ld-failures.patch b/SOURCES/binutils-fix-ld-failures.patch new file mode 100644 index 0000000..cc72d50 --- /dev/null +++ b/SOURCES/binutils-fix-ld-failures.patch @@ -0,0 +1,269 @@ +diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.35/ld/testsuite/ld-plugin/lto.exp +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-07-28 08:49:07.129503894 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/lto.exp 2020-07-28 08:54:50.102224314 +0100 +@@ -31,8 +31,6 @@ if { ![check_plugin_api_available] + + set saved_CFLAGS "$CFLAGS" + set saved_CXXFLAGS "$CXXFLAGS" +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS + + proc restore_notify { } { + global saved_CFLAGS +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.35/ld/testsuite/ld-plugin/plugin-10.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2020-07-28 08:49:07.128503898 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-10.d 2020-07-28 10:07:50.675963507 +0100 +@@ -32,8 +32,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.35/ld/testsuite/ld-plugin/plugin-11.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2020-07-28 08:49:07.128503898 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-11.d 2020-07-28 10:08:07.540898427 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.35/ld/testsuite/ld-plugin/plugin-16.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2020-07-28 08:49:07.133503879 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-16.d 2020-07-28 10:07:10.525118454 +0100 +@@ -30,8 +30,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.35/ld/testsuite/ld-plugin/plugin-17.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2020-07-28 08:49:07.129503894 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-17.d 2020-07-28 10:07:28.119050562 +0100 +@@ -31,8 +31,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.35/ld/testsuite/ld-plugin/plugin-18.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2020-07-28 08:49:07.132503883 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-18.d 2020-07-28 10:08:56.503709477 +0100 +@@ -32,8 +32,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.35/ld/testsuite/ld-plugin/plugin-19.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2020-07-28 08:49:07.128503898 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-19.d 2020-07-28 10:08:24.053834702 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.35/ld/testsuite/ld-plugin/plugin-8.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2020-07-28 08:49:07.131503887 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-8.d 2020-07-28 10:06:08.440358037 +0100 +@@ -30,8 +30,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.35/ld/testsuite/ld-plugin/plugin-9.d +--- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2020-07-28 08:49:07.133503879 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/plugin-9.d 2020-07-28 10:06:36.839248442 +0100 +@@ -31,8 +31,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.35/ld/testsuite/ld-plugin/pr20070.d +--- binutils.orig/ld/testsuite/ld-plugin/pr20070.d 2020-07-28 08:49:07.129503894 +0100 ++++ binutils-2.35/ld/testsuite/ld-plugin/pr20070.d 2020-07-28 09:39:31.619488398 +0100 +@@ -1,10 +1,10 @@ + hook called: all symbols read. + Input: pr20070b.c \(tmpdir/libpr20070.a\) +-Sym: 'def' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: 'weakdef' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: 'def' Resolution: LDPR_PREVAILING_DEF_.* ++Sym: 'weakdef' Resolution: LDPR_PREVAILING_DEF_.* + Sym: 'undef' Resolution: LDPR_UNDEF + Sym: 'weakundef' Resolution: LDPR_UNDEF +-Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: 'common' Resolution: LDPR_PREVAILING_DEF_.* + #... + hook called: cleanup. + #... +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-1a.r binutils-2.35/ld/testsuite/ld-x86-64/property-1a.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-1a.r 2020-07-28 08:49:07.203503617 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-1a.r 2020-07-28 10:09:29.622581671 +0100 +@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: no copy on protected ++#... + x86 ISA used: + x86 feature used: x86 + +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-2a.r binutils-2.35/ld/testsuite/ld-x86-64/property-2a.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-2a.r 2020-07-28 08:49:07.196503643 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-2a.r 2020-07-28 09:42:30.825802177 +0100 +@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 ++#... + x86 ISA used: + x86 feature used: x86 + +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-3.r binutils-2.35/ld/testsuite/ld-x86-64/property-3.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-3.r 2020-07-28 08:49:07.192503658 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-3.r 2020-07-28 09:43:59.247463593 +0100 +@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA needed: CMOV, SSE ++ x86 ISA needed: SSE, SSE2 + #pass +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-3a.r binutils-2.35/ld/testsuite/ld-x86-64/property-3a.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-3a.r 2020-07-28 08:49:07.197503639 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-3a.r 2020-07-28 09:44:34.145329965 +0100 +@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 ++#... + x86 ISA needed: CMOV, SSE + x86 ISA used: SSE, SSE3 + x86 feature used: x86 +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-4.r binutils-2.35/ld/testsuite/ld-x86-64/property-4.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-4.r 2020-07-28 08:49:07.192503658 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-4.r 2020-07-28 09:45:09.585194255 +0100 +@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA needed: CMOV, SSE, SSE3 ++ x86 ISA needed: .* + #pass +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-4a.r binutils-2.35/ld/testsuite/ld-x86-64/property-4a.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-4a.r 2020-07-28 08:49:07.195503647 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-4a.r 2020-07-28 11:48:01.518912704 +0100 +@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA needed: CMOV, SSE, SSE3 ++#... + x86 ISA used: CMOV, SSE, SSE3 + x86 feature used: x86 + #pass +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-5.r binutils-2.35/ld/testsuite/ld-x86-64/property-5.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-5.r 2020-07-28 08:49:07.196503643 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-5.r 2020-07-28 10:10:35.206328582 +0100 +@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x900000 +- x86 ISA needed: CMOV, SSE, SSE3 ++ x86 ISA needed: .* + #pass +diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-5a.r binutils-2.35/ld/testsuite/ld-x86-64/property-5a.r +--- binutils.orig/ld/testsuite/ld-x86-64/property-5a.r 2020-07-28 08:49:07.187503677 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/property-5a.r 2020-07-28 11:48:24.220790926 +0100 +@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.pro + [ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x900000 +- x86 ISA needed: CMOV, SSE, SSE3 ++#... + x86 ISA used: CMOV, SSE, SSE3 + x86 feature used: x86 + #pass +diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.35/ld/testsuite/ld-x86-64/x86-64.exp +--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2020-07-28 08:49:07.192503658 +0100 ++++ binutils-2.35/ld/testsuite/ld-x86-64/x86-64.exp 2020-07-28 10:17:29.571700687 +0100 +@@ -1399,24 +1399,6 @@ if { [isnative] && [check_compiler_avail + ] \ + ] + } else { +- run_cc_link_tests [list \ +- [list \ +- "Build pr22001-1b" \ +- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr22001-1c.c } \ +- {{error_output "pr22001-1b.err"}} \ +- "pr22001-1b" \ +- ] \ +- [list \ +- "Build pr21997-1b" \ +- "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,notext tmpdir/pr21997-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr21997-1c.c } \ +- {{error_output "pr21997-1b.err"}} \ +- "pr21997-1b" \ +- ] \ +- ] + } + + run_ld_link_exec_tests [list \ +@@ -2052,7 +2034,7 @@ if { [isnative] && [check_compiler_avail + } + } + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" ++ # undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" diff --git a/SOURCES/binutils-fix-testsuite-failures.patch b/SOURCES/binutils-fix-testsuite-failures.patch index 13bdc60..c2b19a5 100644 --- a/SOURCES/binutils-fix-testsuite-failures.patch +++ b/SOURCES/binutils-fix-testsuite-failures.patch @@ -8,16 +8,6 @@ diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld +#... hook called: cleanup. #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:33:21.976627309 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:47:04.060076132 +0000 -@@ -1,5 +1,5 @@ - #... --.*: symbol `func' definition: 0, visibility: 0, resolution: 2 -+.*: symbol `func' definition: 0, visibility: 0, resolution: . - .*: symbol `func1' definition: 0, visibility: 1, resolution: 3 - .*: symbol `func2' definition: 0, visibility: 2, resolution: 3 - .*: symbol `func3' definition: 0, visibility: 3, resolution: 3 diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d --- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000 +++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000 @@ -233,35 +223,6 @@ diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/test proc srec_off { l } { if [string match "S1*" $l] { return 8 -diff -rup binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp ---- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:33:22.030626874 +0000 -+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:57:34.295106041 +0000 -@@ -1275,25 +1275,6 @@ if { [isnative] && [which $CC] != 0 } { - "$NOPIE_CFLAGS" \ - ] \ - ] -- } else { -- run_cc_link_tests [list \ -- [list \ -- "Build pr22001-1b" \ -- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \ -- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ -- { pr22001-1c.c } \ -- {{error_output "pr22001-1b.err"}} \ -- "pr22001-1b" \ -- ] \ -- [list \ -- "Build pr21997-1b" \ -- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr21997-1.so" \ -- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ -- { pr21997-1c.c } \ -- {{error_output "pr21997-1b.err"}} \ -- "pr21997-1b" \ -- ] \ -- ] - } - - run_ld_link_exec_tests [list \ diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d --- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000 +++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000 @@ -289,20 +250,6 @@ diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld +#... hook called: cleanup. #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:10:58.912710532 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:13:18.464583848 +0000 -@@ -1,6 +1,6 @@ - #... --.*: symbol `func' definition: 0, visibility: 0, resolution: . --.*: symbol `func1' definition: 0, visibility: 1, resolution: 3 --.*: symbol `func2' definition: 0, visibility: 2, resolution: 3 --.*: symbol `func3' definition: 0, visibility: 3, resolution: 3 -+.*: symbol `_?func' definition: 0, visibility: 0, resolution: . -+.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3 -+.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3 -+.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3 - #pass diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d --- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000 +++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000 @@ -381,37 +328,3 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/tests set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o" set testobjfiles_notext "tmpdir/main.o tmpdir/func.o" set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o" ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 11:43:43.792519904 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 14:14:00.520049930 +0100 -@@ -1,6 +1,6 @@ - #... --.*: symbol `_?func' definition: 0, visibility: 0, resolution: . --.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3 --.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3 --.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3 -+.*: symbol `.*unc' definition: 0, visibility: 0, resolution: . -+.*: symbol `.*unc1' definition: 0, visibility: 1, resolution: 3 -+.*: symbol `.*unc2' definition: 0, visibility: 2, resolution: 3 -+.*: symbol `.*unc3' definition: 0, visibility: 3, resolution: 3 - #pass ---- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:22:47.019526080 +0000 -+++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:28:11.413354928 +0000 -@@ -33,8 +33,8 @@ global CFLAGS - global CXXFLAGS - set saved_CFLAGS "$CFLAGS" - set saved_CXXFLAGS "$CXXFLAGS" --regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS --regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS -+# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS -+# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS - - proc restore_notify { } { - global saved_CFLAGS ---- binutils.orig/ld/testsuite/ld-elf/pr22269-1.c 2018-05-31 16:14:12.648539694 +0100 -+++ binutils-2.30/ld/testsuite/ld-elf/pr22269-1.c 2018-06-01 10:55:24.284977908 +0100 -@@ -5,4 +5,5 @@ _start (void) - { - if (&foo) - return foo; -+ return 0; - } diff --git a/SOURCES/binutils-gas-build-note-relocs.patch b/SOURCES/binutils-gas-build-note-relocs.patch deleted file mode 100644 index 52a4c0b..0000000 --- a/SOURCES/binutils-gas-build-note-relocs.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- binutils.orig/gas/write.c 2019-07-01 16:23:28.133707500 +0100 -+++ binutils-2.32/gas/write.c 2019-07-01 16:24:50.699130611 +0100 -@@ -1891,7 +1891,8 @@ create_obj_attrs_section (void) - static void - create_note_reloc (segT sec, - symbolS * sym, -- bfd_size_type offset, -+ bfd_size_type note_offset, -+ bfd_size_type desc2_offset, - int reloc_type, - bfd_vma addend, - char * note) -@@ -1901,10 +1902,10 @@ create_note_reloc (segT sec, - reloc = XNEW (struct reloc_list); - - /* We create a .b type reloc as resolve_reloc_expr_symbols() has already been called. */ -- reloc->u.b.sec = sec; -- reloc->u.b.s = symbol_get_bfdsym (sym); -+ reloc->u.b.sec = sec; -+ reloc->u.b.s = symbol_get_bfdsym (sym); - reloc->u.b.r.sym_ptr_ptr = & reloc->u.b.s; -- reloc->u.b.r.address = offset; -+ reloc->u.b.r.address = note_offset + desc2_offset; - reloc->u.b.r.addend = addend; - reloc->u.b.r.howto = bfd_reloc_type_lookup (stdoutput, reloc_type); - -@@ -1929,12 +1930,12 @@ create_note_reloc (segT sec, - if (target_big_endian) - { - if (bfd_arch_bits_per_address (stdoutput) <= 32) -- note[offset + 3] = addend; -+ note[desc2_offset + 3] = addend; - else -- note[offset + 7] = addend; -+ note[desc2_offset + 7] = addend; - } - else -- note[offset] = addend; -+ note[desc2_offset] = addend; - } - } - -@@ -2037,10 +2038,10 @@ maybe_generate_build_notes (void) - memcpy (note + 12, "GA$3a1", 8); - - /* Create a relocation to install the start address of the note... */ -- create_note_reloc (sec, sym, total_size + 20, desc_reloc, 0, note); -+ create_note_reloc (sec, sym, total_size, 20, desc_reloc, 0, note); - - /* ...and another one to install the end address. */ -- create_note_reloc (sec, sym, total_size + desc2_offset, desc_reloc, -+ create_note_reloc (sec, sym, total_size, desc2_offset, desc_reloc, - bfd_get_section_size (bsym->section), - note); - diff --git a/SOURCES/binutils-gas-dwarf-level-4.patch b/SOURCES/binutils-gas-dwarf-level-4.patch new file mode 100644 index 0000000..acdaaf4 --- /dev/null +++ b/SOURCES/binutils-gas-dwarf-level-4.patch @@ -0,0 +1,11 @@ +--- binutils.orig/gas/as.c 2020-07-30 08:41:25.034236441 +0100 ++++ binutils-2.35/gas/as.c 2020-07-30 08:41:52.197058041 +0100 +@@ -103,7 +103,7 @@ int verbose = 0; + int flag_dwarf_cie_version = -1; + + /* The maximum level of DWARF DEBUG information we should manufacture. */ +-unsigned int dwarf_level = 0; ++unsigned int dwarf_level = 3; + + #if defined OBJ_ELF || defined OBJ_MAYBE_ELF + int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON; diff --git a/SOURCES/binutils-gcc-10-fixes.patch b/SOURCES/binutils-gcc-10-fixes.patch new file mode 100644 index 0000000..ba96bb7 --- /dev/null +++ b/SOURCES/binutils-gcc-10-fixes.patch @@ -0,0 +1,170 @@ +diff -rup binutils.orig/gold/gdb-index.cc binutils-2.34.0/gold/gdb-index.cc +--- binutils.orig/gold/gdb-index.cc 2020-07-24 09:12:29.241306445 +0100 ++++ binutils-2.34.0/gold/gdb-index.cc 2020-07-24 09:15:48.332095898 +0100 +@@ -817,7 +817,7 @@ Gdb_index_info_reader::get_qualified_nam + void + Gdb_index_info_reader::record_cu_ranges(Dwarf_die* die) + { +- unsigned int shndx; ++ unsigned int shndx = 0; + unsigned int shndx2; + + off_t ranges_offset = die->ref_attribute(elfcpp::DW_AT_ranges, &shndx); +diff -rup binutils.orig/gold/layout.cc binutils-2.34.0/gold/layout.cc +--- binutils.orig/gold/layout.cc 2020-07-24 09:12:29.243306433 +0100 ++++ binutils-2.34.0/gold/layout.cc 2020-07-24 09:15:11.464320064 +0100 +@@ -1986,7 +1986,7 @@ Layout::attach_allocated_section_to_segm + seg_flags |= os->extra_segment_flags(); + + // Check for --section-start. +- uint64_t addr; ++ uint64_t addr = 0; + bool is_address_set = parameters->options().section_start(os->name(), &addr); + + // In general the only thing we really care about for PT_LOAD +diff -rup binutils.orig/binutils/dlltool.c binutils-2.34.0/binutils/dlltool.c +--- binutils.orig/binutils/dlltool.c 2020-07-24 09:12:28.974308069 +0100 ++++ binutils-2.34.0/binutils/dlltool.c 2020-07-24 12:09:37.527121295 +0100 +@@ -1305,7 +1305,7 @@ run (const char *what, char *args) + int pid, wait_status; + int i; + const char **argv; +- char *errmsg_fmt, *errmsg_arg; ++ char *errmsg_fmt = "", *errmsg_arg = ""; + char *temp_base = choose_temp_base (); + + inform (_("run: %s %s"), what, args); +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 09:12:32.368287432 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:14:19.842360634 +0100 +@@ -28416,9 +28416,12 @@ md_apply_fix (fixS * fixP, + perform relaxation. */ + if (value == -2) + { +- newval = md_chars_to_number (buf, THUMB_SIZE); +- newval = 0xbf00; /* NOP encoding T1 */ +- md_number_to_chars (buf, newval, THUMB_SIZE); ++ if (fixP->fx_done || !seg->use_rela_p) ++ { ++ newval = md_chars_to_number (buf, THUMB_SIZE); ++ newval = 0xbf00; /* NOP encoding T1 */ ++ md_number_to_chars (buf, newval, THUMB_SIZE); ++ } + } + else + { +@@ -28631,17 +28634,14 @@ md_apply_fix (fixS * fixP, + case BFD_RELOC_ARM_GOTFUNCDESC: + case BFD_RELOC_ARM_GOTOFFFUNCDESC: + case BFD_RELOC_ARM_FUNCDESC: +- if (arm_fdpic) +- { +- if (fixP->fx_done || !seg->use_rela_p) +- md_number_to_chars (buf, 0, 4); +- } +- else ++ if (!arm_fdpic) + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Relocation supported only in FDPIC mode")); +- } +- break; ++ break; ++ } ++ value = 0; ++ /* Fall through. */ + #endif + + case BFD_RELOC_RVA: +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 12:16:02.099719884 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:34:17.690858328 +0100 +@@ -28641,7 +28641,7 @@ md_apply_fix (fixS * fixP, + break; + } + value = 0; +- /* Fall through. */ ++ goto fred; + #endif + + case BFD_RELOC_RVA: +@@ -28653,6 +28653,7 @@ md_apply_fix (fixS * fixP, + #ifdef TE_PE + case BFD_RELOC_32_SECREL: + #endif ++ fred: + if (fixP->fx_done || !seg->use_rela_p) + #ifdef TE_WINCE + /* For WinCE we only do this for pcrel fixups. */ +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 13:28:26.926553452 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 13:31:57.835215763 +0100 +@@ -28416,12 +28416,8 @@ md_apply_fix (fixS * fixP, + perform relaxation. */ + if (value == -2) + { +- if (fixP->fx_done || !seg->use_rela_p) +- { +- newval = md_chars_to_number (buf, THUMB_SIZE); +- newval = 0xbf00; /* NOP encoding T1 */ +- md_number_to_chars (buf, newval, THUMB_SIZE); +- } ++ newval = 0xbf00; /* NOP encoding T1 */ ++ goto jim; + } + else + { +@@ -28432,6 +28428,7 @@ md_apply_fix (fixS * fixP, + { + newval = md_chars_to_number (buf, THUMB_SIZE); + newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3); ++ jim: + md_number_to_chars (buf, newval, THUMB_SIZE); + } + } +diff -rup binutils.orig/binutils/mclex.c binutils-2.34.0/binutils/mclex.c +--- binutils.orig/binutils/mclex.c 2020-07-24 13:28:26.297557441 +0100 ++++ binutils-2.34.0/binutils/mclex.c 2020-07-24 14:46:53.587940149 +0100 +@@ -207,7 +207,7 @@ enum_severity (int e) + static void + mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv) + { +- unichar *usz, *usv = NULL; ++ unichar *usz = NULL, *usv = NULL; + rc_uint_type usz_len; + + unicode_from_codepage (&usz_len, &usz, sz, CP_ACP); +diff -rup binutils.orig/binutils/windmc.c binutils-2.34.0/binutils/windmc.c +--- binutils.orig/binutils/windmc.c 2020-07-24 13:28:26.279557556 +0100 ++++ binutils-2.34.0/binutils/windmc.c 2020-07-24 14:48:05.460477478 +0100 +@@ -338,7 +338,7 @@ mc_add_node_lang (mc_node *root, const m + static char * + convert_unicode_to_ACP (const unichar *usz) + { +- char *s; ++ char *s = NULL; + rc_uint_type l; + + if (! usz) +@@ -607,10 +607,10 @@ mc_generate_bin_item (mc_node_lang *n, r + else + { + rc_uint_type txt_len, l; +- char *cvt_txt; ++ char *cvt_txt = NULL; + + codepage_from_unicode( &l, n->message, &cvt_txt, n->lang->lang_info.wincp); +- if (! cvt_txt) ++ if (cvt_txt == NULL) + fatal ("Failed to convert message to language codepage.\n"); + txt_len = strlen (cvt_txt); + if (mcset_automatic_null_termination && txt_len > 0) +@@ -1107,7 +1107,7 @@ main (int argc, char **argv) + + /* Load the input file and do code page transformations to UTF16. */ + { +- unichar *u; ++ unichar *u = NULL; + rc_uint_type ul; + char *buff; + bfd_size_type flen; diff --git a/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch b/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch deleted file mode 100644 index b354fa4..0000000 --- a/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- binutils.orig/gold/target-reloc.h 2018-07-12 11:37:24.894494658 +0100 -+++ binutils-2.30.90/gold/target-reloc.h 2018-07-12 15:38:50.049083904 +0100 -@@ -136,6 +136,7 @@ class Default_comdat_behavior - if (Layout::is_debug_info_section(name)) - return CB_PRETEND; - if (strcmp(name, ".eh_frame") == 0 -+ || strncmp(name, ".gnu.build.attributes", 21) == 0 // FIXME: We should really be checking the section type for ST_NOTE... - || strcmp(name, ".gcc_except_table") == 0) - return CB_IGNORE; - return CB_ERROR; diff --git a/SOURCES/binutils-i686-ld-testsuite-fixes.patch b/SOURCES/binutils-i686-ld-testsuite-fixes.patch new file mode 100644 index 0000000..67216e8 --- /dev/null +++ b/SOURCES/binutils-i686-ld-testsuite-fixes.patch @@ -0,0 +1,29 @@ +diff -rup binutils.orig/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.35/ld/testsuite/ld-elfvsb/elfvsb.exp +--- binutils.orig/ld/testsuite/ld-elfvsb/elfvsb.exp 2020-07-28 13:07:26.277506755 +0100 ++++ binutils-2.35/ld/testsuite/ld-elfvsb/elfvsb.exp 2020-07-28 13:29:32.252877646 +0100 +@@ -264,6 +264,7 @@ proc visibility_run {visibility} { + remote_file host delete $tmpdir/sh1p.o $tmpdir/sh2p.o $tmpdir/sh1np.o $tmpdir/sh2np.o + + if { [istarget powerpc*-*-linux*] \ ++ || [istarget i686*-*-*] \ + || ( [istarget mips*-*-linux*] && [at_least_gcc_version 4 3] )} { + # Testing non-PIC libraries is a waste of effort on any target. + # If you don't pass -fpic or -fPIC to gcc, gcc will assume quite +@@ -345,6 +346,7 @@ proc visibility_run {visibility} { + || [ string match $visibility "protected_undef_def" ] + || [ string match $visibility "protected_weak" ] + || [ string match $visibility "normal" ] } { ++ setup_xfail "i686-*-*" + setup_xfail "powerpc-*-linux*" + setup_xfail "s390x-*-linux*" + if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } { +@@ -393,7 +395,8 @@ proc visibility_run {visibility} { + } + }} + +- if { [istarget powerpc*-*-linux*] } { ++ if { [istarget powerpc*-*-linux*] ++ || [istarget i686*-*-*] } { + # Don't bother. + } else { + # Now do the same tests again, but this time compile main.c PIC. diff --git a/SOURCES/binutils-ld-testsuite-fixes.patch b/SOURCES/binutils-ld-testsuite-fixes.patch deleted file mode 100644 index 23da0bd..0000000 --- a/SOURCES/binutils-ld-testsuite-fixes.patch +++ /dev/null @@ -1,413 +0,0 @@ ---- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:43:44.758513156 +0100 -+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:51:33.732236961 +0100 -@@ -1910,7 +1910,6 @@ if { [isnative] && [which $CC] != 0 } { - } - } - -- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "" - undefined_weak "-fPIE" "-pie" - undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 11:43:43.812519765 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 12:09:27.292669536 +0100 -@@ -283,6 +283,7 @@ if { !$can_compile || $failed_compile } - foreach testitem $plugin_tests { - $failure_kind [lindex $testitem 0] - } -+ return - if { [is_elf_format] } { - foreach testitem $plugin_extra_elf_tests { - $failure_kind [lindex $testitem 0] -@@ -293,13 +294,6 @@ if { !$can_compile || $failed_compile } - - run_ld_link_tests $plugin_tests - --if { [is_elf_format] \ -- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ -- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ -- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { -- run_ld_link_tests $plugin_extra_elf_tests --} -- - if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \ - ![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} { - foreach testitem $plugin_lib_tests { ---- binutils-2.32.orig/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 11:43:45.367508902 +0100 -+++ binutils-2.32/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 17:28:30.229619676 +0100 -@@ -118,4 +118,5 @@ proc strip_test {} { - pass "$test_name" - } - -+return - strip_test ---- binutils.orig/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 11:35:12.118434555 +0100 -+++ binutils-2.32/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 13:02:07.239703744 +0100 -@@ -324,6 +324,8 @@ proc visibility_run {visibility} { - setup_xfail "arm*-*-linux*" - } - -+ setup_xfail "i686-*-linux*" -+ - visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb - - # Test ELF shared library relocations with a non-zero load -@@ -365,6 +367,8 @@ proc visibility_run {visibility} { - setup_xfail "arm*-*-linux*" - } - -+ setup_xfail "i686-*-linux*" -+ - visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \ - mainnp.o sh1np.o sh2np.o elfvsb \ - "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" -@@ -436,6 +440,8 @@ proc visibility_run {visibility} { - setup_xfail "arm*-*-linux*" - } - -+ setup_xfail "i686-*-linux*" -+ - visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb - } - } else { ---- binutils.orig/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 11:35:12.199433977 +0100 -+++ binutils-2.32/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 13:03:42.280038461 +0100 -@@ -1,4 +1,4 @@ --#failif -+#pass - #... - [0-9a-f ]+R_386_JUMP_SLOT +0+ +bar - #... ---- binutils.orig/ld/testsuite/ld-i386/i386.exp 2019-06-06 11:35:12.195434005 +0100 -+++ binutils-2.32/ld/testsuite/ld-i386/i386.exp 2019-06-06 13:11:56.324580169 +0100 -@@ -1035,15 +1035,6 @@ if { [isnative] - "pr18900.out" \ - ] \ - [list \ -- "Run pr19031" \ -- "$NOPIE_LDFLAGS tmpdir/pr19031.so" \ -- "-Wa,-mx86-used-note=yes" \ -- { pr19031b.S pr19031c.c } \ -- "pr19031" \ -- "pr19031.out" \ -- "$NOPIE_CFLAGS" \ -- ] \ -- [list \ - "Run got1" \ - "$NOPIE_LDFLAGS tmpdir/got1d.so" \ - "-Wa,-mx86-used-note=yes" \ -@@ -1158,7 +1149,6 @@ if { [isnative] - ] \ - ] - -- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "-pie" - undefined_weak "-fPIE" "-z nodynamic-undefined-weak $NOPIE_LDFLAGS" ---- binutils.orig/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 11:35:12.194434012 +0100 -+++ binutils-2.32/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 13:13:09.380068780 +0100 -@@ -1,4 +1,4 @@ --#... -+#pass - Disassembly of section .plt.got: - - [a-f0-9]+ <[_a-z]+@plt>: ---- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 11:35:12.072434885 +0100 -+++ binutils-2.32/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 13:15:45.042979139 +0100 -@@ -148,6 +148,8 @@ set exec_output [prune_warnings $exec_ou - - regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output - -+setup_xfail "i686-*-linux*" -+ - if [string match "" $exec_output] then { - pass $test3 - } else { -@@ -188,6 +190,8 @@ set exec_output [prune_warnings $exec_ou - - regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output - -+setup_xfail "i686-*-linux*" -+ - if [string match "" $exec_output] then { - pass $test6 - } else { -@@ -200,6 +204,8 @@ set exec_output [prune_warnings $exec_ou - - regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output - -+setup_xfail "i686-*-linux*" -+ - if [string match "" $exec_output] then { - fail $test7 - } else { ---- binutils.orig/ld/testsuite/ld-shared/shared.exp 2019-06-06 11:35:12.143434377 +0100 -+++ binutils-2.32/ld/testsuite/ld-shared/shared.exp 2019-06-06 13:18:15.969417246 +0100 -@@ -242,6 +242,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $ - setup_xfail "arm*-*-linux*" - } - setup_xfail "aarch64*-*-linux*" -+ setup_xfail "i686-*-linux*" - shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared - - # Test ELF shared library relocations with a non-zero load -@@ -268,6 +269,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $ - setup_xfail "arm*-*-linux*" - } - setup_xfail "aarch64*-*-linux*" -+ setup_xfail "i686-*-linux*" - shared_test shnp "shared (non PIC, load offset)" \ - mainnp.o sh1np.o sh2np.o shared \ - "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" -@@ -321,6 +323,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $p - setup_xfail "arm*-*-linux*" - } - setup_xfail "aarch64*-*-linux*" -+ setup_xfail "i686-*-linux*" - shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared - } - } else { ---- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 11:35:12.093434734 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 13:50:43.381100668 +0100 -@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 11:35:12.095434720 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 13:52:09.264504779 +0100 -@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 11:35:12.094434727 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 13:52:57.012173488 +0100 -@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 11:35:12.092434742 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 13:53:27.107964671 +0100 -@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 11:35:12.095434720 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 13:54:12.946646622 +0100 -@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 11:35:12.095434720 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 13:54:52.018375537 +0100 -@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* - #... - hook called: cleanup. - #... ---- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 11:35:12.094434727 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 13:55:20.259179591 +0100 -@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. ---- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 11:35:12.091434749 +0100 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 13:56:02.082889405 +0100 -@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* - #... - hook called: cleanup. - #... ---- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 11:35:12.178434127 +0100 -+++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:09:25.695255087 +0100 -@@ -194,7 +194,9 @@ set run_tests { - {pr19553a.c} "pr19553d" "pr19553d.out"} - } - --run_ld_link_exec_tests $run_tests -+if { ![istarget s390*-*-linux*] } { -+ run_ld_link_exec_tests $run_tests -+} - - # Check that "bar" is not dynamic in the executable - proc check_dynamic_syms { test } { ---- binutils.orig/ld/testsuite/ld-elf/shared.exp 2019-06-06 11:35:12.181434105 +0100 -+++ binutils-2.32/ld/testsuite/ld-elf/shared.exp 2019-06-06 14:21:20.232084981 +0100 -@@ -1287,18 +1287,6 @@ if { [istarget *-*-linux*] - "pr22393-2-static" \ - "pass.out" \ - ] \ -- [list \ -- "Run pr21964-4" \ -- "" \ -- "" \ -- {pr21964-4.c} \ -- "pr21964-4" \ -- "pass.out" \ -- "" \ -- "" \ -- "" \ -- "-ldl" \ -- ] \ - ] - } - ---- binutils.orig/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 11:35:12.177434134 +0100 -+++ binutils-2.32/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 14:22:44.182500130 +0100 -@@ -1,5 +1,5 @@ - # tprel relocs are not needed in a PIE --#failif -+#pass - #... - .* R_.*_TP.* - #pass ---- binutils.orig/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 11:35:12.077434849 +0100 -+++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 14:24:35.941721548 +0100 -@@ -1,3 +1,3 @@ --#... -+#pass - +[0-9]+: +[0-9a-f]+ +[0-9]+ +IFUNC +GLOBAL +DEFAULT.* [0-9]+ +func - #pass ---- binutils.orig/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 11:35:12.076434856 +0100 -+++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 14:25:55.494165610 +0100 -@@ -1,4 +1,4 @@ --#failif -+#pass - #... - [0-9a-f]+ +[0-9a-f]+ +R_[^ ]+ +[0-9a-f]+ +func(| \+ 0) - #pass ---- binutils.orig/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:30:41.510166625 +0100 -+++ binutils-2.32/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:40:11.152185368 +0100 -@@ -5,6 +5,6 @@ - - #... - .* R_PPC64_IRELATIVE +10000180 --#... -+#pass - .*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic - #pass ---- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:30:41.576166163 +0100 -+++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 16:07:44.330408051 +0100 -@@ -215,6 +215,10 @@ proc check_dynamic_syms { test } { - return 1 - } - -+if { [istarget s390*-*-linux*] } { -+ return -+} -+ - foreach t [list indirect5a indirect5b indirect6a indirect6b] { - set testname [concat $t "dynsym"] - if { [check_dynamic_syms tmpdir/$t] } { ---- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 14:30:41.487166785 +0100 -+++ binutils-2.32/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 16:11:13.545947519 +0100 -@@ -300,15 +300,21 @@ if {! [check_osabi tmpdir/static_nonifun - # should not. - - if {[contains_ifunc_symbol tmpdir/libshared_ifunc.so] != 1} { -+ setup_xfail "ppc64*-*-linux-gnu" -+ setup_xfail "powerpc64*-*-linux-gnu" - fail "Shared libraries containing ifunc does not contain an IFUNC symbol" - set fails [expr $fails + 1] - } - if {[contains_ifunc_symbol tmpdir/local_prog] != 1} { -+ setup_xfail "ppc64*-*-linux-gnu" -+ setup_xfail "powerpc64*-*-linux-gnu" - fail "Local ifunc-using executable does not contain an IFUNC symbol" - set fails [expr $fails + 1] - } - if { ![string match "" $STATIC_LDFLAGS] \ - && [contains_ifunc_symbol tmpdir/static_prog] != 1} { -+ setup_xfail "ppc64*-*-linux-gnu" -+ setup_xfail "powerpc64*-*-linux-gnu" - fail "Static ifunc-using executable does not contain an IFUNC symbol" - set fails [expr $fails + 1] - } -@@ -587,6 +593,13 @@ run_cc_link_tests [list \ - {} \ - "libpr18841cn.so" \ - ] \ -+] -+ -+if { [isnative] -+ && !([istarget "powerpc*-*-*"] -+ || [istarget "aarch64*-*-*"] -+ || [istarget "sparc*-*-*"]) } { -+run_cc_link_tests [list \ - [list \ - "Build libpr23169a.so" \ - "-shared" \ -@@ -657,7 +670,8 @@ run_cc_link_tests [list \ - {readelf {-r -W} pr23169b.rd}} \ - "pr23169f" \ - ] \ --] -+ ] -+} - - run_ld_link_exec_tests [list \ - [list \ -@@ -719,7 +733,7 @@ run_ld_link_exec_tests [list \ - # That does not happen for the pr23169 testcase where the resolver is - # in the executable (which is relocated last by ld.so). - if { [isnative] -- && !([istarget "powerpc-*-*"] -+ && !([istarget "powerpc*-*-*"] - || [istarget "aarch64*-*-*"] - || [istarget "sparc*-*-*"]) } { - run_ld_link_exec_tests [list \ ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:00:46.555467871 +0100 -+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:06:19.179023902 +0100 -@@ -1956,7 +1956,9 @@ run_ld_link_tests [list \ - global LD_CLASS - if { "$LD_CLASS" == "64bit" } then { - # This test needs 64-bit linker. -- run_dump_test "pr17618" -+ # The test times out when runnig under OSCI's test harness, because -+ # it is so overloaded, so skip it for now. The test works normally. -+ # run_dump_test "pr17618" - } - run_dump_test "pltgot-1" - run_dump_test "pltgot-2" diff --git a/SOURCES/binutils-objcopy-version-note.patch b/SOURCES/binutils-objcopy-version-note.patch deleted file mode 100644 index b1f9e63..0000000 --- a/SOURCES/binutils-objcopy-version-note.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- binutils.orig/binutils/objcopy.c 2019-08-06 09:42:51.065854915 +0100 -+++ binutils-2.30/binutils/objcopy.c 2019-08-06 09:47:36.293974283 +0100 -@@ -2161,12 +2161,10 @@ merge_gnu_build_notes (bfd * abfd, asect - attribute_type_byte = version_1_seen ? 1 : 3; - val_start = attribute_type_byte + 1; - -- /* The first note should be the first version note. */ -- if (pnotes[0].note.namedata[attribute_type_byte] != GNU_BUILD_ATTRIBUTE_VERSION) -- { -- err = _("bad GNU build attribute notes: first note not version note"); -- goto done; -- } -+ /* We used to require that the first note be a version note, -+ but this is no longer enforced. Due to the problems with -+ linking sections with the same name (eg .gnu.build.note.hot) -+ we cannot guarantee that the first note will be a version note. */ - - /* Now merge the notes. The rules are: - 1. Preserve the ordering of the notes. -@@ -2184,7 +2182,7 @@ merge_gnu_build_notes (bfd * abfd, asect - description field of the note must be changed to contain the starting - address to which it refers. - 6. Notes with the same start and end address can be deleted. */ -- for (pnote = pnotes + 1; pnote < pnotes_end; pnote ++) -+ for (pnote = pnotes; pnote < pnotes_end; pnote ++) - { - int note_type; - objcopy_internal_note * back; diff --git a/SOURCES/binutils-ppc-ld-testsuite-fixes.patch b/SOURCES/binutils-ppc-ld-testsuite-fixes.patch new file mode 100644 index 0000000..3a0f2e3 --- /dev/null +++ b/SOURCES/binutils-ppc-ld-testsuite-fixes.patch @@ -0,0 +1,101 @@ +Only in binutils-2.35/ld/testsuite/ld-ifunc: #ifunc.exp# +Only in binutils-2.35/ld/testsuite/ld-ifunc: .#ifunc.exp +diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 13:07:26.232506947 +0100 ++++ binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 13:33:16.090934011 +0100 +@@ -309,6 +309,7 @@ if {! [check_osabi tmpdir/static_nonifun + # should not. + + if {[contains_ifunc_symbol tmpdir/libshared_ifunc.so] != 1} { ++ setup_xfail "powerpc*-*-*" + fail "Shared libraries containing ifunc does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } +diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 15:07:51.587385019 +0100 ++++ binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 15:16:19.629341219 +0100 +@@ -314,11 +314,13 @@ if {[contains_ifunc_symbol tmpdir/libsha + set fails [expr $fails + 1] + } + if {[contains_ifunc_symbol tmpdir/local_prog] != 1} { ++ setup_xfail "powerpc*-*-*" + fail "Local ifunc-using executable does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } + if { ![string match "" $STATIC_LDFLAGS] \ + && [contains_ifunc_symbol tmpdir/static_prog] != 1} { ++ setup_xfail "powerpc*-*-*" + fail "Static ifunc-using executable does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } +@@ -531,7 +533,8 @@ run_ld_link_exec_tests [list \ + if { ![check_ifunc_attribute_available] } { + return + } +-if { [istarget "s390*-*-*"] } { ++if { [istarget "s390*-*-*"] ++ || [istarget "ppc*-*-*"] } { + return + } else { + run_cc_link_tests [list \ +Only in binutils-2.35/ld/testsuite/ld-powerpc/: #powerpc.exp# +Only in binutils-2.35/ld/testsuite/ld-powerpc/: .#powerpc.exp +diff -rup binutils.orig/ld/testsuite/ld-powerpc/notoc3.d binutils-2.35/ld/testsuite/ld-powerpc/notoc3.d +--- binutils.orig/ld/testsuite/ld-powerpc/notoc3.d 2020-07-28 15:07:51.607384938 +0100 ++++ binutils-2.35/ld/testsuite/ld-powerpc/notoc3.d 2020-07-28 15:18:47.912744686 +0100 +@@ -58,7 +58,7 @@ Disassembly of section \.text: + + .* : + .*: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-.*: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++#... + .*: (.. .. ff 4b|4b ff .. ..) bl .* <.*\.long_branch\.f1> + .*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\) + .*: (.. .. ff 4b|4b ff .. ..) bl .* +@@ -73,7 +73,7 @@ Disassembly of section \.text: + + .* : + .*: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-.*: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++#... + .*: (.. .. ff 4b|4b ff .. ..) bl .* + .*: (00 00 00 60|60 00 00 00) nop + .*: (.. .. ff 4b|4b ff .. ..) bl .* <.*\.long_branch\.f1> +@@ -92,6 +92,6 @@ Disassembly of section \.text\.ext: + + 8000000000000000 : + 8000000000000000: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-8000000000000004: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++#... + 8000000000000008: (00 00 00 60|60 00 00 00) nop + 800000000000000c: (20 00 80 4e|4e 80 00 20) blr +diff -rup binutils.orig/ld/testsuite/ld-powerpc/pr23937.d binutils-2.35/ld/testsuite/ld-powerpc/pr23937.d +--- binutils.orig/ld/testsuite/ld-powerpc/pr23937.d 2020-07-28 15:07:51.612384918 +0100 ++++ binutils-2.35/ld/testsuite/ld-powerpc/pr23937.d 2020-07-28 15:19:32.764564253 +0100 +@@ -6,5 +6,4 @@ + #... + .* R_PPC64_IRELATIVE +10000180 + #... +-.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic + #pass +Only in binutils-2.35/ld/testsuite/ld-powerpc/: #powerpc.exp# +diff -rup binutils.orig/ld/testsuite/ld-powerpc/pr23937.d binutils-2.35/ld/testsuite/ld-powerpc/pr23937.d +--- binutils.orig/ld/testsuite/ld-powerpc/pr23937.d 2020-07-28 15:59:15.887927038 +0100 ++++ binutils-2.35/ld/testsuite/ld-powerpc/pr23937.d 2020-07-28 16:04:44.120594140 +0100 +@@ -5,5 +5,4 @@ + + #... + .* R_PPC64_IRELATIVE +10000180 +-#... + #pass +diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 15:59:15.867927119 +0100 ++++ binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 16:05:49.751327625 +0100 +@@ -534,6 +534,7 @@ if { ![check_ifunc_attribute_available] + return + } + if { [istarget "s390*-*-*"] ++ || [istarget "powerpc*-*-*"] + || [istarget "ppc*-*-*"] } { + return + } else { diff --git a/SOURCES/binutils-readelf-other-sym-info.patch b/SOURCES/binutils-readelf-other-sym-info.patch index fa1b2f2..72913ba 100644 --- a/SOURCES/binutils-readelf-other-sym-info.patch +++ b/SOURCES/binutils-readelf-other-sym-info.patch @@ -1,25 +1,24 @@ -diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c ---- binutils.orig/binutils/readelf.c 2017-12-12 16:24:19.571221194 +0000 -+++ binutils-2.29/binutils/readelf.c 2017-12-12 16:27:26.997979803 +0000 -@@ -11018,12 +11018,14 @@ print_dynamic_symbol (bfd_vma si, unsign +--- binutils.orig/binutils/readelf.c 2020-07-24 15:08:30.317597020 +0100 ++++ binutils-2.35/binutils/readelf.c 2020-07-24 15:09:39.029155552 +0100 +@@ -12069,11 +12069,13 @@ print_dynamic_symbol (Filedata *filedata unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); - printf (" %-7s", get_symbol_visibility (vis)); + printf (" %-7s", get_symbol_visibility (vis)); +#if 0 /* Check to see if any other bits in the st_other field are set. Note - displaying this information disrupts the layout of the - table being generated, but for the moment this case is very - rare. */ + table being generated, but for the moment this case is very rare. */ if (psym->st_other ^ vis) printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); +#endif } + printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); - printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx)); -@@ -11031,6 +11033,15 @@ print_dynamic_symbol (bfd_vma si, unsign - print_symbol (25, GET_DYNAMIC_NAME (psym->st_name)); - else - printf (_(" "), psym->st_name); +@@ -12112,7 +12114,17 @@ print_dynamic_symbol (Filedata *filedata + version_string); + } + +- putchar ('\n'); +#if 1 + { + unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); @@ -29,38 +28,8 @@ diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c + printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); + } +#endif - putchar ('\n'); - } - ---- binutils.orig/binutils/readelf.c 2017-12-12 16:36:21.806561149 +0000 -+++ binutils-2.29.1/binutils/readelf.c 2017-12-12 16:38:17.763168514 +0000 -@@ -11548,11 +11548,13 @@ process_symbol_table (FILE * file) - unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); - - printf (" %-7s", get_symbol_visibility (vis)); -+#if 0 - /* Check to see if any other bits in the st_other field are set. - Note - displaying this information disrupts the layout of the - table being generated, but for the moment this case is very rare. */ - if (psym->st_other ^ vis) - printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); -+#endif - } - printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); - print_symbol (25, psym->st_name < strtab_size -@@ -11571,7 +11573,15 @@ process_symbol_table (FILE * file) - printf (sym_info == symbol_hidden ? "@%s" : "@@%s", - version_string); - } -+#if 1 -+ { -+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); - -+ /* Check to see if any other bits in the st_other field are set. */ -+ if (psym->st_other ^ vis) -+ printf (" \t[%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); -+ } -+#endif - putchar ('\n'); ++ ++ putchar ('\n'); - if (ELF_ST_BIND (psym->st_info) == STB_LOCAL + if (ELF_ST_BIND (psym->st_info) == STB_LOCAL + && section != NULL diff --git a/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch b/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch deleted file mode 100644 index e4f0155..0000000 --- a/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- binutils.orig/binutils/objcopy.c 2019-08-05 13:14:52.037496277 +0100 -+++ binutils-2.32/binutils/objcopy.c 2019-08-05 13:14:58.491455624 +0100 -@@ -2225,7 +2225,6 @@ merge_gnu_build_notes (bfd * abfd, asect - && back->note.namesz == pnote->note.namesz - && memcmp (back->note.namedata, pnote->note.namedata, pnote->note.namesz) == 0) - { -- fprintf (stderr, "DUP FUNXC\n"); - duplicate_found = TRUE; - pnote->note.type = 0; - break; diff --git a/SOURCES/binutils-s390-build.patch b/SOURCES/binutils-s390-build.patch new file mode 100644 index 0000000..cdb6a5d --- /dev/null +++ b/SOURCES/binutils-s390-build.patch @@ -0,0 +1,772 @@ +diff -rup binutils.orig/libctf/ctf-create.c binutils-2.34.0/libctf/ctf-create.c +--- binutils.orig/libctf/ctf-create.c 2020-06-16 12:06:28.466468753 +0100 ++++ binutils-2.34.0/libctf/ctf-create.c 2020-06-16 12:16:19.744482839 +0100 +@@ -871,7 +871,8 @@ ctf_add_encoded (ctf_file_t *fp, uint32_ + + if ((type = ctf_add_generic (fp, flag, name, kind, &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ +- ++ if (dtd == NULL) ++ return CTF_ERR; + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (kind, flag, 0); + dtd->dtd_data.ctt_size = clp2 (P2ROUNDUP (ep->cte_bits, CHAR_BIT) + / CHAR_BIT); +@@ -896,6 +897,8 @@ ctf_add_reftype (ctf_file_t *fp, uint32_ + + if ((type = ctf_add_generic (fp, flag, NULL, kind, &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (kind, flag, 0); + dtd->dtd_data.ctt_type = (uint32_t) ref; +@@ -958,6 +961,8 @@ ctf_add_slice (ctf_file_t *fp, uint32_t + + if ((type = ctf_add_generic (fp, flag, NULL, CTF_K_SLICE, &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_SLICE, flag, 0); + dtd->dtd_data.ctt_size = clp2 (P2ROUNDUP (ep->cte_bits, CHAR_BIT) +@@ -1008,6 +1013,8 @@ ctf_add_array (ctf_file_t *fp, uint32_t + + if ((type = ctf_add_generic (fp, flag, NULL, CTF_K_ARRAY, &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_ARRAY, flag, 0); + dtd->dtd_data.ctt_size = 0; +@@ -1075,6 +1082,8 @@ ctf_add_function (ctf_file_t *fp, uint32 + free (vdat); + return CTF_ERR; /* errno is set for us. */ + } ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_FUNCTION, flag, vlen); + dtd->dtd_data.ctt_type = (uint32_t) ctc->ctc_return; +@@ -1104,6 +1113,8 @@ ctf_add_struct_sized (ctf_file_t *fp, ui + else if ((type = ctf_add_generic (fp, flag, name, CTF_K_STRUCT, + &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_STRUCT, flag, 0); + +@@ -1141,6 +1152,8 @@ ctf_add_union_sized (ctf_file_t *fp, uin + else if ((type = ctf_add_generic (fp, flag, name, CTF_K_UNION, + &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_UNION, flag, 0); + +@@ -1177,6 +1190,8 @@ ctf_add_enum (ctf_file_t *fp, uint32_t f + else if ((type = ctf_add_generic (fp, flag, name, CTF_K_ENUM, + &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_ENUM, flag, 0); + dtd->dtd_data.ctt_size = fp->ctf_dmodel->ctd_int; +diff -rup binutils.orig/libctf/ctf-types.c binutils-2.34.0/libctf/ctf-types.c +--- binutils.orig/libctf/ctf-types.c 2020-06-16 12:06:28.466468753 +0100 ++++ binutils-2.34.0/libctf/ctf-types.c 2020-06-16 12:10:58.033563365 +0100 +@@ -748,7 +748,7 @@ ctf_type_encoding (ctf_file_t *fp, ctf_i + case CTF_K_SLICE: + { + const ctf_slice_t *slice; +- ctf_encoding_t underlying_en; ++ ctf_encoding_t underlying_en = {0}; + slice = &dtd->dtd_u.dtu_slice; + + data = ctf_type_encoding (fp, slice->cts_type, &underlying_en); +diff -rup binutils.orig/opcodes/s390-mkopc.c binutils-2.34.0/opcodes/s390-mkopc.c +--- binutils.orig/opcodes/s390-mkopc.c 2020-06-16 12:06:28.447468816 +0100 ++++ binutils-2.34.0/opcodes/s390-mkopc.c 2020-06-16 12:17:10.783311417 +0100 +@@ -168,7 +168,7 @@ insertExpandedMnemonic (char *opcode, ch + int mask_start, i = 0, tag_found = 0, reading_number = 0; + int number_p = 0, suffix_p = 0, prefix_p = 0; + const struct s390_cond_ext_format *ext_table; +- int ext_table_length; ++ int ext_table_length = 0; + + if (!(tag = strpbrk (mnemonic, "*$"))) + { +Only in binutils.orig/libctf: .#ctf-create.c +diff -rup binutils.orig/libctf/ctf-create.c binutils-2.34.0/libctf/ctf-create.c +--- binutils.orig/libctf/ctf-create.c 2020-06-16 14:49:06.080801319 +0100 ++++ binutils-2.34.0/libctf/ctf-create.c 2020-06-16 14:49:08.046794113 +0100 +@@ -798,6 +798,7 @@ ctf_add_generic (ctf_file_t *fp, uint32_ + { + ctf_dtdef_t *dtd; + ctf_id_t type; ++ *rp = NULL; + + if (flag != CTF_ADD_NONROOT && flag != CTF_ADD_ROOT) + return (ctf_set_errno (fp, EINVAL)); +diff -rup binutils.orig/opcodes/fr30-ibld.c binutils-2.34.0/opcodes/fr30-ibld.c +--- binutils.orig/opcodes/fr30-ibld.c 2020-06-16 14:49:06.074801341 +0100 ++++ binutils-2.34.0/opcodes/fr30-ibld.c 2020-06-16 16:43:31.428324833 +0100 +@@ -810,7 +810,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_DIR10 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 16, total_length, pc, & value); + value = ((value) << (2)); + fields->f_dir10 = value; +@@ -821,7 +821,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_DIR9 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 16, total_length, pc, & value); + value = ((value) << (1)); + fields->f_dir9 = value; +@@ -829,7 +829,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_DISP10 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_disp10 = value; +@@ -840,7 +840,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_DISP9 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_disp9 = value; +@@ -865,7 +865,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_LABEL12 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel12 = value; +@@ -873,7 +873,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_LABEL9 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel9 = value; +@@ -881,7 +881,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_M4 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 16, total_length, pc, & value); + value = ((value) | (-16)); + fields->f_m4 = value; +@@ -911,7 +911,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_U10 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 16, total_length, pc, & value); + value = ((value) << (2)); + fields->f_u10 = value; +@@ -928,7 +928,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_UDISP6 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 16, total_length, pc, & value); + value = ((value) << (2)); + fields->f_udisp6 = value; + +diff -rup binutils.orig/opcodes/fr30-ibld.c binutils-2.34.0/opcodes/fr30-ibld.c +--- binutils.orig/opcodes/fr30-ibld.c 2020-06-16 17:10:22.540563440 +0100 ++++ binutils-2.34.0/opcodes/fr30-ibld.c 2020-06-16 17:10:48.966468906 +0100 +@@ -903,7 +903,7 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC + break; + case FR30_OPERAND_S10 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_s10 = value; +Only in binutils-2.34.0/opcodes: fr30-ibld.c~ +--- binutils.orig/opcodes/m32c-ibld.c 2020-06-16 17:10:22.531563472 +0100 ++++ binutils-2.34.0/opcodes/m32c-ibld.c 2020-06-16 17:25:48.612258094 +0100 +@@ -1805,7 +1805,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_BIT32RNPREFIXED : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_dst32_rn_prefixed_QI = value; +@@ -1813,7 +1813,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_BIT32RNUNPREFIXED : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_dst32_rn_unprefixed_QI = value; +@@ -1824,7 +1824,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_BITBASE16_16_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -1860,7 +1860,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_16_s16 = value; +@@ -1887,7 +1887,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -1903,7 +1903,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -1971,7 +1971,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_32_u16 = value; +@@ -1996,7 +1996,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_16_S16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_16_s16 = value; +@@ -2007,7 +2007,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_16_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -2016,7 +2016,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_DSP_16_U20 : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -2032,7 +2032,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_DSP_16_U24 : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; +@@ -2078,7 +2078,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_32_u16 = value; +@@ -2094,7 +2094,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_32_u16 = value; +@@ -2110,7 +2110,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_32_S16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_32_s16 = value; +@@ -2121,7 +2121,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_32_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_32_u16 = value; +@@ -2129,7 +2129,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_32_U20 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + fields->f_dsp_32_u24 = value; +@@ -2137,7 +2137,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_32_U24 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + fields->f_dsp_32_u24 = value; +@@ -2148,7 +2148,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_40_S16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_40_s16 = value; +@@ -2159,7 +2159,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_40_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_40_u16 = value; +@@ -2167,7 +2167,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_40_U20 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 20, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040)))); + fields->f_dsp_40_u20 = value; +@@ -2175,7 +2175,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_40_U24 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + fields->f_dsp_40_u24 = value; +@@ -2186,7 +2186,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_48_S16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_48_s16 = value; +@@ -2197,7 +2197,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_48_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_48_u16 = value; +@@ -2206,7 +2206,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_DSP_48_U20 : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_48_u16 = value; +@@ -2222,7 +2222,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_DSP_48_U24 : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_48_u16 = value; +@@ -2240,7 +2240,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_8_S24 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (16))) & (255))) | (((value) & (65280))))) | (((((value) & (255))) << (16))))) ^ (8388608))) - (8388608)); + fields->f_dsp_8_s24 = value; +@@ -2251,7 +2251,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_8_U16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_8_u16 = value; +@@ -2259,7 +2259,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DSP_8_U24 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value); + value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + fields->f_dsp_8_u24 = value; +@@ -2343,7 +2343,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNPREFIXEDHI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); + value = ((((value) + (2))) % (4)); + fields->f_dst32_rn_prefixed_HI = value; +@@ -2351,7 +2351,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNPREFIXEDQI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_dst32_rn_prefixed_QI = value; +@@ -2359,7 +2359,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNPREFIXEDSI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); + value = ((value) - (2)); + fields->f_dst32_rn_prefixed_SI = value; +@@ -2367,7 +2367,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNUNPREFIXEDHI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); + value = ((((value) + (2))) % (4)); + fields->f_dst32_rn_unprefixed_HI = value; +@@ -2375,7 +2375,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNUNPREFIXEDQI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_dst32_rn_unprefixed_QI = value; +@@ -2383,7 +2383,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_DST32RNUNPREFIXEDSI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); + value = ((value) - (2)); + fields->f_dst32_rn_unprefixed_SI = value; +@@ -2402,7 +2402,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM_16_HI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_16_s16 = value; +@@ -2414,14 +2414,14 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_IMM_16_SI : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_16_u16 = value; + } + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_32_u16 = value; +@@ -2454,7 +2454,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8); + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + fields->f_dsp_32_u24 = value; +@@ -2467,7 +2467,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM_32_HI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_32_s16 = value; +@@ -2486,7 +2486,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM_40_HI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_40_s16 = value; +@@ -2498,7 +2498,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_IMM_40_SI : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + fields->f_dsp_40_u24 = value; +@@ -2513,7 +2513,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM_48_HI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_48_s16 = value; +@@ -2525,14 +2525,14 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + case M32C_OPERAND_IMM_48_SI : + { + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_48_u16 = value; + } + if (length <= 0) break; + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_64_u16 = value; +@@ -2567,7 +2567,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM_8_HI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) & (255))) << (8))))))); + fields->f_dsp_8_s16 = value; +@@ -2593,7 +2593,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_IMM1_S : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 1, 32, total_length, pc, & value); + value = ((value) + (1)); + fields->f_imm1_S = value; +@@ -2612,7 +2612,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_16_8 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_16_8 = value; +@@ -2620,7 +2620,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_24_8 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_24_8 = value; +@@ -2628,7 +2628,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_32_8 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_32_8 = value; +@@ -2636,7 +2636,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_40_8 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_40_8 = value; +@@ -2644,7 +2644,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_5_3 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_5_3 = value; +@@ -2652,7 +2652,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_8_16 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) | (((((value) & (255))) << (8))))) ^ (32768))) - (32768))) + (((pc) + (1)))); + fields->f_lab_8_16 = value; +@@ -2660,7 +2660,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_8_24 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + fields->f_lab_8_24 = value; +@@ -2668,7 +2668,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_LAB_8_8 : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lab_8_8 = value; +@@ -2757,7 +2757,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNPREFIXEDHI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value); + value = ((((value) + (2))) % (4)); + fields->f_src32_rn_prefixed_HI = value; +@@ -2765,7 +2765,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNPREFIXEDQI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_src32_rn_prefixed_QI = value; +@@ -2773,7 +2773,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNPREFIXEDSI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value); + value = ((value) - (2)); + fields->f_src32_rn_prefixed_SI = value; +@@ -2781,7 +2781,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNUNPREFIXEDHI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value); + value = ((((value) + (2))) % (4)); + fields->f_src32_rn_unprefixed_HI = value; +@@ -2789,7 +2789,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNUNPREFIXEDQI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + fields->f_src32_rn_unprefixed_QI = value; +@@ -2797,7 +2797,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC + break; + case M32C_OPERAND_SRC32RNUNPREFIXEDSI : + { +- long value; ++ long value = 0; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value); + value = ((value) - (2)); + fields->f_src32_rn_unprefixed_SI = value; +--- binutils.orig/binutils/srconv.c 2020-06-16 17:10:22.251564474 +0100 ++++ binutils-2.34.0/binutils/srconv.c 2020-06-16 20:07:51.670025912 +0100 +@@ -492,6 +492,8 @@ wr_rl (struct coff_ofile *ptr ATTRIBUTE_ + rl.addr = r->offset; + rl.bitloc = 0; + rl.flen = 32; /* SH Specific. */ ++ rl.dunno = 0; ++ rl.symn = 0; + + /* What sort of reloc ? Look in the section to find out. */ + ref = r->symbol; +--- binutils.orig/libctf/ctf-create.c 2020-07-24 15:33:26.100996335 +0100 ++++ binutils-2.35/libctf/ctf-create.c 2020-07-24 15:33:29.042977475 +0100 +@@ -1257,6 +1257,8 @@ ctf_add_forward (ctf_file_t *fp, uint32_ + + if ((type = ctf_add_generic (fp, flag, name, kind, &dtd)) == CTF_ERR) + return CTF_ERR; /* errno is set for us. */ ++ if (dtd == NULL) ++ return CTF_ERR; + + dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_FORWARD, flag, 0); + dtd->dtd_data.ctt_type = kind; diff --git a/SOURCES/binutils-s390-ld-testsuite-fixes.patch b/SOURCES/binutils-s390-ld-testsuite-fixes.patch new file mode 100644 index 0000000..ecc32be --- /dev/null +++ b/SOURCES/binutils-s390-ld-testsuite-fixes.patch @@ -0,0 +1,120 @@ +--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2020-07-28 13:07:26.371506355 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/indirect.exp 2020-07-28 13:19:16.109480917 +0100 +@@ -151,12 +151,6 @@ set run_tests { + {"Run with libindirect4c.so 4" + "-Wl,--no-as-needed tmpdir/libindirect4c.so tmpdir/indirect4b.o tmpdir/indirect4a.o" "" + {dummy.c} "indirect4d" "indirect4.out"} +- {"Run indirect5 1" +- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" "" +- {indirect5a.c} "indirect5a" "indirect5.out" "$NOPIE_CFLAGS"} +- {"Run indirect5 2" +- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" "" +- {dummy.c} "indirect5b" "indirect5.out" "$NOPIE_CFLAGS"} + {"Run indirect6 1" + "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" "" + {indirect6a.c} "indirect6a" "indirect5.out" "$NOPIE_CFLAGS"} +@@ -208,7 +202,7 @@ proc check_dynamic_syms { test } { + return 1 + } + +-foreach t [list indirect5a indirect5b indirect6a indirect6b] { ++foreach t [list indirect6a indirect6b] { + set testname [concat $t "dynsym"] + if { [check_dynamic_syms tmpdir/$t] } { + pass $testname +@@ -225,12 +219,6 @@ if { ! [string match "" $exec_output] } + } + + set pie_tests { +- {"Run indirect5 3" +- "-pie -Wl,--no-as-needed tmpdir/libindirect5.so" "" +- {indirect5a.c} "indirect5c" "indirect5.out" "-fPIE"} +- {"Run indirect5 4" +- "-pie -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" "" +- {dummy.c} "indirect5d" "indirect5.out" "-fPIE"} + {"Run indirect6 3" + "-pie -Wl,--no-as-needed tmpdir/libindirect5.so" "" + {indirect6a.c} "indirect6c" "indirect5.out" "-fPIE"} +diff -rup binutils.orig/ld/testsuite/ld-elf/shared.exp binutils-2.35/ld/testsuite/ld-elf/shared.exp +--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2020-07-28 14:15:41.646811416 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/shared.exp 2020-07-28 14:19:13.606963162 +0100 +@@ -1380,18 +1380,6 @@ if { [istarget *-*-linux*] + "pr22393-2-static" \ + "pass.out" \ + ] \ +- [list \ +- "Run pr21964-4" \ +- "" \ +- "" \ +- {pr21964-4.c} \ +- "pr21964-4" \ +- "pass.out" \ +- "" \ +- "" \ +- "" \ +- "-ldl" \ +- ] \ + ] + } + +diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.35/ld/testsuite/ld-elf/tls.exp +--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2020-07-28 14:15:41.635811460 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/tls.exp 2020-07-28 14:21:04.086521032 +0100 +@@ -49,5 +49,6 @@ run_ld_link_tests [list \ + {{readelf -r pr22263-1.rd}} \ + "pr22263-1" \ + "-fPIE -O2 $NOSANTIZE_CFLAGS" \ +- ] \ ++ ] \ ++ { s390*-*-* } \ + ] +diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 14:15:41.532811873 +0100 ++++ binutils-2.35/ld/testsuite/ld-ifunc/ifunc.exp 2020-07-28 14:22:37.768146123 +0100 +@@ -531,7 +531,9 @@ run_ld_link_exec_tests [list \ + if { ![check_ifunc_attribute_available] } { + return + } +- ++if { [istarget "s390*-*-*"] } { ++ return ++} else { + run_cc_link_tests [list \ + [list \ + "Build pr18808a.o" \ +@@ -668,6 +670,7 @@ run_cc_link_tests [list \ + "pr23169f" \ + ] \ + ] ++} + + run_ld_link_exec_tests [list \ + [list \ +--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2020-07-28 15:07:51.733384431 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/tls.exp 2020-07-28 15:10:08.096835851 +0100 +@@ -50,5 +50,5 @@ run_ld_link_tests [list \ + "pr22263-1" \ + "-fPIE -O2 $NOSANTIZE_CFLAGS" \ + ] \ +- { s390*-*-* } \ ++ [list "s390*-*-*"] \ + ] +--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2020-07-28 15:59:15.964926725 +0100 ++++ binutils-2.35/ld/testsuite/ld-elf/tls.exp 2020-07-28 15:59:55.898764564 +0100 +@@ -39,6 +39,9 @@ if [istarget "sparc*-*-*"] { + append AFLAGS_PIC " -K PIC" + } + ++if [istarget "s390*-*-*"] { ++ return ++} else { + run_ld_link_tests [list \ + [list \ + "Build pr22263-1" \ +@@ -50,5 +53,5 @@ run_ld_link_tests [list \ + "pr22263-1" \ + "-fPIE -O2 $NOSANTIZE_CFLAGS" \ + ] \ +- [list "s390*-*-*"] \ + ] ++} diff --git a/SOURCES/binutils-s390x-arch13-descriptions.patch b/SOURCES/binutils-s390x-arch13-descriptions.patch deleted file mode 100644 index de33997..0000000 --- a/SOURCES/binutils-s390x-arch13-descriptions.patch +++ /dev/null @@ -1,355 +0,0 @@ -diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d ---- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:41:27.796052644 +0100 -+++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:48:01.504295109 +0100 -@@ -61,27 +61,27 @@ Disassembly of section .text: - .*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11 - .*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11 - .*: b9 e3 be 69 [ ]*selgrno %r6,%r9,%r11 --.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 --.*: b9 c0 b1 69 [ ]*selhhhro %r6,%r9,%r11 --.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11 --.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11 --.*: b9 c0 b3 69 [ ]*selhhhrnle %r6,%r9,%r11 --.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11 --.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11 --.*: b9 c0 b5 69 [ ]*selhhhrnhe %r6,%r9,%r11 --.*: b9 c0 b6 69 [ ]*selhhhrlh %r6,%r9,%r11 --.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11 --.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11 --.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11 --.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11 --.*: b9 c0 b9 69 [ ]*selhhhrnlh %r6,%r9,%r11 --.*: b9 c0 ba 69 [ ]*selhhhrhe %r6,%r9,%r11 --.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11 --.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11 --.*: b9 c0 bc 69 [ ]*selhhhrle %r6,%r9,%r11 --.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 --.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 --.*: b9 c0 be 69 [ ]*selhhhrno %r6,%r9,%r11 -+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 -+.*: b9 c0 b1 69 [ ]*selfhro %r6,%r9,%r11 -+.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11 -+.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11 -+.*: b9 c0 b3 69 [ ]*selfhrnle %r6,%r9,%r11 -+.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11 -+.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11 -+.*: b9 c0 b5 69 [ ]*selfhrnhe %r6,%r9,%r11 -+.*: b9 c0 b6 69 [ ]*selfhrlh %r6,%r9,%r11 -+.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11 -+.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11 -+.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11 -+.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11 -+.*: b9 c0 b9 69 [ ]*selfhrnlh %r6,%r9,%r11 -+.*: b9 c0 ba 69 [ ]*selfhrhe %r6,%r9,%r11 -+.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11 -+.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11 -+.*: b9 c0 bc 69 [ ]*selfhrle %r6,%r9,%r11 -+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 -+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 -+.*: b9 c0 be 69 [ ]*selfhrno %r6,%r9,%r11 - .*: e6 f6 9f a0 d0 06 [ ]*vlbr %v15,4000\(%r6,%r9\),13 - .*: e6 f6 9f a0 10 06 [ ]*vlbrh %v15,4000\(%r6,%r9\) - .*: e6 f6 9f a0 20 06 [ ]*vlbrf %v15,4000\(%r6,%r9\) -@@ -130,11 +130,8 @@ Disassembly of section .text: - .*: e7 f1 42 00 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24 - .*: e7 f1 42 d0 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24,13 - .*: e7 f1 40 20 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24 --.*: e7 f1 40 f0 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24,13 - .*: e7 f1 41 20 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24 --.*: e7 f1 41 f0 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24,13 - .*: e7 f1 42 20 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24 --.*: e7 f1 42 f0 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24,13 - .*: e7 f1 00 bc d4 c3 [ ]*vcfps %v15,%v17,13,12,11 - .*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12 - .*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12 -@@ -154,3 +151,4 @@ Disassembly of section .text: - .*: e6 6f 00 d0 00 52 [ ]*vcvbg %r6,%v15,13 - .*: e6 6f 00 dc 00 52 [ ]*vcvbg %r6,%v15,13,12 - .*: b9 3a 00 69 [ ]*kdsa %r6,%r9 -+.*: 07 07 [ ]*nopr %r7 -diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s ---- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:41:27.794052658 +0100 -+++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:48:01.504295109 +0100 -@@ -55,27 +55,27 @@ foo: - selgrnh %r6,%r9,%r11 - selgrnp %r6,%r9,%r11 - selgrno %r6,%r9,%r11 -- selhhhr %r6,%r9,%r11,13 -- selhhhro %r6,%r9,%r11 -- selhhhrh %r6,%r9,%r11 -- selhhhrp %r6,%r9,%r11 -- selhhhrnle %r6,%r9,%r11 -- selhhhrl %r6,%r9,%r11 -- selhhhrm %r6,%r9,%r11 -- selhhhrnhe %r6,%r9,%r11 -- selhhhrlh %r6,%r9,%r11 -- selhhhrne %r6,%r9,%r11 -- selhhhrnz %r6,%r9,%r11 -- selhhhre %r6,%r9,%r11 -- selhhhrz %r6,%r9,%r11 -- selhhhrnlh %r6,%r9,%r11 -- selhhhrhe %r6,%r9,%r11 -- selhhhrnl %r6,%r9,%r11 -- selhhhrnm %r6,%r9,%r11 -- selhhhrle %r6,%r9,%r11 -- selhhhrnh %r6,%r9,%r11 -- selhhhrnp %r6,%r9,%r11 -- selhhhrno %r6,%r9,%r11 -+ selfhr %r6,%r9,%r11,13 -+ selfhro %r6,%r9,%r11 -+ selfhrh %r6,%r9,%r11 -+ selfhrp %r6,%r9,%r11 -+ selfhrnle %r6,%r9,%r11 -+ selfhrl %r6,%r9,%r11 -+ selfhrm %r6,%r9,%r11 -+ selfhrnhe %r6,%r9,%r11 -+ selfhrlh %r6,%r9,%r11 -+ selfhrne %r6,%r9,%r11 -+ selfhrnz %r6,%r9,%r11 -+ selfhre %r6,%r9,%r11 -+ selfhrz %r6,%r9,%r11 -+ selfhrnlh %r6,%r9,%r11 -+ selfhrhe %r6,%r9,%r11 -+ selfhrnl %r6,%r9,%r11 -+ selfhrnm %r6,%r9,%r11 -+ selfhrle %r6,%r9,%r11 -+ selfhrnh %r6,%r9,%r11 -+ selfhrnp %r6,%r9,%r11 -+ selfhrno %r6,%r9,%r11 - vlbr %v15,4000(%r6,%r9),13 - vlbrh %v15,4000(%r6,%r9) - vlbrf %v15,4000(%r6,%r9) -@@ -124,11 +124,8 @@ foo: - vstrsf %v15,%v17,%v20,%v24 - vstrsf %v15,%v17,%v20,%v24,13 - vstrszb %v15,%v17,%v20,%v24 -- vstrszb %v15,%v17,%v20,%v24,13 - vstrszh %v15,%v17,%v20,%v24 -- vstrszh %v15,%v17,%v20,%v24,13 - vstrszf %v15,%v17,%v20,%v24 -- vstrszf %v15,%v17,%v20,%v24,13 - vcfps %v15,%v17,13,12,11 - vcefb %v15,%v17,13,12 - wcefb %v15,%v17,13,12 -diff -rup binutils.orig/opcodes/s390-opc.txt binutils-2.30/opcodes/s390-opc.txt ---- binutils.orig/opcodes/s390-opc.txt 2019-06-18 13:41:27.578054171 +0100 -+++ binutils-2.30/opcodes/s390-opc.txt 2019-06-18 13:48:01.505295102 +0100 -@@ -1889,106 +1889,120 @@ e70000000036 vlm VRS_VVRDU "vector load - e7000000000e vst VRX_VRRDU "vector store" arch12 zarch optparm - e7000000003e vstm VRS_VVRDU "vector store multiple" arch12 zarch optparm - -+ - # arch13 instructions - --b9f5 ncrk RRF_R0RR2 " " arch13 zarch --b9e5 ncgrk RRF_R0RR2 " " arch13 zarch --e50a mvcrl SSE_RDRD " " arch13 zarch --b974 nnrk RRF_R0RR2 " " arch13 zarch --b964 nngrk RRF_R0RR2 " " arch13 zarch --b976 nork RRF_R0RR2 " " arch13 zarch --b966 nogrk RRF_R0RR2 " " arch13 zarch --b977 nxrk RRF_R0RR2 " " arch13 zarch --b967 nxgrk RRF_R0RR2 " " arch13 zarch --b975 ocrk RRF_R0RR2 " " arch13 zarch --b965 ocgrk RRF_R0RR2 " " arch13 zarch --b9e1 popcnt RRF_U0RR " " arch13 zarch optparm --b9f0 selr RRF_RURR " " arch13 zarch --b9f00000 selr*20 RRF_R0RR3 " " arch13 zarch --b9e3 selgr RRF_RURR " " arch13 zarch --b9e30000 selgr*20 RRF_R0RR3 " " arch13 zarch --b9c0 selhhhr RRF_RURR " " arch13 zarch --b9c00000 selhhhr*20 RRF_R0RR3 " " arch13 zarch -- --e60000000006 vlbr VRX_VRRDU " " arch13 zarch --e60000001006 vlbrh VRX_VRRD " " arch13 zarch --e60000002006 vlbrf VRX_VRRD " " arch13 zarch --e60000003006 vlbrg VRX_VRRD " " arch13 zarch --e60000004006 vlbrq VRX_VRRD " " arch13 zarch -- --e60000000007 vler VRX_VRRDU " " arch13 zarch --e60000001007 vlerh VRX_VRRD " " arch13 zarch --e60000002007 vlerf VRX_VRRD " " arch13 zarch --e60000003007 vlerg VRX_VRRD " " arch13 zarch -- --e60000000004 vllebrz VRX_VRRDU " " arch13 zarch --e60000001004 vllebrzh VRX_VRRD " " arch13 zarch --e60000002004 vllebrzf VRX_VRRD " " arch13 zarch --e60000003004 ldrv VRX_VRRD " " arch13 zarch --e60000003004 vllebrzg VRX_VRRD " " arch13 zarch --e60000006004 lerv VRX_VRRD " " arch13 zarch --e60000006004 vllebrze VRX_VRRD " " arch13 zarch -- --e60000000001 vlebrh VRX_VRRDU " " arch13 zarch --e60000000003 vlebrf VRX_VRRDU " " arch13 zarch --e60000000002 vlebrg VRX_VRRDU " " arch13 zarch -- --e60000000005 vlbrrep VRX_VRRDU " " arch13 zarch --e60000001005 vlbrreph VRX_VRRD " " arch13 zarch --e60000002005 vlbrrepf VRX_VRRD " " arch13 zarch --e60000003005 vlbrrepg VRX_VRRD " " arch13 zarch -- --e6000000000e vstbr VRX_VRRDU " " arch13 zarch --e6000000100e vstbrh VRX_VRRD " " arch13 zarch --e6000000200e vstbrf VRX_VRRD " " arch13 zarch --e6000000300e vstbrg VRX_VRRD " " arch13 zarch --e6000000400e vstbrq VRX_VRRD " " arch13 zarch -- --e6000000000f vster VRX_VRRDU " " arch13 zarch --e6000000100f vsterh VRX_VRRD " " arch13 zarch --e6000000200f vsterf VRX_VRRD " " arch13 zarch --e6000000300f vsterg VRX_VRRD " " arch13 zarch -- --e60000000009 vstebrh VRX_VRRDU " " arch13 zarch --e6000000000b vstebrf VRX_VRRDU " " arch13 zarch --e6000000000b sterv VRX_VRRD " " arch13 zarch --e6000000000a vstebrg VRX_VRRDU " " arch13 zarch --e6000000000a stdrv VRX_VRRD " " arch13 zarch -- --e70000000086 vsld VRI_VVV0U " " arch13 zarch --e70000000087 vsrd VRI_VVV0U " " arch13 zarch -- --e7000000008b vstrs VRR_VVVUU0V " " arch13 zarch optparm -- --e7000000008b vstrsb VRR_VVVU0VB " " arch13 zarch optparm --e7000100008b vstrsh VRR_VVVU0VB " " arch13 zarch optparm --e7000200008b vstrsf VRR_VVVU0VB " " arch13 zarch optparm -- --e7000020008b vstrszb VRR_VVVU0VB2 " " arch13 zarch optparm --e7000120008b vstrszh VRR_VVVU0VB2 " " arch13 zarch optparm --e7000220008b vstrszf VRR_VVVU0VB2 " " arch13 zarch optparm -- --e700000000c3 vcfps VRR_VV0UUU " " arch13 zarch --e700000020c3 vcefb VRR_VV0UU " " arch13 zarch --e700000820c3 wcefb VRR_VV0UU8 " " arch13 zarch -- --e700000000c1 vcfpl VRR_VV0UUU " " arch13 zarch --e700000020c1 vcelfb VRR_VV0UU " " arch13 zarch --e700000820c1 wcelfb VRR_VV0UU8 " " arch13 zarch -- --e700000000c2 vcsfp VRR_VV0UUU " " arch13 zarch --e700000020c2 vcfeb VRR_VV0UU " " arch13 zarch --e700000820c2 wcfeb VRR_VV0UU8 " " arch13 zarch -- --e700000000c0 vclfp VRR_VV0UUU " " arch13 zarch --e700000020c0 vclfeb VRR_VV0UU " " arch13 zarch --e700000820c0 wclfeb VRR_VV0UU8 " " arch13 zarch - --b939 dfltcc RRF_R0RR2 " " arch13 zarch -+# Miscellaneous Instruction Extensions Facility 2 -+ -+b9f5 ncrk RRF_R0RR2 "and with complement 32 bit" arch13 zarch -+b9e5 ncgrk RRF_R0RR2 "and with complement 64 bit" arch13 zarch -+e50a mvcrl SSE_RDRD "move right to left" arch13 zarch -+b974 nnrk RRF_R0RR2 "nand 32 bit" arch13 zarch -+b964 nngrk RRF_R0RR2 "nand 64 bit" arch13 zarch -+b976 nork RRF_R0RR2 "nor 32 bit" arch13 zarch -+b966 nogrk RRF_R0RR2 "nor 64 bit" arch13 zarch -+b977 nxrk RRF_R0RR2 "not exclusive or 32 bit" arch13 zarch -+b967 nxgrk RRF_R0RR2 "not exclusive or 64 bit" arch13 zarch -+b975 ocrk RRF_R0RR2 "or with complement 32 bit" arch13 zarch -+b965 ocgrk RRF_R0RR2 "or with complement 64 bit" arch13 zarch -+b9e1 popcnt RRF_U0RR "population count arch13" arch13 zarch optparm -+b9f0 selr RRF_RURR "select 32 bit" arch13 zarch -+b9f00000 selr*20 RRF_R0RR3 "select 32 bit" arch13 zarch -+b9e3 selgr RRF_RURR "select 64 bit" arch13 zarch -+b9e30000 selgr*20 RRF_R0RR3 "select 64 bit" arch13 zarch -+b9c0 selfhr RRF_RURR "select high" arch13 zarch -+b9c00000 selfhr*20 RRF_R0RR3 "select high" arch13 zarch -+ -+# Vector Enhancements Facility 2 -+ -+e60000000006 vlbr VRX_VRRDU "vector load byte reversed elements" arch13 zarch -+e60000001006 vlbrh VRX_VRRD "vector load byte reversed halfword elements" arch13 zarch -+e60000002006 vlbrf VRX_VRRD "vector load byte reversed word elements" arch13 zarch -+e60000003006 vlbrg VRX_VRRD "vector load byte reversed doubleword elements" arch13 zarch -+e60000004006 vlbrq VRX_VRRD "vector load byte reversed quadword elements" arch13 zarch -+ -+e60000000007 vler VRX_VRRDU "vector load elements reversed" arch13 zarch -+e60000001007 vlerh VRX_VRRD "vector load halfword elements reversed" arch13 zarch -+e60000002007 vlerf VRX_VRRD "vector load word elements reversed" arch13 zarch -+e60000003007 vlerg VRX_VRRD "vector load doubleword elements reversed" arch13 zarch -+ -+e60000000004 vllebrz VRX_VRRDU "vector load byte reversed element and zero" arch13 zarch -+e60000001004 vllebrzh VRX_VRRD "vector load byte reversed halfword element and zero" arch13 zarch -+e60000002004 vllebrzf VRX_VRRD "vector load byte reversed word element and zero" arch13 zarch -+e60000003004 ldrv VRX_VRRD "load byte reversed doubleword" arch13 zarch -+e60000003004 vllebrzg VRX_VRRD "vector load byte reversed doubleword element and zero" arch13 zarch -+e60000006004 lerv VRX_VRRD "load byte reversed word" arch13 zarch -+e60000006004 vllebrze VRX_VRRD "vector load byte reversed word element left-aligned and zero" arch13 zarch -+ -+e60000000001 vlebrh VRX_VRRDU "vector load byte reversed halfword element" arch13 zarch -+e60000000003 vlebrf VRX_VRRDU "vector load byte reversed word element" arch13 zarch -+e60000000002 vlebrg VRX_VRRDU "vector load byte reversed doubleword element" arch13 zarch -+ -+e60000000005 vlbrrep VRX_VRRDU "vector load byte reversed element and replicate" arch13 zarch -+e60000001005 vlbrreph VRX_VRRD "vector load byte reversed halfword element and replicate" arch13 zarch -+e60000002005 vlbrrepf VRX_VRRD "vector load byte reversed word element and replicate" arch13 zarch -+e60000003005 vlbrrepg VRX_VRRD "vector load byte reversed doubleword element and replicate" arch13 zarch -+ -+e6000000000e vstbr VRX_VRRDU "vector store byte reversed elements" arch13 zarch -+e6000000100e vstbrh VRX_VRRD "vector store byte reversed halfword elements" arch13 zarch -+e6000000200e vstbrf VRX_VRRD "vector store byte reversed word elements" arch13 zarch -+e6000000300e vstbrg VRX_VRRD "vector store byte reversed doubleword elements" arch13 zarch -+e6000000400e vstbrq VRX_VRRD "vector store byte reversed quadword elements" arch13 zarch -+ -+e6000000000f vster VRX_VRRDU "vector store elements reversed" arch13 zarch -+e6000000100f vsterh VRX_VRRD "vector store halfword elements reversed" arch13 zarch -+e6000000200f vsterf VRX_VRRD "vector store word elements reversed" arch13 zarch -+e6000000300f vsterg VRX_VRRD "vector store doubleword elements reversed" arch13 zarch -+ -+e60000000009 vstebrh VRX_VRRDU "vector store byte reversed halfword element" arch13 zarch -+e6000000000b vstebrf VRX_VRRDU "vector store byte reversed word element" arch13 zarch -+e6000000000b sterv VRX_VRRD "store byte reversed word" arch13 zarch -+e6000000000a vstebrg VRX_VRRDU "vector store byte reversed doubleword element" arch13 zarch -+e6000000000a stdrv VRX_VRRD "store byte reversed doubleword" arch13 zarch -+ -+e70000000086 vsld VRI_VVV0U "vector shift left double by bit" arch13 zarch -+e70000000087 vsrd VRI_VVV0U "vector shift right double by bit" arch13 zarch -+ -+e7000000008b vstrs VRR_VVVUU0V "vector string search" arch13 zarch optparm -+ -+e7000000008b vstrsb VRR_VVVU0VB "vector string search byte" arch13 zarch optparm -+e7000100008b vstrsh VRR_VVVU0VB "vector string search halfword" arch13 zarch optparm -+e7000200008b vstrsf VRR_VVVU0VB "vector string search word" arch13 zarch optparm -+ -+e7000020008b vstrszb VRR_VVV0V "vector string search byte zero" arch13 zarch -+e7000120008b vstrszh VRR_VVV0V "vector string search halfword zero" arch13 zarch -+e7000220008b vstrszf VRR_VVV0V "vector string search word zero" arch13 zarch -+ -+e700000000c3 vcfps VRR_VV0UUU "vector fp convert from fixed" arch13 zarch -+e700000020c3 vcefb VRR_VV0UU "vector fp convert from fixed 32 bit" arch13 zarch -+e700000820c3 wcefb VRR_VV0UU8 "vector fp convert from fixed 32 bit" arch13 zarch -+ -+e700000000c1 vcfpl VRR_VV0UUU "vector fp convert from logical" arch13 zarch -+e700000020c1 vcelfb VRR_VV0UU "vector fp convert from logical 32 bit" arch13 zarch -+e700000820c1 wcelfb VRR_VV0UU8 "vector fp convert from logical 32 bit" arch13 zarch -+ -+e700000000c2 vcsfp VRR_VV0UUU "vector fp convert to fixed" arch13 zarch -+e700000020c2 vcfeb VRR_VV0UU "vector fp convert to fixed 32 bit" arch13 zarch -+e700000820c2 wcfeb VRR_VV0UU8 "vector fp convert to fixed 32 bit" arch13 zarch -+ -+e700000000c0 vclfp VRR_VV0UUU "vector fp convert to logical" arch13 zarch -+e700000020c0 vclfeb VRR_VV0UU "vector fp convert to logical 32 bit" arch13 zarch -+e700000820c0 wclfeb VRR_VV0UU8 "vector fp convert to logical 32 bit" arch13 zarch -+ -+# Deflate conversion facility -+ -+b939 dfltcc RRF_R0RR2 "deflate conversion call" arch13 zarch -+ -+# Enhanced-Sort Facility -+ -+b938 sortl RRE_RR "sort lists" arch13 zarch -+ -+# Vector packed decimal enhancement facility - --b938 sortl RRE_RR " " arch13 zarch -+e60000000050 vcvb VRR_RV0UU "vector convert to binary 32 bit" arch13 zarch optparm -+e60000000052 vcvbg VRR_RV0UU "vector convert to binary 64 bit" arch13 zarch optparm - --e60000000050 vcvb VRR_RV0UU " " arch13 zarch optparm --e60000000052 vcvbg VRR_RV0UU " " arch13 zarch optparm -+# Message Security Assist Extension 9 - --b93a kdsa RRE_RR " " arch13 zarch -+b93a kdsa RRE_RR "compute digital signature authentication" arch13 zarch -Only in binutils-2.30/opcodes: s390-opc.txt.orig diff --git a/SOURCES/binutils-warnings.patch b/SOURCES/binutils-warnings.patch new file mode 100644 index 0000000..6f3d32d --- /dev/null +++ b/SOURCES/binutils-warnings.patch @@ -0,0 +1,158 @@ +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 6ecfab5d..f8698213 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -4914,7 +4914,7 @@ display_debug_lines_decoded (struct dwarf_section * section, + else + { + newFileName = (char *) xmalloc (fileNameLength + 1); +- strncpy (newFileName, fileName, fileNameLength + 1); ++ strcpy (newFileName, fileName); + } + + if (!do_wide || (fileNameLength <= MAX_FILENAME_LENGTH)) +diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c +index 3639bfbf..ed080a1a 100644 +--- a/libiberty/cp-demangle.c ++++ b/libiberty/cp-demangle.c +@@ -185,20 +185,6 @@ static void d_init_info (const char *, int, size_t, struct d_info *); + #define CP_STATIC_IF_GLIBCPP_V3 + #endif /* ! defined(IN_GLIBCPP_V3) */ + +-/* See if the compiler supports dynamic arrays. */ +- +-#ifdef __GNUC__ +-#define CP_DYNAMIC_ARRAYS +-#else +-#ifdef __STDC__ +-#ifdef __STDC_VERSION__ +-#if __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__ +-#define CP_DYNAMIC_ARRAYS +-#endif /* __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__ */ +-#endif /* defined (__STDC_VERSION__) */ +-#endif /* defined (__STDC__) */ +-#endif /* ! defined (__GNUC__) */ +- + /* We avoid pulling in the ctype tables, to prevent pulling in + additional unresolved symbols when this code is used in a library. + FIXME: Is this really a valid reason? This comes from the original +@@ -4343,29 +4329,21 @@ cplus_demangle_print_callback (int options, + d_print_init (&dpi, callback, opaque, dc); + + { +-#ifdef CP_DYNAMIC_ARRAYS +- /* Avoid zero-length VLAs, which are prohibited by the C99 standard +- and flagged as errors by Address Sanitizer. */ +- __extension__ struct d_saved_scope scopes[(dpi.num_saved_scopes > 0) +- ? dpi.num_saved_scopes : 1]; +- __extension__ struct d_print_template temps[(dpi.num_copy_templates > 0) +- ? dpi.num_copy_templates : 1]; +- +- dpi.saved_scopes = scopes; +- dpi.copy_templates = temps; +-#else +- dpi.saved_scopes = alloca (dpi.num_saved_scopes +- * sizeof (*dpi.saved_scopes)); +- dpi.copy_templates = alloca (dpi.num_copy_templates +- * sizeof (*dpi.copy_templates)); +-#endif +- ++ dpi.saved_scopes ++ = (struct d_saved_scope *) xmalloc (dpi.num_saved_scopes ++ * sizeof (*dpi.saved_scopes)); ++ dpi.copy_templates ++ = (struct d_print_template *) xmalloc (dpi.num_copy_templates ++ * sizeof (*dpi.copy_templates)); + d_print_comp (&dpi, options, dc); + } + + d_print_flush (&dpi); + +- return ! d_print_saw_error (&dpi); ++ int retval = ! d_print_saw_error (&dpi); ++ free (dpi.saved_scopes); ++ free (dpi.copy_templates); ++ return retval; + } + + /* Turn components into a human readable string. OPTIONS is the +@@ -6307,16 +6285,12 @@ d_demangle_callback (const char *mangled, int options, + } + + { +-#ifdef CP_DYNAMIC_ARRAYS +- __extension__ struct demangle_component comps[di.num_comps]; +- __extension__ struct demangle_component *subs[di.num_subs]; +- +- di.comps = comps; +- di.subs = subs; +-#else +- di.comps = alloca (di.num_comps * sizeof (*di.comps)); +- di.subs = alloca (di.num_subs * sizeof (*di.subs)); +-#endif ++ di.comps ++ = (struct demangle_component *) xmalloc (di.num_comps ++ * sizeof (*di.comps)); ++ di.subs ++ = (struct demangle_component **) xmalloc (di.num_subs ++ * sizeof (*di.subs)); + + switch (type) + { +@@ -6357,6 +6331,8 @@ d_demangle_callback (const char *mangled, int options, + : 0; + } + ++ free (di.comps); ++ free (di.subs); + return status; + } + +@@ -6588,16 +6564,12 @@ is_ctor_or_dtor (const char *mangled, + cplus_demangle_init_info (mangled, DMGL_GNU_V3, strlen (mangled), &di); + + { +-#ifdef CP_DYNAMIC_ARRAYS +- __extension__ struct demangle_component comps[di.num_comps]; +- __extension__ struct demangle_component *subs[di.num_subs]; +- +- di.comps = comps; +- di.subs = subs; +-#else +- di.comps = alloca (di.num_comps * sizeof (*di.comps)); +- di.subs = alloca (di.num_subs * sizeof (*di.subs)); +-#endif ++ di.comps ++ = (struct demangle_component *) xmalloc (di.num_comps ++ * sizeof (*di.comps)); ++ di.subs ++ = (struct demangle_component **) xmalloc (di.num_subs ++ * sizeof (*di.subs)); + + dc = cplus_demangle_mangled_name (&di, 1); + +@@ -6640,6 +6612,8 @@ is_ctor_or_dtor (const char *mangled, + } + } + ++ free (di.comps); ++ free (di.subs); + return ret; + } + +diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c +index e3f9f920..5dbe6f89 100644 +--- a/libiberty/make-relative-prefix.c ++++ b/libiberty/make-relative-prefix.c +@@ -259,10 +259,7 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, + #ifdef HAVE_HOST_EXECUTABLE_SUFFIX + len += strlen (HOST_EXECUTABLE_SUFFIX); + #endif +- if (len < MAX_ALLOCA_SIZE) +- nstore = (char *) alloca (len); +- else +- alloc_ptr = nstore = (char *) malloc (len); ++ alloc_ptr = nstore = (char *) malloc (len); + + startp = endp = temp; + while (1) diff --git a/SOURCES/binutils-x86-JCC-Errata.patch b/SOURCES/binutils-x86-JCC-Errata.patch deleted file mode 100644 index ef6e118..0000000 --- a/SOURCES/binutils-x86-JCC-Errata.patch +++ /dev/null @@ -1,3747 +0,0 @@ -diff -rupN binutils-2.32/gas/config/tc-i386.c binutils.new/gas/config/tc-i386.c ---- binutils-2.32/gas/config/tc-i386.c 2019-01-19 16:01:33.000000000 +0000 -+++ binutils.new/gas/config/tc-i386.c 2019-11-25 14:01:00.626325922 +0000 -@@ -351,6 +351,9 @@ struct _i386_insn - /* Has ZMM register operands. */ - bfd_boolean has_regzmm; - -+ /* Has GOTPC relocation. */ -+ bfd_boolean has_gotpc_reloc; -+ - /* RM and SIB are the modrm byte and the sib byte where the - addressing modes of this insn are encoded. */ - modrm_byte rm; -@@ -545,6 +548,8 @@ static enum flag_code flag_code; - static unsigned int object_64bit; - static unsigned int disallow_64bit_reloc; - static int use_rela_relocations = 0; -+/* __tls_get_addr/___tls_get_addr symbol for TLS. */ -+static const char *tls_get_addr; - - #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ - || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \ -@@ -605,6 +610,21 @@ static int omit_lock_prefix = 0; - "lock addl $0, (%{re}sp)". */ - static int avoid_fence = 0; - -+/* Type of the previous instruction. */ -+static struct -+ { -+ segT seg; -+ const char *file; -+ const char *name; -+ unsigned int line; -+ enum last_insn_kind -+ { -+ last_insn_other = 0, -+ last_insn_directive, -+ last_insn_prefix -+ } kind; -+ } last_insn; -+ - /* 1 if the assembler should generate relax relocations. */ - - static int generate_relax_relocations -@@ -618,6 +638,31 @@ static enum check_kind - } - sse_check, operand_check = check_warning; - -+/* Non-zero if branches should be aligned within power of 2 boundary. */ -+static int align_branch_power = 0; -+ -+/* Types of branches to align. */ -+enum align_branch_kind -+ { -+ align_branch_none = 0, -+ align_branch_jcc = 1 << 0, -+ align_branch_fused = 1 << 1, -+ align_branch_jmp = 1 << 2, -+ align_branch_call = 1 << 3, -+ align_branch_indirect = 1 << 4, -+ align_branch_ret = 1 << 5 -+ }; -+ -+static unsigned int align_branch = (align_branch_jcc -+ | align_branch_fused -+ | align_branch_jmp); -+ -+/* The maximum padding size for fused jcc. */ -+#define MAX_FUSED_JCC_PADDING_SIZE 20 -+ -+/* The maximum number of prefixes added for an instruction. */ -+static unsigned int align_branch_prefix_size = 5; -+ - /* Optimization: - 1. Clear the REX_W bit with register operand if possible. - 2. Above plus use 128bit vector instruction to clear the full vector -@@ -721,12 +766,19 @@ int x86_cie_data_alignment; - /* Interface to relax_segment. - There are 3 major relax states for 386 jump insns because the - different types of jumps add different sizes to frags when we're -- figuring out what sort of jump to choose to reach a given label. */ -+ figuring out what sort of jump to choose to reach a given label. -+ -+ BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING are used to align -+ branches which are handled by md_estimate_size_before_relax() and -+ i386_generic_table_relax_frag(). */ - - /* Types. */ - #define UNCOND_JUMP 0 - #define COND_JUMP 1 - #define COND_JUMP86 2 -+#define BRANCH_PADDING 3 -+#define BRANCH_PREFIX 4 -+#define FUSED_JCC_PADDING 5 - - /* Sizes. */ - #define CODE16 1 -@@ -1345,6 +1397,12 @@ i386_generate_nops (fragS *fragP, char * - case rs_fill_nop: - case rs_align_code: - break; -+ case rs_machine_dependent: -+ /* Allow NOP padding for jumps and calls. */ -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) -+ break; -+ /* Fall through. */ - default: - return; - } -@@ -1489,7 +1547,7 @@ i386_generate_nops (fragS *fragP, char * - return; - } - } -- else -+ else if (fragP->fr_type != rs_machine_dependent) - fragP->fr_var = count; - - if ((count / max_single_nop_size) > max_number_of_nops) -@@ -2957,6 +3015,11 @@ md_begin (void) - x86_dwarf2_return_column = 8; - x86_cie_data_alignment = -4; - } -+ -+ /* NB: FUSED_JCC_PADDING frag must have sufficient room so that it -+ can be turned into BRANCH_PREFIX frag. */ -+ if (align_branch_prefix_size > MAX_FUSED_JCC_PADDING_SIZE) -+ abort (); - } - - void -@@ -4386,6 +4449,17 @@ md_assemble (char *line) - - /* We are ready to output the insn. */ - output_insn (); -+ -+ last_insn.seg = now_seg; -+ -+ if (i.tm.opcode_modifier.isprefix) -+ { -+ last_insn.kind = last_insn_prefix; -+ last_insn.name = i.tm.name; -+ last_insn.file = as_where (&last_insn.line); -+ } -+ else -+ last_insn.kind = last_insn_other; - } - - static char * -@@ -8001,11 +8075,202 @@ x86_cleanup (void) - } - #endif - -+/* Return 1 for test, and, cmp, add, sub, inc and dec which may -+ be macro-fused with conditional jumps. */ -+ -+static int -+maybe_fused_with_jcc_p (void) -+{ -+ /* No RIP address. */ -+ if (i.base_reg && i.base_reg->reg_num == RegIP) -+ return 0; -+ -+ /* and, add, sub with destination register. */ -+ if (!strcmp (i.tm.name, "and") -+ || !strcmp (i.tm.name, "add") -+ || !strcmp (i.tm.name, "sub")) -+ return i.types[1].bitfield.reg; -+ -+ /* test, cmp with any register. */ -+ if (!strcmp (i.tm.name, "test") || !strcmp (i.tm.name, "cmp")) -+ return (i.types[0].bitfield.reg -+ || i.types[1].bitfield.reg); -+ -+ /* inc, dec with 16/32/64-bit register. */ -+ if (!strcmp (i.tm.name, "inc") || !strcmp (i.tm.name, "dec")) -+ return i.types[0].bitfield.reg; -+ -+ return 0; -+} -+ -+/* Return 1 if a FUSED_JCC_PADDING frag should be generated. */ -+ -+static int -+add_fused_jcc_padding_frag_p (void) -+{ -+ if (!align_branch_power -+ || now_seg == absolute_section -+ || !cpu_arch_flags.bitfield.cpui386 -+ || !(align_branch & align_branch_fused)) -+ return 0; -+ -+ if (maybe_fused_with_jcc_p ()) -+ { -+ if (last_insn.kind != last_insn_other -+ && last_insn.seg == now_seg) -+ { -+ if (flag_debug) -+ as_warn_where (last_insn.file, last_insn.line, -+ _("`%s` skips -malign-branch-boundary on `%s`"), -+ last_insn.name, i.tm.name); -+ return 0; -+ } -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* Return 1 if a BRANCH_PREFIX frag should be generated. */ -+ -+static int -+add_branch_prefix_frag_p (void) -+{ -+ if (!align_branch_power -+ || now_seg == absolute_section -+ || i.tm.cpu_flags.bitfield.cpupadlock -+ || !cpu_arch_flags.bitfield.cpui386) -+ return 0; -+ -+ /* Don't add prefix if it is a prefix or there is no operand. */ -+ if (!i.operands || i.tm.opcode_modifier.isprefix) -+ return 0; -+ -+ if (last_insn.kind != last_insn_other -+ && last_insn.seg == now_seg) -+ { -+ if (flag_debug) -+ as_warn_where (last_insn.file, last_insn.line, -+ _("`%s` skips -malign-branch-boundary on `%s`"), -+ last_insn.name, i.tm.name); -+ return 0; -+ } -+ -+ return 1; -+} -+ -+/* Return 1 if a BRANCH_PADDING frag should be generated. */ -+ -+static int -+add_branch_padding_frag_p (enum align_branch_kind *branch_p) -+{ -+ int add_padding; -+ -+ if (!align_branch_power -+ || now_seg == absolute_section -+ || !cpu_arch_flags.bitfield.cpui386) -+ return 0; -+ -+ add_padding = 0; -+ -+ /* Check for jcc and direct jmp. */ -+ if (i.tm.opcode_modifier.jump) -+ { -+ if (i.tm.base_opcode == JUMP_PC_RELATIVE) -+ { -+ *branch_p = align_branch_jmp; -+ add_padding = align_branch & align_branch_jmp; -+ } -+ else -+ { -+ *branch_p = align_branch_jcc; -+ if ((align_branch & align_branch_jcc)) -+ add_padding = 1; -+ } -+ } -+ else if (i.tm.base_opcode == 0xc2 -+ || i.tm.base_opcode == 0xc3 -+ || i.tm.base_opcode == 0xca -+ || i.tm.base_opcode == 0xcb) -+ { -+ *branch_p = align_branch_ret; -+ if ((align_branch & align_branch_ret)) -+ add_padding = 1; -+ } -+ else -+ { -+ if (i.tm.base_opcode == 0xe8) -+ { -+ *branch_p = align_branch_call; -+ if ((align_branch & align_branch_call)) -+ add_padding = 1; -+ } -+ else if (i.tm.base_opcode == 0xff -+ && (i.rm.reg == 2 || i.rm.reg == 4)) -+ { -+ *branch_p = align_branch_indirect; -+ if ((align_branch & align_branch_indirect)) -+ add_padding = 1; -+ } -+ -+ /* Check for indirect jmp, direct and indirect calls. */ -+ if (add_padding -+ && i.disp_operands -+ && tls_get_addr -+ && (i.op[0].disps->X_op == O_symbol -+ || (i.op[0].disps->X_op == O_subtract -+ && i.op[0].disps->X_op_symbol == GOT_symbol))) -+ { -+ symbolS *s = i.op[0].disps->X_add_symbol; -+ /* No padding to call to global or undefined tls_get_addr. */ -+ if ((S_IS_EXTERNAL (s) || !S_IS_DEFINED (s)) -+ && strcmp (S_GET_NAME (s), tls_get_addr) == 0) -+ return 0; -+ } -+ } -+ -+ if (add_padding -+ && last_insn.kind != last_insn_other -+ && last_insn.seg == now_seg) -+ { -+ if (flag_debug) -+ as_warn_where (last_insn.file, last_insn.line, -+ _("`%s` skips -malign-branch-boundary on `%s`"), -+ last_insn.name, i.tm.name); -+ return 0; -+ } -+ -+ return add_padding; -+} -+ -+static unsigned int -+encoding_length (const fragS *start_frag, offsetT start_off, -+ const char *frag_now_ptr) -+{ -+ unsigned int len = 0; -+ -+ if (start_frag != frag_now) -+ { -+ const fragS *fr = start_frag; -+ -+ do -+ { -+ len += fr->fr_fix; -+ fr = fr->fr_next; -+ } -+ while (fr && fr != frag_now); -+ } -+ -+ return len - start_off + (frag_now_ptr - frag_now->fr_literal); -+} -+ - static void - output_insn (void) - { - fragS *insn_start_frag; - offsetT insn_start_off; -+ fragS *fragP = NULL; -+ enum align_branch_kind branch = align_branch_none; - - #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) - if (IS_ELF && x86_used_note) -@@ -8100,6 +8365,30 @@ output_insn (void) - insn_start_frag = frag_now; - insn_start_off = frag_now_fix (); - -+ if (add_branch_padding_frag_p (&branch)) -+ { -+ char *p; -+ unsigned int max_branch_padding_size = 14; -+ -+ /* Align section to boundary. */ -+ record_alignment (now_seg, align_branch_power); -+ -+ /* Make room for padding. */ -+ frag_grow (max_branch_padding_size); -+ -+ /* Start of the padding. */ -+ p = frag_more (0); -+ -+ fragP = frag_now; -+ -+ frag_var (rs_machine_dependent, max_branch_padding_size, 0, -+ ENCODE_RELAX_STATE (BRANCH_PADDING, 0), -+ NULL, 0, p); -+ -+ fragP->tc_frag_data.branch_type = branch; -+ fragP->tc_frag_data.max_bytes = max_branch_padding_size; -+ } -+ - /* Output jumps. */ - if (i.tm.opcode_modifier.jump) - output_branch (); -@@ -8141,6 +8430,44 @@ output_insn (void) - i.prefix[LOCK_PREFIX] = 0; - } - -+ if (branch) -+ /* Skip if this is a branch. */ -+ ; -+ else if (add_fused_jcc_padding_frag_p ()) -+ { -+ unsigned int max_fused_padding_size -+ = MAX_FUSED_JCC_PADDING_SIZE; -+ -+ /* Make room for padding. */ -+ frag_grow (max_fused_padding_size); -+ p = frag_more (0); -+ -+ fragP = frag_now; -+ -+ frag_var (rs_machine_dependent, max_fused_padding_size, 0, -+ ENCODE_RELAX_STATE (FUSED_JCC_PADDING, 0), -+ NULL, 0, p); -+ -+ fragP->tc_frag_data.branch_type = align_branch_fused; -+ fragP->tc_frag_data.max_bytes = max_fused_padding_size; -+ } -+ else if (add_branch_prefix_frag_p ()) -+ { -+ unsigned int max_prefix_size = align_branch_prefix_size; -+ -+ /* Make room for padding. */ -+ frag_grow (max_prefix_size); -+ p = frag_more (0); -+ -+ fragP = frag_now; -+ -+ frag_var (rs_machine_dependent, max_prefix_size, 0, -+ ENCODE_RELAX_STATE (BRANCH_PREFIX, 0), -+ NULL, 0, p); -+ -+ fragP->tc_frag_data.max_bytes = max_prefix_size; -+ } -+ - /* Since the VEX/EVEX prefix contains the implicit prefix, we - don't need the explicit prefix. */ - if (!i.tm.opcode_modifier.vex && !i.tm.opcode_modifier.evex) -@@ -8276,6 +8603,88 @@ output_insn (void) - - if (i.imm_operands) - output_imm (insn_start_frag, insn_start_off); -+ -+ /* -+ * frag_now_fix () returning plain abs_section_offset when we're in the -+ * absolute section, and abs_section_offset not getting updated as data -+ * gets added to the frag breaks the logic below. -+ */ -+ if (now_seg != absolute_section) -+ { -+ j = encoding_length (insn_start_frag, insn_start_off, frag_more (0)); -+ if (fragP) -+ { -+ /* NB: Don't add prefix with GOTPC relocation since -+ output_disp() above depends on the fixed encoding -+ length. */ -+ unsigned int max = i.has_gotpc_reloc ? 0 : 15 - j; -+ /* Prefix count on the current instruction. */ -+ unsigned int count = !!is_any_vex_encoding (&i.tm); -+ unsigned int k; -+ for (k = 0; k < ARRAY_SIZE (i.prefix); k++) -+ if (i.prefix[k]) -+ count++; -+ -+ /* NB: prefix count + instruction size must be <= 15. */ -+ if (j > 15) -+ as_fatal (_("instruction length of %u bytes exceeds the limit of 15"), -+ j); -+ -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) -+ == BRANCH_PREFIX) -+ { -+ /* Set the maximum prefix size in BRANCH_PREFIX -+ frag. */ -+ if (fragP->tc_frag_data.max_bytes > max) -+ fragP->tc_frag_data.max_bytes = max; -+ if (fragP->tc_frag_data.max_bytes > count) -+ fragP->tc_frag_data.max_bytes -= count; -+ else -+ fragP->tc_frag_data.max_bytes = 0; -+ } -+ else -+ { -+ /* Remember the maximum prefix size in FUSED_JCC_PADDING -+ frag. */ -+ unsigned int max_prefix_size; -+ if (align_branch_prefix_size > max) -+ max_prefix_size = max; -+ else -+ max_prefix_size = align_branch_prefix_size; -+ if (max_prefix_size > count) -+ fragP->tc_frag_data.max_prefix_length -+ = max_prefix_size - count; -+ } -+ -+ /* Use existing segment prefix if possible. Use CS -+ segment prefix in 64-bit mode. In 32-bit mode, use SS -+ segment prefix with ESP/EBP base register and use DS -+ segment prefix without ESP/EBP base register. */ -+ if (i.prefix[SEG_PREFIX]) -+ fragP->tc_frag_data.default_prefix = i.prefix[SEG_PREFIX]; -+ else if (flag_code == CODE_64BIT) -+ fragP->tc_frag_data.default_prefix = CS_PREFIX_OPCODE; -+ else if (i.base_reg -+ && (i.base_reg->reg_num == 4 -+ || i.base_reg->reg_num == 5)) -+ fragP->tc_frag_data.default_prefix = SS_PREFIX_OPCODE; -+ else -+ fragP->tc_frag_data.default_prefix = DS_PREFIX_OPCODE; -+ } -+ else if (j > 15) -+ as_warn (_("instruction length of %u bytes exceeds the limit of 15"), -+ j); -+ } -+ } -+ -+ if (align_branch_power -+ && now_seg != absolute_section -+ && cpu_arch_flags.bitfield.cpui386) -+ { -+ /* Terminate each frag so that we can add prefix and check for -+ fused jcc. */ -+ frag_wane (frag_now); -+ frag_new (0); - } - - #ifdef DEBUG386 -@@ -8402,6 +8811,7 @@ output_disp (fragS *insn_start_frag, off - if (!object_64bit) - { - reloc_type = BFD_RELOC_386_GOTPC; -+ i.has_gotpc_reloc = TRUE; - i.op[n].imms->X_add_number += add; - } - else if (reloc_type == BFD_RELOC_64) -@@ -8568,6 +8978,7 @@ output_imm (fragS *insn_start_frag, offs - reloc_type = BFD_RELOC_X86_64_GOTPC32; - else if (size == 8) - reloc_type = BFD_RELOC_X86_64_GOTPC64; -+ i.has_gotpc_reloc = TRUE; - i.op[n].imms->X_add_number += add; - } - fix_new_exp (frag_now, p - frag_now->fr_literal, size, -@@ -10193,6 +10604,355 @@ elf_symbol_resolved_in_segment_p (symbol - } - #endif - -+/* Return the next non-empty frag. */ -+ -+static fragS * -+i386_next_non_empty_frag (fragS *fragP) -+{ -+ /* There may be a frag with a ".fill 0" when there is no room in -+ the current frag for frag_grow in output_insn. */ -+ for (fragP = fragP->fr_next; -+ (fragP != NULL -+ && fragP->fr_type == rs_fill -+ && fragP->fr_fix == 0); -+ fragP = fragP->fr_next) -+ ; -+ return fragP; -+} -+ -+/* Return the next jcc frag after BRANCH_PADDING. */ -+ -+static fragS * -+i386_next_jcc_frag (fragS *fragP) -+{ -+ if (!fragP) -+ return NULL; -+ -+ if (fragP->fr_type == rs_machine_dependent -+ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) -+ == BRANCH_PADDING)) -+ { -+ fragP = i386_next_non_empty_frag (fragP); -+ if (fragP->fr_type != rs_machine_dependent) -+ return NULL; -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == COND_JUMP) -+ return fragP; -+ } -+ -+ return NULL; -+} -+ -+/* Classify BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags. */ -+ -+static void -+i386_classify_machine_dependent_frag (fragS *fragP) -+{ -+ fragS *cmp_fragP; -+ fragS *pad_fragP; -+ fragS *branch_fragP; -+ fragS *next_fragP; -+ unsigned int max_prefix_length; -+ -+ if (fragP->tc_frag_data.classified) -+ return; -+ -+ /* First scan for BRANCH_PADDING and FUSED_JCC_PADDING. Convert -+ FUSED_JCC_PADDING and merge BRANCH_PADDING. */ -+ for (next_fragP = fragP; -+ next_fragP != NULL; -+ next_fragP = next_fragP->fr_next) -+ { -+ next_fragP->tc_frag_data.classified = 1; -+ if (next_fragP->fr_type == rs_machine_dependent) -+ switch (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)) -+ { -+ case BRANCH_PADDING: -+ /* The BRANCH_PADDING frag must be followed by a branch -+ frag. */ -+ branch_fragP = i386_next_non_empty_frag (next_fragP); -+ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP; -+ break; -+ case FUSED_JCC_PADDING: -+ /* Check if this is a fused jcc: -+ FUSED_JCC_PADDING -+ CMP -+ BRANCH_PADDING -+ COND_JUMP -+ */ -+ cmp_fragP = i386_next_non_empty_frag (next_fragP); -+ pad_fragP = i386_next_non_empty_frag (cmp_fragP); -+ branch_fragP = i386_next_jcc_frag (pad_fragP); -+ if (branch_fragP) -+ { -+ /* The BRANCH_PADDING frag is merged with the -+ FUSED_JCC_PADDING frag. */ -+ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP; -+ /* CMP instruction size. */ -+ next_fragP->tc_frag_data.cmp_size = cmp_fragP->fr_fix; -+ frag_wane (pad_fragP); -+ /* Skip to branch_fragP. */ -+ next_fragP = branch_fragP; -+ } -+ else if (next_fragP->tc_frag_data.max_prefix_length) -+ { -+ /* Turn FUSED_JCC_PADDING into BRANCH_PREFIX if it isn't -+ a fused jcc. */ -+ next_fragP->fr_subtype -+ = ENCODE_RELAX_STATE (BRANCH_PREFIX, 0); -+ next_fragP->tc_frag_data.max_bytes -+ = next_fragP->tc_frag_data.max_prefix_length; -+ /* This will be updated in the BRANCH_PREFIX scan. */ -+ next_fragP->tc_frag_data.max_prefix_length = 0; -+ } -+ else -+ frag_wane (next_fragP); -+ break; -+ } -+ } -+ -+ /* Scan for BRANCH_PREFIX. */ -+ for (; fragP != NULL; fragP = fragP->fr_next) -+ if (fragP->fr_type == rs_machine_dependent -+ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) -+ == BRANCH_PREFIX)) -+ { -+ /* Count all BRANCH_PREFIX frags before BRANCH_PADDING and -+ COND_JUMP_PREFIX. */ -+ max_prefix_length = 0; -+ for (next_fragP = fragP; -+ next_fragP != NULL; -+ next_fragP = next_fragP->fr_next) -+ { -+ if (next_fragP->fr_type == rs_fill) -+ /* Skip rs_fill frags. */ -+ ; -+ else if (next_fragP->fr_type == rs_machine_dependent) -+ { -+ if (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) -+ == BRANCH_PREFIX) -+ { -+ /* Count BRANCH_PREFIX frags. */ -+ if (max_prefix_length >= MAX_FUSED_JCC_PADDING_SIZE) -+ { -+ max_prefix_length = MAX_FUSED_JCC_PADDING_SIZE; -+ frag_wane (next_fragP); -+ } -+ else -+ max_prefix_length -+ += next_fragP->tc_frag_data.max_bytes; -+ } -+ else if ((TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) -+ == BRANCH_PADDING) -+ || (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) -+ == FUSED_JCC_PADDING)) -+ { -+ /* Stop at BRANCH_PADDING and FUSED_JCC_PADDING. */ -+ fragP->tc_frag_data.u.padding_fragP = next_fragP; -+ break; -+ } -+ else -+ /* Stop for other rs_machine_dependent frags. */ -+ break; -+ } -+ else -+ /* Stop for all other frags. */ -+ break; -+ } -+ -+ fragP->tc_frag_data.max_prefix_length = max_prefix_length; -+ -+ /* Skip to the next frag. */ -+ fragP = next_fragP; -+ } -+} -+ -+/* Compute padding size for -+ -+ FUSED_JCC_PADDING -+ CMP -+ BRANCH_PADDING -+ COND_JUMP/UNCOND_JUMP -+ -+ or -+ -+ BRANCH_PADDING -+ COND_JUMP/UNCOND_JUMP -+ */ -+ -+static int -+i386_branch_padding_size (fragS *fragP, offsetT address) -+{ -+ unsigned int offset, size, padding_size; -+ fragS *branch_fragP = fragP->tc_frag_data.u.branch_fragP; -+ -+ /* The start address of the BRANCH_PADDING or FUSED_JCC_PADDING frag. */ -+ if (!address) -+ address = fragP->fr_address; -+ address += fragP->fr_fix; -+ -+ /* CMP instrunction size. */ -+ size = fragP->tc_frag_data.cmp_size; -+ -+ /* The base size of the branch frag. */ -+ size += branch_fragP->fr_fix; -+ -+ /* Add opcode and displacement bytes for the rs_machine_dependent -+ branch frag. */ -+ if (branch_fragP->fr_type == rs_machine_dependent) -+ size += md_relax_table[branch_fragP->fr_subtype].rlx_length; -+ -+ /* Check if branch is within boundary and doesn't end at the last -+ byte. */ -+ offset = address & ((1U << align_branch_power) - 1); -+ if ((offset + size) >= (1U << align_branch_power)) -+ /* Padding needed to avoid crossing boundary. */ -+ padding_size = (1 << align_branch_power) - offset; -+ else -+ /* No padding needed. */ -+ padding_size = 0; -+ -+ if (!fits_in_signed_byte (padding_size)) -+ abort (); -+ -+ return padding_size; -+} -+ -+/* i386_generic_table_relax_frag() -+ -+ Handle BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags to -+ grow/shrink padding to align branch frags. Hand others to -+ relax_frag(). */ -+ -+long -+i386_generic_table_relax_frag (segT segment, fragS *fragP, long stretch) -+{ -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) -+ { -+ long padding_size = i386_branch_padding_size (fragP, 0); -+ long grow = padding_size - fragP->tc_frag_data.length; -+ -+ /* When the BRANCH_PREFIX frag is used, the computed address -+ must match the actual address and there should be no padding. */ -+ if (fragP->tc_frag_data.padding_address -+ && (fragP->tc_frag_data.padding_address != fragP->fr_address -+ || padding_size)) -+ abort (); -+ -+ /* Update the padding size. */ -+ if (grow) -+ fragP->tc_frag_data.length = padding_size; -+ -+ return grow; -+ } -+ else if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) -+ { -+ fragS *padding_fragP, *next_fragP; -+ long padding_size, left_size, last_size; -+ -+ padding_fragP = fragP->tc_frag_data.u.padding_fragP; -+ if (!padding_fragP) -+ /* Use the padding set by the leading BRANCH_PREFIX frag. */ -+ return (fragP->tc_frag_data.length -+ - fragP->tc_frag_data.last_length); -+ -+ /* Compute the relative address of the padding frag in the very -+ first time where the BRANCH_PREFIX frag sizes are zero. */ -+ if (!fragP->tc_frag_data.padding_address) -+ fragP->tc_frag_data.padding_address -+ = padding_fragP->fr_address - (fragP->fr_address - stretch); -+ -+ /* First update the last length from the previous interation. */ -+ left_size = fragP->tc_frag_data.prefix_length; -+ for (next_fragP = fragP; -+ next_fragP != padding_fragP; -+ next_fragP = next_fragP->fr_next) -+ if (next_fragP->fr_type == rs_machine_dependent -+ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) -+ == BRANCH_PREFIX)) -+ { -+ if (left_size) -+ { -+ int max = next_fragP->tc_frag_data.max_bytes; -+ if (max) -+ { -+ int size; -+ if (max > left_size) -+ size = left_size; -+ else -+ size = max; -+ left_size -= size; -+ next_fragP->tc_frag_data.last_length = size; -+ } -+ } -+ else -+ next_fragP->tc_frag_data.last_length = 0; -+ } -+ -+ /* Check the padding size for the padding frag. */ -+ padding_size = i386_branch_padding_size -+ (padding_fragP, (fragP->fr_address -+ + fragP->tc_frag_data.padding_address)); -+ -+ last_size = fragP->tc_frag_data.prefix_length; -+ /* Check if there is change from the last interation. */ -+ if (padding_size == last_size) -+ { -+ /* Update the expected address of the padding frag. */ -+ padding_fragP->tc_frag_data.padding_address -+ = (fragP->fr_address + padding_size -+ + fragP->tc_frag_data.padding_address); -+ return 0; -+ } -+ -+ if (padding_size > fragP->tc_frag_data.max_prefix_length) -+ { -+ /* No padding if there is no sufficient room. Clear the -+ expected address of the padding frag. */ -+ padding_fragP->tc_frag_data.padding_address = 0; -+ padding_size = 0; -+ } -+ else -+ /* Store the expected address of the padding frag. */ -+ padding_fragP->tc_frag_data.padding_address -+ = (fragP->fr_address + padding_size -+ + fragP->tc_frag_data.padding_address); -+ -+ fragP->tc_frag_data.prefix_length = padding_size; -+ -+ /* Update the length for the current interation. */ -+ left_size = padding_size; -+ for (next_fragP = fragP; -+ next_fragP != padding_fragP; -+ next_fragP = next_fragP->fr_next) -+ if (next_fragP->fr_type == rs_machine_dependent -+ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) -+ == BRANCH_PREFIX)) -+ { -+ if (left_size) -+ { -+ int max = next_fragP->tc_frag_data.max_bytes; -+ if (max) -+ { -+ int size; -+ if (max > left_size) -+ size = left_size; -+ else -+ size = max; -+ left_size -= size; -+ next_fragP->tc_frag_data.length = size; -+ } -+ } -+ else -+ next_fragP->tc_frag_data.length = 0; -+ } -+ -+ return (fragP->tc_frag_data.length -+ - fragP->tc_frag_data.last_length); -+ } -+ return relax_frag (segment, fragP, stretch); -+} -+ - /* md_estimate_size_before_relax() - - Called just before relax() for rs_machine_dependent frags. The x86 -@@ -10209,6 +10969,14 @@ elf_symbol_resolved_in_segment_p (symbol - int - md_estimate_size_before_relax (fragS *fragP, segT segment) - { -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) -+ { -+ i386_classify_machine_dependent_frag (fragP); -+ return fragP->tc_frag_data.length; -+ } -+ - /* We've already got fragP->fr_subtype right; all we have to do is - check for un-relaxable symbols. On an ELF system, we can't relax - an externally visible symbol, because it may be overridden by a -@@ -10342,6 +11110,106 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNU - unsigned int extension = 0; - offsetT displacement_from_opcode_start; - -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING -+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) -+ { -+ /* Generate nop padding. */ -+ unsigned int size = fragP->tc_frag_data.length; -+ if (size) -+ { -+ if (size > fragP->tc_frag_data.max_bytes) -+ abort (); -+ -+ if (flag_debug) -+ { -+ const char *msg; -+ const char *branch = "branch"; -+ const char *prefix = ""; -+ fragS *padding_fragP; -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) -+ == BRANCH_PREFIX) -+ { -+ padding_fragP = fragP->tc_frag_data.u.padding_fragP; -+ switch (fragP->tc_frag_data.default_prefix) -+ { -+ default: -+ abort (); -+ break; -+ case CS_PREFIX_OPCODE: -+ prefix = " cs"; -+ break; -+ case DS_PREFIX_OPCODE: -+ prefix = " ds"; -+ break; -+ case ES_PREFIX_OPCODE: -+ prefix = " es"; -+ break; -+ case FS_PREFIX_OPCODE: -+ prefix = " fs"; -+ break; -+ case GS_PREFIX_OPCODE: -+ prefix = " gs"; -+ break; -+ case SS_PREFIX_OPCODE: -+ prefix = " ss"; -+ break; -+ } -+ if (padding_fragP) -+ msg = _("%s:%u: add %d%s at 0x%llx to align " -+ "%s within %d-byte boundary\n"); -+ else -+ msg = _("%s:%u: add additional %d%s at 0x%llx to " -+ "align %s within %d-byte boundary\n"); -+ } -+ else -+ { -+ padding_fragP = fragP; -+ msg = _("%s:%u: add %d%s-byte nop at 0x%llx to align " -+ "%s within %d-byte boundary\n"); -+ } -+ -+ if (padding_fragP) -+ switch (padding_fragP->tc_frag_data.branch_type) -+ { -+ case align_branch_jcc: -+ branch = "jcc"; -+ break; -+ case align_branch_fused: -+ branch = "fused jcc"; -+ break; -+ case align_branch_jmp: -+ branch = "jmp"; -+ break; -+ case align_branch_call: -+ branch = "call"; -+ break; -+ case align_branch_indirect: -+ branch = "indiret branch"; -+ break; -+ case align_branch_ret: -+ branch = "ret"; -+ break; -+ default: -+ break; -+ } -+ -+ fprintf (stdout, msg, -+ fragP->fr_file, fragP->fr_line, size, prefix, -+ (long long) fragP->fr_address, branch, -+ 1 << align_branch_power); -+ } -+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) -+ memset (fragP->fr_opcode, -+ fragP->tc_frag_data.default_prefix, size); -+ else -+ i386_generate_nops (fragP, (char *) fragP->fr_opcode, -+ size, 0); -+ fragP->fr_fix += size; -+ } -+ return; -+ } -+ - opcode = (unsigned char *) fragP->fr_opcode; - - /* Address we want to reach in file space. */ -@@ -10898,6 +11766,10 @@ const char *md_shortopts = "qnO::"; - #define OPTION_MFENCE_AS_LOCK_ADD (OPTION_MD_BASE + 24) - #define OPTION_X86_USED_NOTE (OPTION_MD_BASE + 25) - #define OPTION_MVEXWIG (OPTION_MD_BASE + 26) -+#define OPTION_MALIGN_BRANCH_BOUNDARY (OPTION_MD_BASE + 27) -+#define OPTION_MALIGN_BRANCH_PREFIX_SIZE (OPTION_MD_BASE + 28) -+#define OPTION_MALIGN_BRANCH (OPTION_MD_BASE + 29) -+#define OPTION_MBRANCHES_WITH_32B_BOUNDARIES (OPTION_MD_BASE + 30) - - struct option md_longopts[] = - { -@@ -10933,6 +11805,10 @@ struct option md_longopts[] = - {"mfence-as-lock-add", required_argument, NULL, OPTION_MFENCE_AS_LOCK_ADD}, - {"mrelax-relocations", required_argument, NULL, OPTION_MRELAX_RELOCATIONS}, - {"mevexrcig", required_argument, NULL, OPTION_MEVEXRCIG}, -+ {"malign-branch-boundary", required_argument, NULL, OPTION_MALIGN_BRANCH_BOUNDARY}, -+ {"malign-branch-prefix-size", required_argument, NULL, OPTION_MALIGN_BRANCH_PREFIX_SIZE}, -+ {"malign-branch", required_argument, NULL, OPTION_MALIGN_BRANCH}, -+ {"mbranches-within-32B-boundaries", no_argument, NULL, OPTION_MBRANCHES_WITH_32B_BOUNDARIES}, - {"mamd64", no_argument, NULL, OPTION_MAMD64}, - {"mintel64", no_argument, NULL, OPTION_MINTEL64}, - {NULL, no_argument, NULL, 0} -@@ -10943,7 +11819,7 @@ int - md_parse_option (int c, const char *arg) - { - unsigned int j; -- char *arch, *next, *saved; -+ char *arch, *next, *saved, *type; - - switch (c) - { -@@ -11319,6 +12195,86 @@ md_parse_option (int c, const char *arg) - as_fatal (_("invalid -mrelax-relocations= option: `%s'"), arg); - break; - -+ case OPTION_MALIGN_BRANCH_BOUNDARY: -+ { -+ char *end; -+ int align = strtoul (arg, &end, 0); -+ if (*end == '\0') -+ { -+ if (align == 0) -+ { -+ align_branch_power = 0; -+ break; -+ } -+ else if (align >= 32) -+ { -+ int align_power; -+ for (align_power = 0; -+ (align & 1) == 0; -+ align >>= 1, align_power++) -+ continue; -+ if (align == 1) -+ { -+ align_branch_power = align_power; -+ break; -+ } -+ } -+ } -+ as_fatal (_("invalid -malign-branch-boundary= value: %s"), arg); -+ } -+ break; -+ -+ case OPTION_MALIGN_BRANCH_PREFIX_SIZE: -+ { -+ char *end; -+ int align = strtoul (arg, &end, 0); -+ if (*end == '\0' && align >= 0 && align < 6) -+ { -+ align_branch_prefix_size = align; -+ break; -+ } -+ as_fatal (_("invalid -malign-branch-prefix-size= value: %s"), -+ arg); -+ } -+ break; -+ -+ case OPTION_MALIGN_BRANCH: -+ align_branch = 0; -+ saved = xstrdup (arg); -+ type = saved; -+ do -+ { -+ next = strchr (type, '+'); -+ if (next) -+ *next++ = '\0'; -+ if (strcasecmp (type, "jcc") == 0) -+ align_branch |= align_branch_jcc; -+ else if (strcasecmp (type, "fused") == 0) -+ align_branch |= align_branch_fused; -+ else if (strcasecmp (type, "jmp") == 0) -+ align_branch |= align_branch_jmp; -+ else if (strcasecmp (type, "call") == 0) -+ align_branch |= align_branch_call; -+ else if (strcasecmp (type, "ret") == 0) -+ align_branch |= align_branch_ret; -+ else if (strcasecmp (type, "indirect") == 0) -+ align_branch |= align_branch_indirect; -+ else -+ as_fatal (_("invalid -malign-branch= option: `%s'"), arg); -+ type = next; -+ } -+ while (next != NULL); -+ free (saved); -+ break; -+ -+ case OPTION_MBRANCHES_WITH_32B_BOUNDARIES: -+ align_branch_power = 5; -+ align_branch_prefix_size = 5; -+ align_branch = (align_branch_jcc -+ | align_branch_fused -+ | align_branch_jmp); -+ break; -+ - case OPTION_MAMD64: - intel64 = 0; - break; -@@ -11571,6 +12527,20 @@ md_show_usage (FILE *stream) - fprintf (stream, _("\ - generate relax relocations\n")); - fprintf (stream, _("\ -+ -malign-branch-boundary=NUM (default: 0)\n\ -+ align branches within NUM byte boundary\n")); -+ fprintf (stream, _("\ -+ -malign-branch=TYPE[+TYPE...] (default: jcc+fused+jmp)\n\ -+ TYPE is combination of jcc, fused, jmp, call, ret,\n\ -+ indirect\n\ -+ specify types of branches to align\n")); -+ fprintf (stream, _("\ -+ -malign-branch-prefix-size=NUM (default: 5)\n\ -+ align branches with NUM prefixes per instruction\n")); -+ fprintf (stream, _("\ -+ -mbranches-within-32B-boundaries\n\ -+ align branches within 32 byte boundary\n")); -+ fprintf (stream, _("\ - -mamd64 accept only AMD64 ISA [default]\n")); - fprintf (stream, _("\ - -mintel64 accept only Intel64 ISA\n")); -@@ -11654,15 +12624,24 @@ i386_target_format (void) - { - default: - format = ELF_TARGET_FORMAT; -+#ifndef TE_SOLARIS -+ tls_get_addr = "___tls_get_addr"; -+#endif - break; - case X86_64_ABI: - use_rela_relocations = 1; - object_64bit = 1; -+#ifndef TE_SOLARIS -+ tls_get_addr = "__tls_get_addr"; -+#endif - format = ELF_TARGET_FORMAT64; - break; - case X86_64_X32_ABI: - use_rela_relocations = 1; - object_64bit = 1; -+#ifndef TE_SOLARIS -+ tls_get_addr = "__tls_get_addr"; -+#endif - disallow_64bit_reloc = 1; - format = ELF_TARGET_FORMAT32; - break; -@@ -11779,6 +12758,21 @@ s_bss (int ignore ATTRIBUTE_UNUSED) - - #endif - -+/* Remember constant diretive. */ -+ -+void -+i386_cons_worker (int ignore ATTRIBUTE_UNUSED) -+{ -+ if (last_insn.kind != last_insn_directive -+ && (bfd_get_section_flags (NULL, now_seg) & SEC_CODE)) -+ { -+ last_insn.seg = now_seg; -+ last_insn.kind = last_insn_directive; -+ last_insn.name = "constant diretive"; -+ last_insn.file = as_where (&last_insn.line); -+ } -+} -+ - void - i386_validate_fix (fixS *fixp) - { -diff -rupN binutils-2.32/gas/config/tc-i386.h binutils.new/gas/config/tc-i386.h ---- binutils-2.32/gas/config/tc-i386.h 2019-01-19 16:01:33.000000000 +0000 -+++ binutils.new/gas/config/tc-i386.h 2019-11-25 14:01:00.626325922 +0000 -@@ -208,12 +208,19 @@ if ((n) \ - - #define MAX_MEM_FOR_RS_ALIGN_CODE 4095 - -+extern void i386_cons_worker (int); -+#define md_cons_worker(nbytes) i386_cons_worker (nbytes) -+ - void i386_print_statistics (FILE *); - #define tc_print_statistics i386_print_statistics - - extern unsigned int i386_frag_max_var (fragS *); - #define md_frag_max_var i386_frag_max_var - -+extern long i386_generic_table_relax_frag (segT, fragS *, long); -+#define md_generic_table_relax_frag(segment, fragP, stretch) \ -+ i386_generic_table_relax_frag (segment, fragP, stretch) -+ - #define md_number_to_chars number_to_chars_littleendian - - enum processor_type -@@ -248,9 +255,24 @@ extern i386_cpu_flags cpu_arch_isa_flags - - struct i386_tc_frag_data - { -+ union -+ { -+ fragS *padding_fragP; -+ fragS *branch_fragP; -+ } u; -+ addressT padding_address; - enum processor_type isa; - i386_cpu_flags isa_flags; -+ unsigned int max_bytes; - enum processor_type tune; -+ signed char length; -+ signed char last_length; -+ signed char max_prefix_length; -+ signed char prefix_length; -+ signed char default_prefix; -+ signed char cmp_size; -+ unsigned int classified : 1; -+ unsigned int branch_type : 7; - }; - - /* We need to emit the right NOP pattern in .align frags. This is -@@ -261,9 +283,20 @@ struct i386_tc_frag_data - #define TC_FRAG_INIT(FRAGP) \ - do \ - { \ -+ (FRAGP)->tc_frag_data.u.padding_fragP = NULL; \ -+ (FRAGP)->tc_frag_data.padding_address = 0; \ - (FRAGP)->tc_frag_data.isa = cpu_arch_isa; \ - (FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags; \ - (FRAGP)->tc_frag_data.tune = cpu_arch_tune; \ -+ (FRAGP)->tc_frag_data.length = 0; \ -+ (FRAGP)->tc_frag_data.max_bytes = max_chars; \ -+ (FRAGP)->tc_frag_data.last_length = 0; \ -+ (FRAGP)->tc_frag_data.max_prefix_length = 0; \ -+ (FRAGP)->tc_frag_data.prefix_length = 0; \ -+ (FRAGP)->tc_frag_data.default_prefix = 0; \ -+ (FRAGP)->tc_frag_data.cmp_size = 0; \ -+ (FRAGP)->tc_frag_data.classified = 0; \ -+ (FRAGP)->tc_frag_data.branch_type = 0; \ - } \ - while (0) - -diff -rupN binutils-2.32/gas/doc/c-i386.texi binutils.new/gas/doc/c-i386.texi ---- binutils-2.32/gas/doc/c-i386.texi 2019-01-19 16:01:33.000000000 +0000 -+++ binutils.new/gas/doc/c-i386.texi 2019-11-25 14:01:00.615325994 +0000 -@@ -410,6 +410,43 @@ R_X86_64_REX_GOTPCRELX, in 64-bit mode. - relocations. The default can be controlled by a configure option - @option{--enable-x86-relax-relocations}. - -+@cindex @samp{-malign-branch-boundary=} option, i386 -+@cindex @samp{-malign-branch-boundary=} option, x86-64 -+@item -malign-branch-boundary=@var{NUM} -+This option controls how the assembler should align branches with segment -+prefixes or NOP. @var{NUM} must be a power of 2. It should be 0 or -+no less than 32. Branches will be aligned within @var{NUM} byte -+boundary. @option{-malign-branch-boundary=0}, which is the default, -+doesn't align branches. -+ -+@cindex @samp{-malign-branch=} option, i386 -+@cindex @samp{-malign-branch=} option, x86-64 -+@item -malign-branch=@var{TYPE}[+@var{TYPE}...] -+This option specifies types of branches to align. @var{TYPE} is -+combination of @samp{jcc}, which aligns conditional jumps, -+@samp{fused}, which aligns fused conditional jumps, @samp{jmp}, -+which aligns unconditional jumps, @samp{call} which aligns calls, -+@samp{ret}, which aligns rets, @samp{indirect}, which aligns indirect -+jumps and calls. The default is @option{-malign-branch=jcc+fused+jmp}. -+ -+@cindex @samp{-malign-branch-prefix-size=} option, i386 -+@cindex @samp{-malign-branch-prefix-size=} option, x86-64 -+@item -malign-branch-prefix-size=@var{NUM} -+This option specifies the maximum number of prefixes on an instruction -+to align branches. @var{NUM} should be between 0 and 5. The default -+@var{NUM} is 5. -+ -+@cindex @samp{-mbranches-within-32B-boundaries} option, i386 -+@cindex @samp{-mbranches-within-32B-boundaries} option, x86-64 -+@item -mbranches-within-32B-boundaries -+This option aligns conditional jumps, fused conditional jumps and -+unconditional jumps within 32 byte boundary with up to 5 segment prefixes -+on an instruction. It is equivalent to -+@option{-malign-branch-boundary=32} -+@option{-malign-branch=jcc+fused+jmp} -+@option{-malign-branch-prefix-size=5}. -+The default doesn't align branches. -+ - @cindex @samp{-mx86-used-note=} option, i386 - @cindex @samp{-mx86-used-note=} option, x86-64 - @item -mx86-used-note=@var{no} -diff -rupN binutils-2.32/gas/read.c binutils.new/gas/read.c ---- binutils-2.32/gas/read.c 2019-01-19 16:01:33.000000000 +0000 -+++ binutils.new/gas/read.c 2019-11-25 14:01:00.616325988 +0000 -@@ -3976,6 +3976,10 @@ cons_worker (int nbytes, /* 1=.byte, 2=. - md_cons_align (nbytes); - #endif - -+#ifdef md_cons_worker -+ md_cons_worker (nbytes); -+#endif -+ - c = 0; - do - { -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1a.d binutils.new/gas/testsuite/gas/i386/align-branch-1a.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1a.d 2019-11-25 14:01:00.632325883 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: 39 c5 cmp %eax,%ebp -+ 22: 74 5e je 82 -+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) -+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 5d pop %ebp -+ 3e: 5d pop %ebp -+ 3f: 5d pop %ebp -+ 40: 74 40 je 82 -+ 42: 5d pop %ebp -+ 43: 74 3d je 82 -+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) -+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5f: 5d pop %ebp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 78: 5d pop %ebp -+ 79: 5d pop %ebp -+ 7a: 39 c5 cmp %eax,%ebp -+ 7c: 74 04 je 82 -+ 7e: 66 90 xchg %ax,%ax -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a0: 89 75 0c mov %esi,0xc\(%ebp\) -+ a3: e9 [0-9a-f ]+ jmp .* -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ c0: 89 75 00 mov %esi,0x0\(%ebp\) -+ c3: 74 c3 je 88 -+ c5: 74 c1 je 88 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1b.d binutils.new/gas/testsuite/gas/i386/align-branch-1b.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1b.d 2019-11-25 14:01:00.679325573 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: 39 c5 cmp %eax,%ebp -+ 22: 74 5e je 82 -+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) -+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 5d pop %ebp -+ 3e: 5d pop %ebp -+ 3f: 5d pop %ebp -+ 40: 74 40 je 82 -+ 42: 5d pop %ebp -+ 43: 74 3d je 82 -+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) -+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5f: 5d pop %ebp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 78: 5d pop %ebp -+ 79: 5d pop %ebp -+ 7a: 39 c5 cmp %eax,%ebp -+ 7c: 74 04 je 82 -+ 7e: 66 90 xchg %ax,%ax -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a0: 89 75 0c mov %esi,0xc\(%ebp\) -+ a3: e9 [0-9a-f ]+ jmp .* -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ c0: 89 75 00 mov %esi,0x0\(%ebp\) -+ c3: 74 c3 je 88 -+ c5: 74 c1 je 88 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1c.d binutils.new/gas/testsuite/gas/i386/align-branch-1c.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1c.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 -+ 6: 3e 55 ds push %ebp -+ 8: 3e 55 ds push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: 39 c5 cmp %eax,%ebp -+ 22: 74 5e je 82 -+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) -+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 5d pop %ebp -+ 3e: 5d pop %ebp -+ 3f: 5d pop %ebp -+ 40: 74 40 je 82 -+ 42: 5d pop %ebp -+ 43: 74 3d je 82 -+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) -+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5f: 5d pop %ebp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 78: 5d pop %ebp -+ 79: 5d pop %ebp -+ 7a: 39 c5 cmp %eax,%ebp -+ 7c: 74 04 je 82 -+ 7e: 66 90 xchg %ax,%ax -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a0: 89 75 0c mov %esi,0xc\(%ebp\) -+ a3: e9 [0-9a-f ]+ jmp .* -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ c0: 89 75 00 mov %esi,0x0\(%ebp\) -+ c3: 74 c3 je 88 -+ c5: 74 c1 je 88 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1d.d binutils.new/gas/testsuite/gas/i386/align-branch-1d.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1d.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,76 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: 39 c5 cmp %eax,%ebp -+ 22: 74 5b je 7f -+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) -+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 5d pop %ebp -+ 3e: 5d pop %ebp -+ 3f: 5d pop %ebp -+ 40: 74 3d je 7f -+ 42: 5d pop %ebp -+ 43: 74 3a je 7f -+ 45: 89 44 24 fc mov %eax,-0x4\(%esp\) -+ 49: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5e: 5d pop %ebp -+ 5f: eb 24 jmp 85 -+ 61: eb 22 jmp 85 -+ 63: eb 20 jmp 85 -+ 65: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 68: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 74: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 77: 5d pop %ebp -+ 78: 5d pop %ebp -+ 79: 39 c5 cmp %eax,%ebp -+ 7b: 74 02 je 7f -+ 7d: eb 06 jmp 85 -+ 7f: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 82: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9d: 89 75 0c mov %esi,0xc\(%ebp\) -+ a0: e9 [0-9a-f ]+ jmp .* -+ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ bd: 89 75 00 mov %esi,0x0\(%ebp\) -+ c0: 74 c3 je 85 -+ c2: 74 c1 je 85 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1e.d binutils.new/gas/testsuite/gas/i386/align-branch-1e.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1e.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=jcc -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 89 e5 mov %esp,%ebp -+ c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1e: 39 c5 cmp %eax,%ebp -+ 20: 74 5a je 7c -+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) -+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 5d pop %ebp -+ 3b: 5d pop %ebp -+ 3c: 5d pop %ebp -+ 3d: 74 3d je 7c -+ 3f: 5d pop %ebp -+ 40: 74 3a je 7c -+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) -+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5b: 5d pop %ebp -+ 5c: eb 24 jmp 82 -+ 5e: eb 22 jmp 82 -+ 60: eb 20 jmp 82 -+ 62: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 65: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 68: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 74: 5d pop %ebp -+ 75: 5d pop %ebp -+ 76: 39 c5 cmp %eax,%ebp -+ 78: 74 02 je 7c -+ 7a: eb 06 jmp 82 -+ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 7f: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 75 0c mov %esi,0xc\(%ebp\) -+ 9d: e9 [0-9a-f ]+ jmp .* -+ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 75 00 mov %esi,0x0\(%ebp\) -+ bd: 74 c3 je 82 -+ bf: 90 nop -+ c0: 74 c0 je 82 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1f.d binutils.new/gas/testsuite/gas/i386/align-branch-1f.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1f.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 89 e5 mov %esp,%ebp -+ c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1e: 39 c5 cmp %eax,%ebp -+ 20: 74 5c je 7e -+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) -+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 5d pop %ebp -+ 3b: 5d pop %ebp -+ 3c: 5d pop %ebp -+ 3d: 74 3f je 7e -+ 3f: 5d pop %ebp -+ 40: 74 3c je 7e -+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) -+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5b: 5d pop %ebp -+ 5c: eb 27 jmp 85 -+ 5e: 66 90 xchg %ax,%ax -+ 60: eb 23 jmp 85 -+ 62: eb 21 jmp 85 -+ 64: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 67: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6a: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 70: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 73: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 76: 5d pop %ebp -+ 77: 5d pop %ebp -+ 78: 39 c5 cmp %eax,%ebp -+ 7a: 74 02 je 7e -+ 7c: eb 07 jmp 85 -+ 7e: 36 8b 45 f4 mov %ss:-0xc\(%ebp\),%eax -+ 82: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9d: 89 75 0c mov %esi,0xc\(%ebp\) -+ a0: e9 [0-9a-f ]+ jmp .* -+ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ bd: 89 75 00 mov %esi,0x0\(%ebp\) -+ c0: 74 c3 je 85 -+ c2: 74 c1 je 85 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1g.d binutils.new/gas/testsuite/gas/i386/align-branch-1g.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1g.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,77 @@ -+#source: align-branch-1.s -+#as: -mbranches-within-32B-boundaries -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: 39 c5 cmp %eax,%ebp -+ 22: 74 5e je 82 -+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) -+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 5d pop %ebp -+ 3e: 5d pop %ebp -+ 3f: 5d pop %ebp -+ 40: 74 40 je 82 -+ 42: 5d pop %ebp -+ 43: 74 3d je 82 -+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) -+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5f: 5d pop %ebp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 78: 5d pop %ebp -+ 79: 5d pop %ebp -+ 7a: 39 c5 cmp %eax,%ebp -+ 7c: 74 04 je 82 -+ 7e: 66 90 xchg %ax,%ax -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a0: 89 75 0c mov %esi,0xc\(%ebp\) -+ a3: e9 [0-9a-f ]+ jmp .* -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ c0: 89 75 00 mov %esi,0x0\(%ebp\) -+ c3: 74 c3 je 88 -+ c5: 74 c1 je 88 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1h.d binutils.new/gas/testsuite/gas/i386/align-branch-1h.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1h.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,76 @@ -+#source: align-branch-1.s -+#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 89 e5 mov %esp,%ebp -+ c: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1e: 39 c5 cmp %eax,%ebp -+ 20: 74 5a je 7c -+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) -+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 5d pop %ebp -+ 3b: 5d pop %ebp -+ 3c: 5d pop %ebp -+ 3d: 74 3d je 7c -+ 3f: 5d pop %ebp -+ 40: 74 3a je 7c -+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) -+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5b: 5d pop %ebp -+ 5c: eb 24 jmp 82 -+ 5e: eb 22 jmp 82 -+ 60: eb 20 jmp 82 -+ 62: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 65: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 68: 89 7d f8 mov %edi,-0x8\(%ebp\) -+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 74: 5d pop %ebp -+ 75: 5d pop %ebp -+ 76: 39 c5 cmp %eax,%ebp -+ 78: 74 02 je 7c -+ 7a: eb 06 jmp 82 -+ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax -+ 7f: 89 45 fc mov %eax,-0x4\(%ebp\) -+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ 9a: 89 75 0c mov %esi,0xc\(%ebp\) -+ 9d: e9 [0-9a-f ]+ jmp .* -+ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) -+ ba: 89 75 00 mov %esi,0x0\(%ebp\) -+ bd: 74 c3 je 82 -+ bf: 74 c1 je 82 -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1.s binutils.new/gas/testsuite/gas/i386/align-branch-1.s ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-1.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-1.s 2019-11-25 14:01:00.632325883 +0000 -@@ -0,0 +1,72 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %gs:0x1 -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ movl %esp, %ebp -+ movl %edi, -8(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ cmp %eax, %ebp -+ je .L_2 -+ movl %esi, -12(%ebx) -+ movl %esi, -12(%ebp) -+ movl %edi, -8(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ popl %ebp -+ popl %ebp -+ popl %ebp -+ je .L_2 -+ popl %ebp -+ je .L_2 -+ movl %eax, -4(%esp) -+ movl %esi, -12(%ebp) -+ movl %edi, -8(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ popl %ebp -+ jmp .L_3 -+ jmp .L_3 -+ jmp .L_3 -+ movl %eax, -4(%ebp) -+ movl %esi, -12(%ebp) -+ movl %edi, -8(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ popl %ebp -+ popl %ebp -+ cmp %eax, %ebp -+ je .L_2 -+ jmp .L_3 -+.L_2: -+ movl -12(%ebp), %eax -+ movl %eax, -4(%ebp) -+.L_3: -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, 12(%ebp) -+ jmp bar -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, -1200(%ebp) -+ movl %esi, (%ebp) -+ je .L_3 -+ je .L_3 -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2a.d binutils.new/gas/testsuite/gas/i386/align-branch-2a.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-2a.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,55 @@ -+#source: align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 89 e5 mov %esp,%ebp -+ c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1e: ff e0 jmp \*%eax -+ 20: 55 push %ebp -+ 21: 55 push %ebp -+ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 28: 89 e5 mov %esp,%ebp -+ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3c: ff d0 call \*%eax -+ 3e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 41: 55 push %ebp -+ 42: 55 push %ebp -+ 43: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 49: 89 e5 mov %esp,%ebp -+ 4b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 4e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 51: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 54: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 57: e8 [0-9a-f ]+ call .* -+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5f: 55 push %ebp -+ 60: 55 push %ebp -+ 61: 55 push %ebp -+ 62: 55 push %ebp -+ 63: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 69: 89 e5 mov %esp,%ebp -+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 71: ff 15 00 00 00 00 call \*0x0 -+ 77: 55 push %ebp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2b.d binutils.new/gas/testsuite/gas/i386/align-branch-2b.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-2b.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,55 @@ -+#source: align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=indirect -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: ff e0 jmp \*%eax -+ 22: 3e 3e 55 ds ds push %ebp -+ 25: 55 push %ebp -+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 2c: 89 e5 mov %esp,%ebp -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 40: ff d0 call \*%eax -+ 42: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 45: 55 push %ebp -+ 46: 55 push %ebp -+ 47: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 4d: 89 e5 mov %esp,%ebp -+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5b: e8 [0-9a-f ]+ call .* -+ 60: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 63: 55 push %ebp -+ 64: 55 push %ebp -+ 65: 55 push %ebp -+ 66: 55 push %ebp -+ 67: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 6d: 89 e5 mov %esp,%ebp -+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 75: ff 15 00 00 00 00 call \*0x0 -+ 7b: 55 push %ebp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2c.d binutils.new/gas/testsuite/gas/i386/align-branch-2c.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-2c.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,55 @@ -+#source: align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=indirect+call -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1 -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: ff e0 jmp \*%eax -+ 22: 3e 3e 55 ds ds push %ebp -+ 25: 55 push %ebp -+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 2c: 89 e5 mov %esp,%ebp -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 40: ff d0 call \*%eax -+ 42: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\) -+ 4a: 55 push %ebp -+ 4b: 55 push %ebp -+ 4c: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 52: 89 e5 mov %esp,%ebp -+ 54: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 57: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 5d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 60: e8 [0-9a-f ]+ call .* -+ 65: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\) -+ 6d: 3e 55 ds push %ebp -+ 6f: 55 push %ebp -+ 70: 55 push %ebp -+ 71: 55 push %ebp -+ 72: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 78: 89 e5 mov %esp,%ebp -+ 7a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 7d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 80: ff 15 00 00 00 00 call \*0x0 -+ 86: 55 push %ebp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2.s binutils.new/gas/testsuite/gas/i386/align-branch-2.s ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-2.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-2.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,49 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ jmp *%eax -+ pushl %ebp -+ pushl %ebp -+ movl %eax, %fs:0x1 -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ call *%eax -+ movl %esi, -12(%ebp) -+ pushl %ebp -+ pushl %ebp -+ movl %eax, %fs:0x1 -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ call foo -+ movl %esi, -12(%ebp) -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ movl %eax, %fs:0x1 -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ call *foo -+ pushl %ebp -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-3.d binutils.new/gas/testsuite/gas/i386/align-branch-3.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-3.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-3.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,33 @@ -+#as: -malign-branch-boundary=32 -malign-branch=indirect+call -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 89 e5 mov %esp,%ebp -+ c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1e: e8 fc ff ff ff call 1f -+ 23: 55 push %ebp -+ 24: 55 push %ebp -+ 25: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 2b: 89 e5 mov %esp,%ebp -+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3c: ff 91 00 00 00 00 call \*0x0\(%ecx\) -+ 42: 89 75 f4 mov %esi,-0xc\(%ebp\) -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-3.s binutils.new/gas/testsuite/gas/i386/align-branch-3.s ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-3.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-3.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,28 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ call ___tls_get_addr -+ pushl %ebp -+ pushl %ebp -+ movl %eax, %fs:0x1 -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ call *___tls_get_addr@GOT(%ecx) -+ movl %esi, -12(%ebp) -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4a.d binutils.new/gas/testsuite/gas/i386/align-branch-4a.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-4a.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,36 @@ -+#source: align-branch-4.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 6: 55 push %ebp -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 89 e5 mov %esp,%ebp -+ d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 10: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 13: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 16: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 19: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1c: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1f: c3 ret -+ 20: 55 push %ebp -+ 21: 55 push %ebp -+ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 28: 89 e5 mov %esp,%ebp -+ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3c: c2 1e 00 ret \$0x1e -+ 3f: 89 75 f4 mov %esi,-0xc\(%ebp\) -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4b.d binutils.new/gas/testsuite/gas/i386/align-branch-4b.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-4b.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,36 @@ -+#source: align-branch-4.s -+#as: -malign-branch-boundary=32 -malign-branch=ret -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 a3 01 00 00 00 fs mov %eax,%fs:0x1 -+ 7: 55 push %ebp -+ 8: 55 push %ebp -+ 9: 55 push %ebp -+ a: 55 push %ebp -+ b: 55 push %ebp -+ c: 89 e5 mov %esp,%ebp -+ e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 20: c3 ret -+ 21: 3e 3e 3e 55 ds ds ds push %ebp -+ 25: 55 push %ebp -+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 -+ 2c: 89 e5 mov %esp,%ebp -+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) -+ 40: c2 1e 00 ret \$0x1e -+ 43: 89 75 f4 mov %esi,-0xc\(%ebp\) -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4.s binutils.new/gas/testsuite/gas/i386/align-branch-4.s ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-4.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-4.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,30 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ pushl %ebp -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ ret -+ pushl %ebp -+ pushl %ebp -+ movl %eax, %fs:0x1 -+ movl %esp, %ebp -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ movl %esi, -12(%ebp) -+ ret $30 -+ movl %esi, -12(%ebp) -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-5.d binutils.new/gas/testsuite/gas/i386/align-branch-5.d ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-5.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-5.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,36 @@ -+#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: c1 e9 02 shr \$0x2,%ecx -+ 3: c1 e9 02 shr \$0x2,%ecx -+ 6: c1 e9 02 shr \$0x2,%ecx -+ 9: 89 d1 mov %edx,%ecx -+ b: 31 c0 xor %eax,%eax -+ d: c1 e9 02 shr \$0x2,%ecx -+ 10: c1 e9 02 shr \$0x2,%ecx -+ 13: c1 e9 02 shr \$0x2,%ecx -+ 16: c1 e9 02 shr \$0x2,%ecx -+ 19: c1 e9 02 shr \$0x2,%ecx -+ 1c: c1 e9 02 shr \$0x2,%ecx -+ 1f: f6 c2 02 test \$0x2,%dl -+ 22: f3 ab rep stos %eax,%es:\(%edi\) -+ 24: 75 dd jne 3 -+ 26: 31 c0 xor %eax,%eax -+ 28: c1 e9 02 shr \$0x2,%ecx -+ 2b: c1 e9 02 shr \$0x2,%ecx -+ 2e: c1 e9 02 shr \$0x2,%ecx -+ 31: 89 d1 mov %edx,%ecx -+ 33: 31 c0 xor %eax,%eax -+ 35: c1 e9 02 shr \$0x2,%ecx -+ 38: c1 e9 02 shr \$0x2,%ecx -+ 3b: c1 e9 02 shr \$0x2,%ecx -+ 3e: f6 c2 02 test \$0x2,%dl -+ 41: e8 [0-9a-f ]+ call .* -+ 46: 75 e3 jne 2b -+ 48: 31 c0 xor %eax,%eax -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-5.s binutils.new/gas/testsuite/gas/i386/align-branch-5.s ---- binutils-2.32/gas/testsuite/gas/i386/align-branch-5.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/align-branch-5.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,32 @@ -+ .text -+ .p2align 4,,15 -+foo: -+ shrl $2, %ecx -+.L1: -+ shrl $2, %ecx -+ shrl $2, %ecx -+ movl %edx, %ecx -+ xorl %eax, %eax -+ shrl $2, %ecx -+ shrl $2, %ecx -+ shrl $2, %ecx -+ shrl $2, %ecx -+ shrl $2, %ecx -+ shrl $2, %ecx -+ testb $2, %dl -+ rep stosl -+ jne .L1 -+ xorl %eax, %eax -+ shrl $2, %ecx -+.L2: -+ shrl $2, %ecx -+ shrl $2, %ecx -+ movl %edx, %ecx -+ xorl %eax, %eax -+ shrl $2, %ecx -+ shrl $2, %ecx -+ shrl $2, %ecx -+ testb $2, %dl -+ call bar -+ jne .L2 -+ xorl %eax, %eax -diff -rupN binutils-2.32/gas/testsuite/gas/i386/i386.exp binutils.new/gas/testsuite/gas/i386/i386.exp ---- binutils-2.32/gas/testsuite/gas/i386/i386.exp 2019-01-19 16:01:33.000000000 +0000 -+++ binutils.new/gas/testsuite/gas/i386/i386.exp 2019-11-25 14:01:00.680325567 +0000 -@@ -472,6 +472,20 @@ if [expr ([istarget "i*86-*-*"] || [ist - run_dump_test "optimize-3" - run_dump_test "optimize-4" - run_dump_test "optimize-5" -+ run_dump_test "align-branch-1a" -+ run_dump_test "align-branch-1b" -+ run_dump_test "align-branch-1c" -+ run_dump_test "align-branch-1d" -+ run_dump_test "align-branch-1e" -+ run_dump_test "align-branch-1f" -+ run_dump_test "align-branch-1g" -+ run_dump_test "align-branch-1h" -+ run_dump_test "align-branch-2a" -+ run_dump_test "align-branch-2b" -+ run_dump_test "align-branch-2c" -+ run_dump_test "align-branch-4a" -+ run_dump_test "align-branch-4b" -+ run_dump_test "align-branch-5" - - # These tests require support for 8 and 16 bit relocs, - # so we only run them for ELF and COFF targets. -@@ -543,6 +557,10 @@ if [expr ([istarget "i*86-*-*"] || [ist - run_dump_test "evex-no-scale-32" - run_dump_test "property-1" - -+ if {[istarget "*-*-linux*"]} then { -+ run_dump_test "align-branch-3" -+ } -+ - if { [gas_64_check] } then { - run_dump_test "att-regs" - run_dump_test "intel-regs" -@@ -982,6 +1000,20 @@ if [expr ([istarget "i*86-*-*"] || [ista - run_dump_test "x86-64-optimize-4" - run_dump_test "x86-64-optimize-5" - run_dump_test "x86-64-optimize-6" -+ run_dump_test "x86-64-align-branch-1a" -+ run_dump_test "x86-64-align-branch-1b" -+ run_dump_test "x86-64-align-branch-1c" -+ run_dump_test "x86-64-align-branch-1d" -+ run_dump_test "x86-64-align-branch-1e" -+ run_dump_test "x86-64-align-branch-1f" -+ run_dump_test "x86-64-align-branch-1g" -+ run_dump_test "x86-64-align-branch-1h" -+ run_dump_test "x86-64-align-branch-2a" -+ run_dump_test "x86-64-align-branch-2b" -+ run_dump_test "x86-64-align-branch-2c" -+ run_dump_test "x86-64-align-branch-4a" -+ run_dump_test "x86-64-align-branch-4b" -+ run_dump_test "x86-64-align-branch-5" - - if { ![istarget "*-*-aix*"] - && ![istarget "*-*-beos*"] -@@ -1047,6 +1079,10 @@ if [expr ([istarget "i*86-*-*"] || [ista - - run_dump_test "evex-no-scale-64" - run_dump_test "x86-64-property-1" -+ -+ if {[istarget "*-*-linux*"]} then { -+ run_dump_test "x86-64-align-branch-3" -+ } - } - - set ASFLAGS "$old_ASFLAGS" -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1a.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,75 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: 48 39 c5 cmp %rax,%rbp -+ 23: 74 5d je 82 -+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) -+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3e: 5d pop %rbp -+ 3f: 5d pop %rbp -+ 40: 74 40 je 82 -+ 42: 5d pop %rbp -+ 43: 74 3d je 82 -+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) -+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5e: 5d pop %rbp -+ 5f: 5d pop %rbp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 78: 5d pop %rbp -+ 79: 5d pop %rbp -+ 7a: 48 39 c5 cmp %rax,%rbp -+ 7d: 74 03 je 82 -+ 7f: 90 nop -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c4: eb c2 jmp 88 -+ c6: 5d pop %rbp -+ c7: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1b.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,75 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: 48 39 c5 cmp %rax,%rbp -+ 23: 74 5d je 82 -+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) -+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3e: 5d pop %rbp -+ 3f: 5d pop %rbp -+ 40: 74 40 je 82 -+ 42: 5d pop %rbp -+ 43: 74 3d je 82 -+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) -+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5e: 5d pop %rbp -+ 5f: 5d pop %rbp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 78: 5d pop %rbp -+ 79: 5d pop %rbp -+ 7a: 48 39 c5 cmp %rax,%rbp -+ 7d: 74 03 je 82 -+ 7f: 90 nop -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c4: eb c2 jmp 88 -+ c6: 5d pop %rbp -+ c7: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1c.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1c.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,75 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 2e 55 cs push %rbp -+ a: 2e 55 cs push %rbp -+ c: 2e 55 cs push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: 48 39 c5 cmp %rax,%rbp -+ 23: 74 5d je 82 -+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) -+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3e: 5d pop %rbp -+ 3f: 5d pop %rbp -+ 40: 74 40 je 82 -+ 42: 5d pop %rbp -+ 43: 74 3d je 82 -+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) -+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5e: 5d pop %rbp -+ 5f: 5d pop %rbp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 78: 5d pop %rbp -+ 79: 5d pop %rbp -+ 7a: 48 39 c5 cmp %rax,%rbp -+ 7d: 74 03 je 82 -+ 7f: 90 nop -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c4: eb c2 jmp 88 -+ c6: 5d pop %rbp -+ c7: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1d.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1d.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,74 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: 48 39 c5 cmp %rax,%rbp -+ 23: 74 5b je 80 -+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) -+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3e: 5d pop %rbp -+ 3f: 5d pop %rbp -+ 40: 74 3e je 80 -+ 42: 5d pop %rbp -+ 43: 74 3b je 80 -+ 45: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 48: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4b: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5d: 5d pop %rbp -+ 5e: 5d pop %rbp -+ 5f: eb 25 jmp 86 -+ 61: eb 23 jmp 86 -+ 63: eb 21 jmp 86 -+ 65: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 68: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6b: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 74: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 77: 5d pop %rbp -+ 78: 5d pop %rbp -+ 79: 48 39 c5 cmp %rax,%rbp -+ 7c: 74 02 je 80 -+ 7e: eb 06 jmp 86 -+ 80: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 83: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 86: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8c: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 92: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 98: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ aa: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ bc: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c2: eb c2 jmp 86 -+ c4: 5d pop %rbp -+ c5: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1e.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1e.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,74 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=jcc -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 48 89 e5 mov %rsp,%rbp -+ e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 48 39 c5 cmp %rax,%rbp -+ 20: 74 5b je 7d -+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 5d pop %rbp -+ 3b: 5d pop %rbp -+ 3c: 74 3f je 7d -+ 3e: 2e 5d cs pop %rbp -+ 40: 74 3b je 7d -+ 42: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 48: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5a: 5d pop %rbp -+ 5b: 5d pop %rbp -+ 5c: eb 25 jmp 83 -+ 5e: eb 23 jmp 83 -+ 60: eb 21 jmp 83 -+ 62: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 65: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 68: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 74: 5d pop %rbp -+ 75: 5d pop %rbp -+ 76: 48 39 c5 cmp %rax,%rbp -+ 79: 74 02 je 7d -+ 7b: eb 06 jmp 83 -+ 7d: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 80: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 83: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 89: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8f: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 95: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ad: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ bf: eb c2 jmp 83 -+ c1: 5d pop %rbp -+ c2: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1f.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1f.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,75 @@ -+#source: x86-64-align-branch-1.s -+#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 48 89 e5 mov %rsp,%rbp -+ e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 48 39 c5 cmp %rax,%rbp -+ 20: 74 5d je 7f -+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 5d pop %rbp -+ 3b: 5d pop %rbp -+ 3c: 74 41 je 7f -+ 3e: 2e 5d cs pop %rbp -+ 40: 74 3d je 7f -+ 42: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 48: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5a: 5d pop %rbp -+ 5b: 5d pop %rbp -+ 5c: eb 27 jmp 85 -+ 5e: 66 90 xchg %ax,%ax -+ 60: eb 23 jmp 85 -+ 62: eb 21 jmp 85 -+ 64: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 67: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6a: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 70: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 73: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 76: 5d pop %rbp -+ 77: 5d pop %rbp -+ 78: 48 39 c5 cmp %rax,%rbp -+ 7b: 74 02 je 7f -+ 7d: eb 06 jmp 85 -+ 7f: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 82: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9d: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ af: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ bb: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c1: eb c2 jmp 85 -+ c3: 5d pop %rbp -+ c4: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1g.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1g.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,75 @@ -+#source: x86-64-align-branch-1.s -+#as: -mbranches-within-32B-boundaries -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: 48 39 c5 cmp %rax,%rbp -+ 23: 74 5d je 82 -+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) -+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3e: 5d pop %rbp -+ 3f: 5d pop %rbp -+ 40: 74 40 je 82 -+ 42: 5d pop %rbp -+ 43: 74 3d je 82 -+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) -+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5e: 5d pop %rbp -+ 5f: 5d pop %rbp -+ 60: eb 26 jmp 88 -+ 62: eb 24 jmp 88 -+ 64: eb 22 jmp 88 -+ 66: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 78: 5d pop %rbp -+ 79: 5d pop %rbp -+ 7a: 48 39 c5 cmp %rax,%rbp -+ 7d: 74 03 je 82 -+ 7f: 90 nop -+ 80: eb 06 jmp 88 -+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 85: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ c4: eb c2 jmp 88 -+ c6: 5d pop %rbp -+ c7: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1h.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1h.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,74 @@ -+#source: x86-64-align-branch-1.s -+#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0 -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 48 89 e5 mov %rsp,%rbp -+ e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 48 39 c5 cmp %rax,%rbp -+ 20: 74 5a je 7c -+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 5d pop %rbp -+ 3b: 5d pop %rbp -+ 3c: 74 3e je 7c -+ 3e: 5d pop %rbp -+ 3f: 74 3b je 7c -+ 41: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 44: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 47: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 4a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 4d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 50: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 53: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 56: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 59: 5d pop %rbp -+ 5a: 5d pop %rbp -+ 5b: eb 25 jmp 82 -+ 5d: eb 23 jmp 82 -+ 5f: eb 21 jmp 82 -+ 61: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 64: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 67: 89 7d f8 mov %edi,-0x8\(%rbp\) -+ 6a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 70: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 73: 5d pop %rbp -+ 74: 5d pop %rbp -+ 75: 48 39 c5 cmp %rax,%rbp -+ 78: 74 02 je 7c -+ 7a: eb 06 jmp 82 -+ 7c: 8b 45 f4 mov -0xc\(%rbp\),%eax -+ 7f: 89 45 fc mov %eax,-0x4\(%rbp\) -+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) -+ be: eb c2 jmp 82 -+ c0: 5d pop %rbp -+ c1: c3 retq -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1.s ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,70 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ cmp %rax, %rbp -+ je .L_2 -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %edi, -8(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ popq %rbp -+ popq %rbp -+ je .L_2 -+ popq %rbp -+ je .L_2 -+ movl %eax, -4(%rbp) -+ movl %esi, -12(%rbp) -+ movl %edi, -8(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ popq %rbp -+ popq %rbp -+ jmp .L_3 -+ jmp .L_3 -+ jmp .L_3 -+ movl %eax, -4(%rbp) -+ movl %esi, -12(%rbp) -+ movl %edi, -8(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ popq %rbp -+ popq %rbp -+ cmp %rax, %rbp -+ je .L_2 -+ jmp .L_3 -+.L_2: -+ movl -12(%rbp), %eax -+ movl %eax, -4(%rbp) -+.L_3: -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ movl %esi, -1200(%rbp) -+ jmp .L_3 -+ popq %rbp -+ retq -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2a.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,50 @@ -+#source: x86-64-align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 55 push %rbp -+ c: 48 89 e5 mov %rsp,%rbp -+ f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1e: ff e0 jmpq \*%rax -+ 20: 55 push %rbp -+ 21: 55 push %rbp -+ 22: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 2a: 48 89 e5 mov %rsp,%rbp -+ 2d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 30: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 33: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 36: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 39: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3c: ff d0 callq \*%rax -+ 3e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 41: 55 push %rbp -+ 42: 55 push %rbp -+ 43: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 4b: 48 89 e5 mov %rsp,%rbp -+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 57: e8 [0-9a-f ]+ callq .* -+ 5c: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5f: 55 push %rbp -+ 60: 55 push %rbp -+ 61: 55 push %rbp -+ 62: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 6a: 48 89 e5 mov %rsp,%rbp -+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 70: ff 14 25 00 00 00 00 callq \*0x0 -+ 77: 55 push %rbp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2b.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,50 @@ -+#source: x86-64-align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=indirect -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1 -+ a: 55 push %rbp -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: ff e0 jmpq \*%rax -+ 22: 2e 2e 55 cs cs push %rbp -+ 25: 55 push %rbp -+ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 2e: 48 89 e5 mov %rsp,%rbp -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 40: ff d0 callq \*%rax -+ 42: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 45: 55 push %rbp -+ 46: 55 push %rbp -+ 47: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 4f: 48 89 e5 mov %rsp,%rbp -+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5b: e8 [0-9a-f ]+ callq .* -+ 60: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 63: 55 push %rbp -+ 64: 55 push %rbp -+ 65: 55 push %rbp -+ 66: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 6e: 48 89 e5 mov %rsp,%rbp -+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 74: ff 14 25 00 00 00 00 callq \*0x0 -+ 7b: 55 push %rbp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2c.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2c.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,50 @@ -+#source: x86-64-align-branch-2.s -+#as: -malign-branch-boundary=32 -malign-branch=indirect+call -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1 -+ a: 55 push %rbp -+ b: 55 push %rbp -+ c: 55 push %rbp -+ d: 55 push %rbp -+ e: 48 89 e5 mov %rsp,%rbp -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: ff e0 jmpq \*%rax -+ 22: 2e 2e 55 cs cs push %rbp -+ 25: 55 push %rbp -+ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 2e: 48 89 e5 mov %rsp,%rbp -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 40: ff d0 callq \*%rax -+ 42: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\) -+ 4a: 55 push %rbp -+ 4b: 55 push %rbp -+ 4c: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 54: 48 89 e5 mov %rsp,%rbp -+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 5d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 60: e8 [0-9a-f ]+ callq .* -+ 65: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\) -+ 6d: 2e 2e 55 cs cs push %rbp -+ 70: 55 push %rbp -+ 71: 55 push %rbp -+ 72: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 7a: 48 89 e5 mov %rsp,%rbp -+ 7d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 80: ff 14 25 00 00 00 00 callq \*0x0 -+ 87: 55 push %rbp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2.s ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,44 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ jmp *%rax -+ pushq %rbp -+ pushq %rbp -+ movl %eax, %fs:0x1 -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ call *%rax -+ movl %esi, -12(%rbp) -+ pushq %rbp -+ pushq %rbp -+ movl %eax, %fs:0x1 -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ call foo -+ movl %esi, -12(%rbp) -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ movl %eax, %fs:0x1 -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ call *foo -+ pushq %rbp -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,32 @@ -+#as: -malign-branch-boundary=32 -malign-branch=indirect+call -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 55 push %rbp -+ c: 48 89 e5 mov %rsp,%rbp -+ f: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 12: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 15: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 18: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1e: e8 00 00 00 00 callq 23 -+ 23: 55 push %rbp -+ 24: 55 push %rbp -+ 25: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 2d: 48 89 e5 mov %rsp,%rbp -+ 30: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 33: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 36: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 39: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3c: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3f: ff 15 00 00 00 00 callq \*0x0\(%rip\) # 45 -+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.s ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,27 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ pushq %rbp -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ call __tls_get_addr -+ pushq %rbp -+ pushq %rbp -+ movl %eax, %fs:0x1 -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ call *__tls_get_addr@GOTPCREL(%rip) -+ movl %esi, -12(%rbp) -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4a.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,33 @@ -+#source: x86-64-align-branch-4.s -+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 8: 55 push %rbp -+ 9: 55 push %rbp -+ a: 48 89 e5 mov %rsp,%rbp -+ d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 10: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 13: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 16: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 19: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1c: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1f: c3 retq -+ 20: 55 push %rbp -+ 21: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 29: 55 push %rbp -+ 2a: 55 push %rbp -+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3d: c2 1e 00 retq \$0x1e -+ 40: 55 push %rbp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4b.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,33 @@ -+#source: x86-64-align-branch-4.s -+#as: -malign-branch-boundary=32 -malign-branch=ret -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: 64 64 89 04 25 01 00 00 00 fs mov %eax,%fs:0x1 -+ 9: 55 push %rbp -+ a: 55 push %rbp -+ b: 48 89 e5 mov %rsp,%rbp -+ e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 20: c3 retq -+ 21: 2e 2e 55 cs cs push %rbp -+ 24: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 -+ 2c: 55 push %rbp -+ 2d: 55 push %rbp -+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) -+ 40: c2 1e 00 retq \$0x1e -+ 43: 55 push %rbp -+#pass -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4.s ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4.s 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,27 @@ -+ .text -+ .globl foo -+ .p2align 4 -+foo: -+ movl %eax, %fs:0x1 -+ pushq %rbp -+ pushq %rbp -+ movq %rsp, %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ ret -+ pushq %rbp -+ movl %eax, %fs:0x1 -+ pushq %rbp -+ pushq %rbp -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ movl %esi, -12(%rbp) -+ ret $30 -+ pushq %rbp -diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-5.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-5.d ---- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-5.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-5.d 2019-11-25 14:01:00.680325567 +0000 -@@ -0,0 +1,37 @@ -+#source: align-branch-5.s -+#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp -+#objdump: -dw -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+ : -+ 0: c1 e9 02 shr \$0x2,%ecx -+ 3: c1 e9 02 shr \$0x2,%ecx -+ 6: c1 e9 02 shr \$0x2,%ecx -+ 9: 89 d1 mov %edx,%ecx -+ b: 31 c0 xor %eax,%eax -+ d: c1 e9 02 shr \$0x2,%ecx -+ 10: c1 e9 02 shr \$0x2,%ecx -+ 13: c1 e9 02 shr \$0x2,%ecx -+ 16: c1 e9 02 shr \$0x2,%ecx -+ 19: c1 e9 02 shr \$0x2,%ecx -+ 1c: c1 e9 02 shr \$0x2,%ecx -+ 1f: f6 c2 02 test \$0x2,%dl -+ 22: f3 ab rep stos %eax,%es:\(%rdi\) -+ 24: 75 dd jne 3 -+ 26: 31 c0 xor %eax,%eax -+ 28: c1 e9 02 shr \$0x2,%ecx -+ 2b: c1 e9 02 shr \$0x2,%ecx -+ 2e: c1 e9 02 shr \$0x2,%ecx -+ 31: 89 d1 mov %edx,%ecx -+ 33: 31 c0 xor %eax,%eax -+ 35: c1 e9 02 shr \$0x2,%ecx -+ 38: c1 e9 02 shr \$0x2,%ecx -+ 3b: c1 e9 02 shr \$0x2,%ecx -+ 3e: f6 c2 02 test \$0x2,%dl -+ 41: e8 00 00 00 00 callq 46 -+ 46: 75 e3 jne 2b -+ 48: 31 c0 xor %eax,%eax -+#pass -diff -rupN binutils-2.32/gas/write.c binutils.new/gas/write.c ---- binutils-2.32/gas/write.c 2019-11-25 14:01:09.888265017 +0000 -+++ binutils.new/gas/write.c 2019-11-25 14:01:00.901324114 +0000 -@@ -3031,7 +3031,12 @@ relax_segment (struct frag *segment_frag - #ifdef TC_GENERIC_RELAX_TABLE - /* The default way to relax a frag is to look through - TC_GENERIC_RELAX_TABLE. */ -+#ifdef md_generic_table_relax_frag -+ growth = md_generic_table_relax_frag (segment, fragP, -+ stretch); -+#else - growth = relax_frag (segment, fragP, stretch); -+#endif /* md_generic_table_relax_frag */ - #endif /* TC_GENERIC_RELAX_TABLE */ - #endif - break; diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index c7e49c6..d015461 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -4,19 +4,23 @@ Summary: A GNU collection of binary utilities Name: %{?scl_prefix}%{?cross}binutils%{?_with_debug:-debug} -Version: 2.32 -Release: 19%{?dist} +Version: 2.35 +Release: 6%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils # Binutils SPEC file. Can be invoked with the following parameters: # --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils. -# --with=bootstrap: Build with minimal dependencies. -# --with=debug: Build without optimizations and without splitting the debuginfo. -# --without=docs: Skip building documentation. -# --without=testsuite: Do not run the testsuite. Default is to run it. -# --with=testsuite: Run the testsuite. Default when --with=debug is not to run it. +# +# --with bootstrap: Build with minimal dependencies. +# --with debug: Build without optimizations and without splitting the debuginfo. +# --without docs: Skip building documentation. +# --without testsuite: Do not run the testsuite. Default is to run it. +# --with testsuite: Run the testsuite. Default when --with=debug is not to run it. +# --without gold Disable building of the GOLD linker. +# --with clang To force building with the CLANG. +# --with debuginfod Enable support for debuginfod. #---Start of Configure Options----------------------------------------------- @@ -47,6 +51,8 @@ URL: https://sourceware.org/binutils #----End of Configure Options------------------------------------------------ +# Note - in the future the gold linker may become deprecated. +%bcond_without gold # Default: Not bootstrapping. %bcond_with bootstrap # Default: Not debug @@ -55,6 +61,11 @@ URL: https://sourceware.org/binutils %bcond_without docs # Default: Always run the testsuite. %bcond_without testsuite +# Use clang as the build time compiler. Default: gcc +%bcond_with clang +# Default: do not support debuginfod. +%bcond_with debuginfod + %if %{with bootstrap} %undefine with_docs @@ -185,129 +196,84 @@ Patch11: binutils-do-not-link-with-static-libstdc++.patch # Lifetime: Permanent. Patch12: binutils-attach-to-group.patch -# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute -# section that reference symbols in discarded sections. -# Lifetime: Fixed in 2.33 (maybe) -Patch13: binutils-gold-ignore-discarded-note-relocs.patch - # Purpose: Allow OS specific sections in section groups. -# Lifetime: Might be fixed in 2.33 -Patch14: binutils-special-sections-in-groups.patch - -# Purpose: Fix linker testsuite failures. -# Lifetime: Fixed in 2.33 (possibly) -Patch15: binutils-fix-testsuite-failures.patch - -# Purpose: Improve objdump's handling of corrupt input files. -# Lifetime: Fixed in 2.33 -Patch16: binutils-CVE-2019-9073.patch - -# Purpose: Stop illegal memory access parsing corrupt PE files. -# Lifetime: Fixed in 2.33 -Patch17: binutils-CVE-2019-9074.patch - -# Purpose: Stop illegal memory access parsing corrupt archives. -# Lifetime: Fixed in 2.33 -Patch18: binutils-CVE-2019-9075.patch - -# Purpose: Stop illegal memory access parsing a corrupt MIPS binary. -# Lifetime: Fixed in 2.33 -Patch19: binutils-CVE-2019-9077.patch - -# Purpose: Stop a seg-fault when disassembling an EFI binary. -# Lifetime: Fixed in 2.33 -Patch20: binutils-disassembling-efi-files.patch - -# Purpose: Fix a stack exhaustion problem in libiberty's name demangling code. -# Lifetime: Fixed in 2.33 -Patch21: 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 -Patch22: binutils-aarch64-gold-PLT-for-MOVW_ABS.patch - -# Purpose: Fix unexpected failures in the linker testsuite -# Lifetime: Temporary -Patch23: binutils-ld-testsuite-fixes.patch +# Lifetime: Fixed in 2.36 (maybe) +Patch13: binutils-special-sections-in-groups.patch # Purpose: Have the GOLD linker generate PT_NOTE segments with 8-byte alignment. # Lifetime: Maybe fixed in 2.33. -Patch24: binutils-gold-8-byte-note-segments.patch - -# Purpose: Add descriptions to the new s390x arch13 instructions -# Lifetime: 2.33 -Patch25: binutils-s390x-arch13-descriptions.patch +Patch14: binutils-gold-8-byte-note-segments.patch # Purpose: Stop gold from aborting when input sections with the same name # have different flags. -# Lifetime: 2.33 (probably) -Patch26: binutils-gold-mismatched-section-flags.patch +# Lifetime: Fixed in 2.36 (maybe) +Patch15: binutils-gold-mismatched-section-flags.patch # Purpose: Remove the builder id comment from bfd-stdint.h. It causes # conflicts when both the i686 and x86_64 binutils devel rpms # are installed, as the comments makes the file compare as # being different. # Lifetime: Permanent. -Patch27: binutils-no-builder-comment-in-bfd-stdint.patch +Patch16: binutils-no-builder-comment-in-bfd-stdint.patch # Purpose: Correct licence strings rejected by PELC review. # Lifetime: Permanent. -Patch28: binutils-PELC-licence-corrections.patch +Patch17: binutils-PELC-licence-corrections.patch # Purpose: Ignore duplicate FDE entries found in some AArch64 libraries. # Lifetime: Permanent. -Patch29: binutils-ignore-duplicate-FDE-entries.patch +Patch18: binutils-ignore-duplicate-FDE-entries.patch -# Purpose: Corrcect a memory corruption when generating relocs for build -# notes in the assembler. -# Lifetime: Fixed in 2.33 -Patch30: binutils-gas-build-note-relocs.patch +# Purpose: Fixes build warnings when compiling for s390 usibng gcc-10 +# Lifetime: Should be fixed in 2.36 +Patch19: binutils-s390-build.patch -# Purpose: Support the generation of variant ABI functions in AArch64 binaries. -# Lifetime: Fixed in 2.33 -Patch31: binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch +# Purpose: Fix LTO problems running config mini-builds. +# Lifetime: Should be fixed in 2.36. +Patch20: binutils-config.patch -# Purpose: Remove a debugging print statement left in the objcopy code. -# Lifetime: Fixed in 2.33 -Patch32: binutils-remove-DUP-FUNXC-debug-fprintf.patch +# Purpose: Fix compile time warning messages building with gcc-10. +# Lifetime: Should be fixed in 2.36. +Patch21: binutils-warnings.patch -# Purpose: Stop strip from complaining about build notes that do not start -# with a version note. -# Lifetime: Fixed in 2.33 -Patch33: binutils-objcopy-version-note.patch +# Purpose: Fix compile time warning messages building with gcc-10. (part 2). +# Lifetime: Should be fixed in 2.36. +Patch22: binutils-gcc-10-fixes.patch -# Purpose: Add check to libiberty library in order to prevent an integer overflow in the gold linker. -# Lifetime: Fixed in 2.33 -Patch34: binutils-CVE-2019-14250.patch +# Purpose: Fix problems with the linker tests. +# Lifetime: Should be fixed in 2.36. +Patch23: binutils-fix-testsuite-failures.patch +Patch24: binutils-fix-ld-failures.patch +Patch25: binutils-aarch64-ld-testsuite-fixes.patch +Patch26: binutils-s390-ld-testsuite-fixes.patch +Patch27: binutils-i686-ld-testsuite-fixes.patch +Patch28: binutils-ppc-ld-testsuite-fixes.patch -# Purpose: Add check to readelf in order to prevent an integer overflow. -# Lifetime: Fixed in 2.33 -Patch35: binutils-CVE-2019-14444.patch +# Purpose: Add a check to the GOLD linker for a corrupt input file +# with a fuzzed section offset. +# Lifetime: Fixed in 2.36 (maybe) +Patch29: binutils-CVE-2019-1010204.patch -# Purpose: Fix a potential seg-fault in the BFD library when parsing -# pathalogical debug_info sections. -# Lifetime: Fixed in 2.34 -Patch36: binutils-CVE-2019-17451.patch +# Purpose: Default to DWARF level 3 in the assembler. +# Lifetime: Fixed in 2.36. +Patch30: binutils-gas-dwarf-level-4.patch -# Purpose: Fix a memory exhaustion bug in the BFD library when parsing -# corrupt DWARF debug information. -# Lifetime: Fixed in 2.34 -Patch37: binutils-CVE-2019-17450.patch +# Purpose: Set the sh_entsize of the AArch64's PLT section to 0. +# Lifetime: Fixed in 2.36. +Patch31: binutils-aarch64-plt-sh_entsize.patch -# Purpose: Add a feature to the x86/64 assembler to create -# workarounds for the Intel Jcc Erratum. -# Lifetime: Fixed in 2.34 -Patch38: binutils-x86-JCC-Errata.patch +# Purpose: Fixes for linking LTO objects. +# Lifetime: Fixed in 2.36 +Patch32: binutils-add-sym-cache-to-elf-link-hash.patch +Patch33: binutils-elf-add-objects.patch -# Purpose: Fix a potential illegal memory access parsing corrupt ELF files. -# Lifetime: Fixed in 2.34 -Patch39: binutils-CVE-2019-12972.patch #---------------------------------------------------------------------------- Provides: bundled(libiberty) +%if %{with gold} + %define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x %if %{with bootstrap} @@ -320,6 +286,10 @@ Provides: bundled(libiberty) %endif %endif +%else +%define build_gold no +%endif + %define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives %define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives} @@ -333,7 +303,7 @@ Provides: bundled(libiberty) Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Perl, sed and touch are all used in the %%prep section of this spec file. -BuildRequires: gcc, perl, sed, coreutils +BuildRequires: gcc, perl, sed, coreutils, autoconf # Gold needs bison in order to build gold/yyscript.c. # Bison needs m4. @@ -341,6 +311,12 @@ BuildRequires: gcc, perl, sed, coreutils BuildRequires: bison, m4, gcc-c++ %endif +%if %{with clang} +BuildRequires: clang compiler-rt +%else +BuildRequires: gcc +%endif + %if %{without bootstrap} BuildRequires: gettext, flex, zlib-devel %endif @@ -386,6 +362,12 @@ Requires(preun): %{alternatives_cmd} %define _gnu %{nil} %endif +%if %{with debuginfod} +BuildRequires: elfutils-debuginfod-client-devel +BuildRequires: elfutils-debuginfod-client +Requires: elfutils-debuginfod-client +%endif + #---------------------------------------------------------------------------- %description @@ -427,47 +409,41 @@ using libelf instead of BFD. #---------------------------------------------------------------------------- +%if %{with gold} + +%package gold +Summary: The GOLD linker, a faster alternative to the BFD linker +Provides: gold = %{version}-%{release} +Requires: binutils >= %{version} + +%description gold +This package provides the GOLD linker, which can be used as an alternative to +the default binutils linker (ld.bfd). The GOLD is generally faster than the +BFD linker, and it supports features such as Identical Code Folding and +Incremental linking. Unfortunately it is not as well maintained as the BFD +linker, and it may become deprecated in the future. + +# Gold needs bison in order to build gold/yyscript.c. +BuildRequires: bison, m4, gcc-c++ +# The GOLD testsuite needs a static libc++ +BuildRequires: libstdc++-static + +%if ! %{with clang} +BuildRequires: gcc-c++ +Conflicts: gcc-c++ < 4.0.0 +%endif + +# The higher of these two numbers determines the default ld. +%{!?ld_gold_priority:%global ld_gold_priority 30} + +%endif + +%{!?ld_bfd_priority: %global ld_bfd_priority 50} + +#---------------------------------------------------------------------------- + %prep -%setup -q -n binutils-%{version} -%patch01 -p1 -%patch02 -p1 -%patch03 -p1 -%patch04 -p1 -%patch05 -p1 -%patch06 -p1 -%patch07 -p1 -%patch08 -p1 -%patch09 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -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 +%autosetup -p1 -n binutils-%{version} # 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 ? @@ -515,6 +491,16 @@ chmod +x gold/testsuite/gnu_property_test.sh %build echo target is %{binutils_target} +# Dependencies are not set up to rebuild the configure files +# in the subdirectories. So we just rebuild the ones we care +# about after applying the configure patches +pushd libiberty +autoconf +popd +pushd intl +autoconf +popd + %ifarch %{power64} export CFLAGS="$RPM_OPT_FLAGS -Wno-error" %else @@ -523,6 +509,10 @@ export CFLAGS="$RPM_OPT_FLAGS" CARGS= +%if %{with debuginfod} +CARGS="$CARGS --with-debuginfod" +%endif + case %{binutils_target} in i?86*|sparc*|ppc*|s390*|sh*|arm*|aarch64*) CARGS="$CARGS --enable-64-bit-bfd" ;; @@ -559,7 +549,7 @@ esac CARGS="$CARGS --enable-relro=no" %endif -%if 0%{?_with_debug:1} +%if %{with debug} export CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0" %define enable_shared 0 %endif @@ -567,12 +557,17 @@ export CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0" # BZ 1541027 - include the linker flags from redhat-rpm-config as well. export LDFLAGS=$RPM_LD_FLAGS +%if %{with clang} +%define _with_cc_clang 1 +%endif + # We could optimize the cross builds size by --enable-shared but the produced # binaries may be less convenient in the embedded environment. %configure \ --quiet \ --build=%{_target_platform} --host=%{_target_platform} \ --target=%{binutils_target} \ +%if %{with gold} %ifarch %gold_arches %if "%{build_gold}" == "both" --enable-gold=default \ @@ -580,6 +575,7 @@ export LDFLAGS=$RPM_LD_FLAGS --enable-gold \ %endif %endif +%endif --enable-ld \ %if %{isnative} --with-sysroot=/ \ @@ -618,7 +614,8 @@ export LDFLAGS=$RPM_LD_FLAGS %endif $CARGS \ --enable-plugins \ - --with-bugurl=http://bugzilla.redhat.com/bugzilla/ + --with-bugurl=http://bugzilla.redhat.com/bugzilla/ \ + || cat config.log %if %{with docs} %make_build %{_smp_mflags} tooldir=%{_prefix} all @@ -658,7 +655,7 @@ if [ -f gold/testsuite/test-suite.log ]; then rm -f binutils-%{_target_platform}-gold.log.tar.xz fi %endif -%endif # with testsuite +%endif #---------------------------------------------------------------------------- @@ -678,16 +675,19 @@ cp %{SOURCE3} %{buildroot}%{_infodir} # Rebuild libiberty.a with -fPIC. # Future: Remove it together with its header file, projects should bundle it. %make_build -C libiberty clean +%set_build_flags %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libiberty # Rebuild libbfd.a with -fPIC. # Without the hidden visibility the 3rd party shared libraries would export # the bfd non-stable ABI. %make_build -C bfd clean +%set_build_flags %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd # Rebuild libopcodes.a with -fPIC. %make_build -C opcodes clean +%set_build_flags %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes install -m 644 bfd/libbfd.a %{buildroot}%{_libdir} @@ -756,14 +756,14 @@ $OUTPUT_FORMAT INPUT ( %{_libdir}/libopcodes.a -lbfd ) EOH -%else # !isnative +%else # For cross-binutils we drop the documentation. rm -rf %{buildroot}%{_infodir} # We keep these as one can have native + cross binutils of different versions. #rm -rf {buildroot}{_prefix}/share/locale #rm -rf {buildroot}{_mandir} rm -rf %{buildroot}%{_libdir}/libiberty.a -%endif # !isnative +%endif # This one comes from gcc rm -f %{buildroot}%{_infodir}/dir @@ -797,7 +797,7 @@ fi %{_bindir}/%{?cross}ld.bfd %{ld_bfd_priority} %{alternatives_cmdline} --install %{_bindir}/%{?cross}ld %{?cross}ld \ %{_bindir}/%{?cross}ld.gold %{ld_gold_priority} -%endif # both ld.gold and ld.bfd +%endif %if %{isnative} %ldconfig_post @@ -807,8 +807,8 @@ fi /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz -%endif # with docs -%endif # isnative +%endif +%endif exit 0 @@ -820,7 +820,7 @@ if [ $1 = 0 ]; then %{alternatives_cmdline} --remove %{?cross}ld %{_bindir}/%{?cross}ld.bfd %{alternatives_cmdline} --remove %{?cross}ld %{_bindir}/%{?cross}ld.gold fi -%endif # both ld.gold and ld.bfd +%endif %if %{isnative} if [ $1 = 0 ]; then @@ -833,7 +833,7 @@ if [ $1 = 0 ]; then /sbin/install-info --quiet --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz fi fi -%endif # isnative +%endif exit 0 @@ -850,7 +850,7 @@ exit 0 /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz /sbin/install-info --quiet --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz fi -%endif # isnative +%endif #---------------------------------------------------------------------------- @@ -864,7 +864,7 @@ exit 0 %ghost %{_bindir}/%{?cross}ld %else %{_bindir}/%{?cross}ld* -%endif # both ld.gold and ld.bfd +%endif %if %{with docs} %{_mandir}/man1/* @@ -874,20 +874,21 @@ exit 0 %{_infodir}/ld.info.* %{_infodir}/bfd.info.* %{_infodir}/standards.info.* -%endif # with docs +%endif %if %{enable_shared} %{_libdir}/lib*.so +%{_libdir}/libctf* %exclude %{_libdir}/libbfd.so %exclude %{_libdir}/libopcodes.so -%endif # enable_shared +%endif %if %{isnative} %if %{with docs} %{_infodir}/[^b]*info* %{_infodir}/binutils*info* -%endif # with docs +%endif %files devel %{_prefix}/include/* @@ -897,12 +898,32 @@ exit 0 %if %{with docs} %{_infodir}/bfd*info* -%endif # with docs +%endif -%endif # isnative +%endif #---------------------------------------------------------------------------- %changelog +* Fri Jan 15 2021 Nick Clifton - 2.35-6 +- NVR bump to allow rebuild with new tag. + +* Tue Aug 11 2020 Nick Clifton - 2.35-5 +- Fix building with LTO enabled. +- Set the sh_entsize field of the AArch64's PLT section to 0. (PR 26312) + +* Tue Jul 28 2020 Nick Clifton - 2.35-4 +- Fix testsuite failures. + +* Sun Jul 26 2020 Nick Clifton - 2.35-3 +- Do not enable debuginfod support by default. +- Add run-time dependency on libdebuginfod library when debuginfod support is enabled. + +* Sun Jul 26 2020 Nick Clifton - 2.35-2 +- Remove unnecessary dependency upon binutils-gold. + +* Fri Jul 24 2020 Nick Clifton - 2.35-1 +- REBASE TO GNU BINUTILS 2.35 + * Wed May 27 2020 Nick Clifton - 2.32-19 - Initial import into GTS-10-RHEL-8.3 branch. (#1817170)