diff --git a/binutils-2.29-branch.diff b/binutils-2.29-branch.diff index 3b8f34f..566e291 100644 --- a/binutils-2.29-branch.diff +++ b/binutils-2.29-branch.diff @@ -1,9 +1,84 @@ diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index 89f4338..cc9b787 100644 +index 89f4338..c90206c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog -@@ -1,3 +1,63 @@ -+2017-08-07 Nick Clifton +@@ -1,3 +1,138 @@ ++2017-08-29 Nick Clifton ++ ++ Import from mainline: ++ ++ PR 21840 ++ * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab ++ size is -1. ++ * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion ++ with error return. ++ * section.c (bfd_make_section_with_flags): Fail if the name or bfd ++ are NULL. ++ * vms-alpha.c (bfd_make_section_with_flags): Correct computation ++ of end pointer. ++ (evax_bfd_print_emh): Check for invalid string lengths. ++ ++2017-08-23 Alan Modra ++ ++ PR 21988 ++ * elf64-ppc.c (ensure_undef_dynamic): Rename from ++ ensure_undefweak_dynamic. Handle undefined too. ++ * elf32-ppc.c (ensure_undef_dynamic): Likewise. ++ * elf32-hppa.c (ensure_undef_dynamic): Likewise. ++ (allocate_dynrelocs): Discard undefined non-default visibility ++ relocs first. Make undefined syms dynamic. Tidy goto. ++ ++2017-08-21 Alan Modra ++ H.J. Lu ++ ++ PR ld/21964 ++ * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols. ++ * elflink.c (bfd_elf_define_start_stop): Rewrite. ++ ++2017-08-07 Alan Modra ++ ++ PR 21910 ++ * elflink.c (bfd_elf_final_link): Don't segfault when sections ++ needed to define various dynamic tags have been discarded. ++ ++2017-08-05 Alan Modra ++ ++ * elf32-hppa.c (elf32_hppa_set_gp): Don't require an ++ hppa_link_hash_table. ++ ++2017-07-25 Alan Modra ++ ++ * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl. ++ (stub_eh_frame_size): New function. ++ (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl. ++ (group_sections): Init group tls_get_addr_opt_bctrl. ++ (ppc64_elf_size_stubs): Update sizing and initialization of ++ .eh_frame. Iteration over stubs via group list. ++ (ppc64_elf_build_stubs): Iterate over stubs via group list. ++ (ppc64_elf_finish_dynamic_sections): Update finalization of ++ .eh_frame. ++ ++2017-08-18 Nick Clifton ++ ++ Import from mainline: ++ ++ PR binutils/21962 ++ * tekhex.c (getsym): Fix check for source pointer walking off the ++ end of the input buffer. ++ ++2017-08-17 Szabolcs Nagy ++ ++ PR ld/18808 ++ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC ++ relocations in debug sections, change abort to _bfd_error_handler. ++ ++2017-08-17 Szabolcs Nagy ++ ++ PR ld/18841 ++ * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return ++ reloc_class_ifunc for ifunc symbols. ++ ++2017-08-11 Nick Clifton + + PR 21884 + * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj @@ -162,6 +237,160 @@ index b001a88..cd31410 100644 # Controls whether to enable development-mode features by default. -development=false +development=true +diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h +index 92a8e02..83958e4 100644 +--- a/bfd/elf-bfd.h ++++ b/bfd/elf-bfd.h +@@ -2802,7 +2802,9 @@ extern asection _bfd_elf_large_com_section; + library, if any. A unique symbol can never be bound locally. */ + #define SYMBOLIC_BIND(INFO, H) \ + (!(H)->unique_global \ +- && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))) ++ && ((INFO)->symbolic \ ++ || (H)->start_stop \ ++ || ((INFO)->dynamic && !(H)->dynamic))) + + #ifdef __cplusplus + } +diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c +index 0087c71..548d656 100644 +--- a/bfd/elf32-hppa.c ++++ b/bfd/elf32-hppa.c +@@ -1919,16 +1919,20 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, + return _bfd_elf_adjust_dynamic_copy (info, eh, sec); + } + +-/* Make an undefined weak symbol dynamic. */ ++/* If EH is undefined, make it dynamic if that makes sense. */ + + static bfd_boolean +-ensure_undef_weak_dynamic (struct bfd_link_info *info, +- struct elf_link_hash_entry *eh) ++ensure_undef_dynamic (struct bfd_link_info *info, ++ struct elf_link_hash_entry *eh) + { +- if (eh->dynindx == -1 ++ struct elf_link_hash_table *htab = elf_hash_table (info); ++ ++ if (htab->dynamic_sections_created ++ && (eh->root.type == bfd_link_hash_undefweak ++ || eh->root.type == bfd_link_hash_undefined) ++ && eh->dynindx == -1 + && !eh->forced_local + && eh->type != STT_PARISC_MILLI +- && eh->root.type == bfd_link_hash_undefweak + && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT) + return bfd_elf_link_record_dynamic_symbol (info, eh); + return TRUE; +@@ -1957,7 +1961,7 @@ allocate_plt_static (struct elf_link_hash_entry *eh, void *inf) + if (htab->etab.dynamic_sections_created + && eh->plt.refcount > 0) + { +- if (!ensure_undef_weak_dynamic (info, eh)) ++ if (!ensure_undef_dynamic (info, eh)) + return FALSE; + + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), eh)) +@@ -2034,7 +2038,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) + + if (eh->got.refcount > 0) + { +- if (!ensure_undef_weak_dynamic (info, eh)) ++ if (!ensure_undef_dynamic (info, eh)) + return FALSE; + + sec = htab->etab.sgot; +@@ -2070,8 +2074,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) + changes. */ + if (bfd_link_pic (info)) + { ++ /* Discard relocs on undefined syms with non-default visibility. */ ++ if ((eh->root.type == bfd_link_hash_undefined ++ || eh->root.type == bfd_link_hash_undefweak) ++ && ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT) ++ hh->dyn_relocs = NULL; ++ + #if RELATIVE_DYNRELOCS +- if (SYMBOL_CALLS_LOCAL (info, eh)) ++ else if (SYMBOL_CALLS_LOCAL (info, eh)) + { + struct elf32_hppa_dyn_reloc_entry **hdh_pp; + +@@ -2087,15 +2097,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) + } + #endif + +- /* Also discard relocs on undefined weak syms with non-default +- visibility. */ +- if (hh->dyn_relocs != NULL +- && eh->root.type == bfd_link_hash_undefweak) ++ if (hh->dyn_relocs != NULL) + { +- if (ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT) +- hh->dyn_relocs = NULL; +- +- else if (!ensure_undef_weak_dynamic (info, eh)) ++ if (!ensure_undef_dynamic (info, eh)) + return FALSE; + } + } +@@ -2113,19 +2117,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) + && (eh->root.type == bfd_link_hash_undefweak + || eh->root.type == bfd_link_hash_undefined)))) + { +- if (!ensure_undef_weak_dynamic (info, eh)) ++ if (!ensure_undef_dynamic (info, eh)) + return FALSE; + +- /* If that succeeded, we know we'll be keeping all the +- relocs. */ +- if (eh->dynindx != -1) +- goto keep; ++ if (eh->dynindx == -1) ++ hh->dyn_relocs = NULL; + } +- +- hh->dyn_relocs = NULL; +- return TRUE; +- +- keep: ; ++ else ++ hh->dyn_relocs = NULL; + } + + /* Finally, allocate space. */ +@@ -3090,13 +3089,8 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info) + struct bfd_link_hash_entry *h; + asection *sec = NULL; + bfd_vma gp_val = 0; +- struct elf32_hppa_link_hash_table *htab; + +- htab = hppa_link_hash_table (info); +- if (htab == NULL) +- return FALSE; +- +- h = bfd_link_hash_lookup (&htab->etab.root, "$global$", FALSE, FALSE, FALSE); ++ h = bfd_link_hash_lookup (info->hash, "$global$", FALSE, FALSE, FALSE); + + if (h != NULL + && (h->type == bfd_link_hash_defined +@@ -3159,10 +3153,13 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info) + } + } + +- if (sec != NULL && sec->output_section != NULL) +- gp_val += sec->output_section->vma + sec->output_offset; ++ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) ++ { ++ if (sec != NULL && sec->output_section != NULL) ++ gp_val += sec->output_section->vma + sec->output_offset; + +- elf_gp (abfd) = gp_val; ++ elf_gp (abfd) = gp_val; ++ } + return TRUE; + } + diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index df16775..b46ed2d 100644 --- a/bfd/elf32-i386.c @@ -249,6 +478,70 @@ index 2657736..94ef09e 100644 case R_MICROBLAZE_64: case R_MICROBLAZE_64_PCREL: case R_MICROBLAZE_32: +diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c +index 8a00fb4..f9a32c2 100644 +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -5942,17 +5942,18 @@ allocate_got (struct ppc_elf_link_hash_table *htab, unsigned int need) + return where; + } + +-/* If H is undefined weak, make it dynamic if that makes sense. */ ++/* If H is undefined, make it dynamic if that makes sense. */ + + static bfd_boolean +-ensure_undefweak_dynamic (struct bfd_link_info *info, +- struct elf_link_hash_entry *h) ++ensure_undef_dynamic (struct bfd_link_info *info, ++ struct elf_link_hash_entry *h) + { + struct elf_link_hash_table *htab = elf_hash_table (info); + + if (htab->dynamic_sections_created +- && info->dynamic_undefined_weak != 0 +- && h->root.type == bfd_link_hash_undefweak ++ && ((info->dynamic_undefined_weak != 0 ++ && h->root.type == bfd_link_hash_undefweak) ++ || h->root.type == bfd_link_hash_undefined) + && h->dynindx == -1 + && !h->forced_local + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) +@@ -5986,9 +5987,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + { + unsigned int need; + +- /* Make sure this symbol is output as a dynamic symbol. +- Undefined weak syms won't yet be marked as dynamic. */ +- if (!ensure_undefweak_dynamic (info, &eh->elf)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, &eh->elf)) + return FALSE; + + need = 0; +@@ -6102,9 +6102,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + + if (eh->dyn_relocs != NULL) + { +- /* Make sure undefined weak symbols are output as a dynamic +- symbol in PIEs. */ +- if (!ensure_undefweak_dynamic (info, h)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, h)) + return FALSE; + } + } +@@ -6120,9 +6119,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + && eh->has_addr16_lo + && htab->params->pic_fixup > 0)) + { +- /* Make sure this symbol is output as a dynamic symbol. +- Undefined weak syms won't yet be marked as dynamic. */ +- if (!ensure_undefweak_dynamic (info, h)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, h)) + return FALSE; + + if (h->dynindx == -1) diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index c26bdcf..4aa3915 100644 --- a/bfd/elf32-s390.c @@ -275,10 +568,20 @@ index c26bdcf..4aa3915 100644 if (local_plt != NULL) for (i = 0; i < symtab_hdr->sh_info; i++) diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c -index 6389cd2..689eac8 100644 +index 6389cd2..4ff3f06 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c -@@ -4010,6 +4010,10 @@ struct ppc_link_hash_entry +@@ -3919,6 +3919,9 @@ struct map_stub + /* Whether to emit a copy of register save/restore functions in this + group. */ + int needs_save_res; ++ /* The offset of the __tls_get_addr_opt plt stub bctrl in this group, ++ or -1u if no such stub with bctrl exists. */ ++ unsigned int tls_get_addr_opt_bctrl; + }; + + struct ppc_stub_hash_entry { +@@ -4010,6 +4013,10 @@ struct ppc_link_hash_entry with non-standard calling convention. */ unsigned int save_res:1; @@ -289,7 +592,7 @@ index 6389cd2..689eac8 100644 /* Contexts in which symbol is used in the GOT (or TOC). TLS_GD .. TLS_EXPLICIT bits are or'd into the mask as the corresponding relocs are encountered during check_relocs. -@@ -5018,7 +5022,7 @@ ppc64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, +@@ -5018,7 +5025,7 @@ ppc64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, static bfd_boolean ppc64_elf_merge_symbol (struct elf_link_hash_entry *h, @@ -298,7 +601,7 @@ index 6389cd2..689eac8 100644 asection **psec ATTRIBUTE_UNUSED, bfd_boolean newdef ATTRIBUTE_UNUSED, bfd_boolean olddef ATTRIBUTE_UNUSED, -@@ -5026,6 +5030,8 @@ ppc64_elf_merge_symbol (struct elf_link_hash_entry *h, +@@ -5026,6 +5033,8 @@ ppc64_elf_merge_symbol (struct elf_link_hash_entry *h, const asection *oldsec ATTRIBUTE_UNUSED) { ((struct ppc_link_hash_entry *) h)->fake = 0; @@ -307,7 +610,7 @@ index 6389cd2..689eac8 100644 return TRUE; } -@@ -6332,6 +6338,7 @@ is_elfv2_localentry0 (struct elf_link_hash_entry *h) +@@ -6332,6 +6341,7 @@ is_elfv2_localentry0 (struct elf_link_hash_entry *h) && h->type == STT_FUNC && h->root.type == bfd_link_hash_defined && (STO_PPC64_LOCAL_MASK & h->other) == 0 @@ -315,7 +618,7 @@ index 6389cd2..689eac8 100644 && is_ppc64_elf (h->root.u.def.section->owner) && abiversion (h->root.u.def.section->owner) >= 2); } -@@ -8346,10 +8353,28 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) +@@ -8346,10 +8356,28 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) else if (!htab->do_multi_toc) htab->params->no_multi_toc = 1; @@ -347,6 +650,396 @@ index 6389cd2..689eac8 100644 htab->tls_get_addr = ((struct ppc_link_hash_entry *) elf_link_hash_lookup (&htab->elf, ".__tls_get_addr", +@@ -9715,17 +9743,18 @@ merge_got_entries (struct got_entry **pent) + } + } + +-/* If H is undefined weak, make it dynamic if that makes sense. */ ++/* If H is undefined, make it dynamic if that makes sense. */ + + static bfd_boolean +-ensure_undefweak_dynamic (struct bfd_link_info *info, +- struct elf_link_hash_entry *h) ++ensure_undef_dynamic (struct bfd_link_info *info, ++ struct elf_link_hash_entry *h) + { + struct elf_link_hash_table *htab = elf_hash_table (info); + + if (htab->dynamic_sections_created +- && info->dynamic_undefined_weak != 0 +- && h->root.type == bfd_link_hash_undefweak ++ && ((info->dynamic_undefined_weak != 0 ++ && h->root.type == bfd_link_hash_undefweak) ++ || h->root.type == bfd_link_hash_undefined) + && h->dynindx == -1 + && !h->forced_local + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) +@@ -9804,9 +9833,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + for (gent = h->got.glist; gent != NULL; gent = gent->next) + if (!gent->is_indirect) + { +- /* Make sure this symbol is output as a dynamic symbol. +- Undefined weak syms won't yet be marked as dynamic. */ +- if (!ensure_undefweak_dynamic (info, h)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, h)) + return FALSE; + + if (!is_ppc64_elf (gent->owner)) +@@ -9860,9 +9888,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + + if (eh->dyn_relocs != NULL) + { +- /* Make sure this symbol is output as a dynamic symbol. +- Undefined weak syms won't yet be marked as dynamic. */ +- if (!ensure_undefweak_dynamic (info, h)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, h)) + return FALSE; + } + } +@@ -9897,9 +9924,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + if (!h->non_got_ref + && !h->def_regular) + { +- /* Make sure this symbol is output as a dynamic symbol. +- Undefined weak syms won't yet be marked as dynamic. */ +- if (!ensure_undefweak_dynamic (info, h)) ++ /* Make sure this symbol is output as a dynamic symbol. */ ++ if (!ensure_undef_dynamic (info, h)) + return FALSE; + + if (h->dynindx == -1) +@@ -11386,6 +11412,15 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) + - htab->sec_info[stub_entry->group->link_sec->id].toc_off); + + size = plt_stub_size (htab, stub_entry, off); ++ if (stub_entry->h != NULL ++ && (stub_entry->h == htab->tls_get_addr_fd ++ || stub_entry->h == htab->tls_get_addr) ++ && htab->params->tls_get_addr_opt ++ && (ALWAYS_EMIT_R2SAVE ++ || stub_entry->stub_type == ppc_stub_plt_call_r2save)) ++ stub_entry->group->tls_get_addr_opt_bctrl ++ = stub_entry->group->stub_sec->size + size - 5 * 4; ++ + if (htab->params->plt_stub_align) + size += plt_stub_pad (htab, stub_entry, off); + if (info->emitrelocations) +@@ -12252,6 +12287,7 @@ group_sections (struct bfd_link_info *info, + group->link_sec = curr; + group->stub_sec = NULL; + group->needs_save_res = 0; ++ group->tls_get_addr_opt_bctrl = -1u; + group->next = htab->group; + htab->group = group; + do +@@ -12302,6 +12338,27 @@ static const unsigned char glink_eh_frame_cie[] = + DW_CFA_def_cfa, 1, 0 /* def_cfa: r1 offset 0. */ + }; + ++static size_t ++stub_eh_frame_size (struct map_stub *group, size_t align) ++{ ++ size_t this_size = 17; ++ if (group->tls_get_addr_opt_bctrl != -1u) ++ { ++ unsigned int to_bctrl = group->tls_get_addr_opt_bctrl / 4; ++ if (to_bctrl < 64) ++ this_size += 1; ++ else if (to_bctrl < 256) ++ this_size += 2; ++ else if (to_bctrl < 65536) ++ this_size += 3; ++ else ++ this_size += 5; ++ this_size += 6; ++ } ++ this_size = (this_size + align - 1) & -align; ++ return this_size; ++} ++ + /* Stripping output sections is normally done before dynamic section + symbols have been allocated. This function is called later, and + handles cases like htab->brlt which is mapped to its own output +@@ -12404,7 +12461,6 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + bfd *input_bfd; + unsigned int bfd_indx; + struct map_stub *group; +- asection *stub_sec; + + htab->stub_iteration += 1; + +@@ -12722,11 +12778,11 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + + /* We may have added some stubs. Find out the new size of the + stub sections. */ +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL) + { ++ asection *stub_sec = group->stub_sec; ++ + if (htab->stub_iteration <= STUB_SHRINK_ITER + || stub_sec->rawsize < stub_sec->size) + /* Past STUB_SHRINK_ITER, rawsize is the max size seen. */ +@@ -12761,11 +12817,9 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + { + size_t size = 0, align = 4; + +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) +- size += (17 + align - 1) & -align; ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL) ++ size += stub_eh_frame_size (group, align); + if (htab->glink != NULL && htab->glink->size != 0) + size += (24 + align - 1) & -align; + if (size != 0) +@@ -12777,24 +12831,20 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + } + + if (htab->params->plt_stub_align != 0) +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) +- stub_sec->size = ((stub_sec->size +- + (1 << htab->params->plt_stub_align) - 1) +- & -(1 << htab->params->plt_stub_align)); +- +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0 +- && stub_sec->rawsize != stub_sec->size ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL) ++ group->stub_sec->size = ((group->stub_sec->size ++ + (1 << htab->params->plt_stub_align) - 1) ++ & -(1 << htab->params->plt_stub_align)); ++ ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL ++ && group->stub_sec->rawsize != group->stub_sec->size + && (htab->stub_iteration <= STUB_SHRINK_ITER +- || stub_sec->rawsize < stub_sec->size)) ++ || group->stub_sec->rawsize < group->stub_sec->size)) + break; + +- if (stub_sec == NULL ++ if (group == NULL + && (htab->glink_eh_frame == NULL + || htab->glink_eh_frame->rawsize == htab->glink_eh_frame->size)) + break; +@@ -12809,7 +12859,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + bfd_vma val; + bfd_byte *p, *last_fde; + size_t last_fde_len, size, align, pad; +- asection *stub_sec; ++ struct map_stub *group; + + p = bfd_zalloc (htab->glink_eh_frame->owner, htab->glink_eh_frame->size); + if (p == NULL) +@@ -12824,13 +12874,11 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + bfd_put_32 (htab->elf.dynobj, last_fde_len, p); + p += last_fde_len + 4; + +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL) + { + last_fde = p; +- last_fde_len = ((17 + align - 1) & -align) - 4; ++ last_fde_len = stub_eh_frame_size (group, align) - 4; + /* FDE length. */ + bfd_put_32 (htab->elf.dynobj, last_fde_len, p); + p += 4; +@@ -12841,12 +12889,44 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) + /* Offset to stub section, written later. */ + p += 4; + /* stub section size. */ +- bfd_put_32 (htab->elf.dynobj, stub_sec->size, p); ++ bfd_put_32 (htab->elf.dynobj, group->stub_sec->size, p); + p += 4; + /* Augmentation. */ + p += 1; ++ if (group->tls_get_addr_opt_bctrl != -1u) ++ { ++ unsigned int to_bctrl = group->tls_get_addr_opt_bctrl / 4; ++ ++ /* This FDE needs more than just the default. ++ Describe __tls_get_addr_opt stub LR. */ ++ if (to_bctrl < 64) ++ *p++ = DW_CFA_advance_loc + to_bctrl; ++ else if (to_bctrl < 256) ++ { ++ *p++ = DW_CFA_advance_loc1; ++ *p++ = to_bctrl; ++ } ++ else if (to_bctrl < 65536) ++ { ++ *p++ = DW_CFA_advance_loc2; ++ bfd_put_16 (htab->elf.dynobj, to_bctrl, p); ++ p += 2; ++ } ++ else ++ { ++ *p++ = DW_CFA_advance_loc4; ++ bfd_put_32 (htab->elf.dynobj, to_bctrl, p); ++ p += 4; ++ } ++ *p++ = DW_CFA_offset_extended_sf; ++ *p++ = 65; ++ *p++ = -(STK_LINKER (htab) / 8) & 0x7f; ++ *p++ = DW_CFA_advance_loc + 4; ++ *p++ = DW_CFA_restore_extended; ++ *p++ = 65; ++ } + /* Pad. */ +- p += ((17 + align - 1) & -align) - 17; ++ p = last_fde + last_fde_len + 4; + } + if (htab->glink != NULL && htab->glink->size != 0) + { +@@ -13115,10 +13195,8 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, + return FALSE; + + /* Allocate memory to hold the linker stubs. */ +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0 ++ for (group = htab->group; group != NULL; group = group->next) ++ if ((stub_sec = group->stub_sec) != NULL + && stub_sec->size != 0) + { + stub_sec->contents = bfd_zalloc (htab->params->stub_bfd, stub_sec->size); +@@ -13300,18 +13378,14 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, + htab->relbrlt->reloc_count = 0; + + if (htab->params->plt_stub_align != 0) +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) ++ for (group = htab->group; group != NULL; group = group->next) ++ if ((stub_sec = group->stub_sec) != NULL) + stub_sec->size = ((stub_sec->size + + (1 << htab->params->plt_stub_align) - 1) + & -(1 << htab->params->plt_stub_align)); + +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) ++ for (group = htab->group; group != NULL; group = group->next) ++ if ((stub_sec = group->stub_sec) != NULL) + { + stub_sec_count += 1; + if (stub_sec->rawsize != stub_sec->size +@@ -13323,7 +13397,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, + /* Note that the glink_eh_frame check here is not only testing that + the generated size matched the calculated size but also that + bfd_elf_discard_info didn't make any changes to the section. */ +- if (stub_sec != NULL ++ if (group != NULL + || (htab->glink_eh_frame != NULL + && htab->glink_eh_frame->rawsize != htab->glink_eh_frame->size)) + { +@@ -15743,55 +15817,40 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, + { + bfd_vma val; + bfd_byte *p; +- asection *stub_sec; ++ struct map_stub *group; + size_t align = 4; + + p = htab->glink_eh_frame->contents; + p += (sizeof (glink_eh_frame_cie) + align - 1) & -align; +- for (stub_sec = htab->params->stub_bfd->sections; +- stub_sec != NULL; +- stub_sec = stub_sec->next) +- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) ++ ++ for (group = htab->group; group != NULL; group = group->next) ++ if (group->stub_sec != NULL) + { +- /* FDE length. */ +- p += 4; +- /* CIE pointer. */ +- p += 4; + /* Offset to stub section. */ +- val = (stub_sec->output_section->vma +- + stub_sec->output_offset); ++ val = (group->stub_sec->output_section->vma ++ + group->stub_sec->output_offset); + val -= (htab->glink_eh_frame->output_section->vma + + htab->glink_eh_frame->output_offset +- + (p - htab->glink_eh_frame->contents)); ++ + (p + 8 - htab->glink_eh_frame->contents)); + if (val + 0x80000000 > 0xffffffff) + { + info->callbacks->einfo + (_("%P: %s offset too large for .eh_frame sdata4 encoding"), +- stub_sec->name); ++ group->stub_sec->name); + return FALSE; + } +- bfd_put_32 (dynobj, val, p); +- p += 4; +- /* stub section size. */ +- p += 4; +- /* Augmentation. */ +- p += 1; +- /* Pad. */ +- p += ((17 + align - 1) & -align) - 17; ++ bfd_put_32 (dynobj, val, p + 8); ++ p += stub_eh_frame_size (group, align); + } + if (htab->glink != NULL && htab->glink->size != 0) + { +- /* FDE length. */ +- p += 4; +- /* CIE pointer. */ +- p += 4; + /* Offset to .glink. */ + val = (htab->glink->output_section->vma + + htab->glink->output_offset + + 8); + val -= (htab->glink_eh_frame->output_section->vma + + htab->glink_eh_frame->output_offset +- + (p - htab->glink_eh_frame->contents)); ++ + (p + 8 - htab->glink_eh_frame->contents)); + if (val + 0x80000000 > 0xffffffff) + { + info->callbacks->einfo +@@ -15799,15 +15858,8 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, + htab->glink->name); + return FALSE; + } +- bfd_put_32 (dynobj, val, p); +- p += 4; +- /* .glink size. */ +- p += 4; +- /* Augmentation. */ +- p += 1; +- /* Ops. */ +- p += 7; +- p += ((24 + align - 1) & -align) - 24; ++ bfd_put_32 (dynobj, val, p + 8); ++ p += (24 + align - 1) & -align; + } + + if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index f85f8cd..d25c72b 100644 --- a/bfd/elf64-s390.c @@ -399,6 +1092,173 @@ index c80a9ca..821a7d9c 100644 { htab->elf.dynobj = abfd; dynobj = abfd; +diff --git a/bfd/elflink.c b/bfd/elflink.c +index bb1a30a..736fb4c 100644 +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -12338,7 +12338,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) + get_vma: + o = bfd_get_linker_section (dynobj, name); + do_vma: +- if (o == NULL) ++ if (o == NULL || bfd_is_abs_section (o->output_section)) + { + _bfd_error_handler + (_("could not find section %s"), name); +@@ -14226,18 +14226,30 @@ struct bfd_link_hash_entry * + bfd_elf_define_start_stop (struct bfd_link_info *info, + const char *symbol, asection *sec) + { +- struct bfd_link_hash_entry *h; ++ struct elf_link_hash_entry *h; + +- h = bfd_generic_define_start_stop (info, symbol, sec); +- if (h != NULL) ++ h = elf_link_hash_lookup (elf_hash_table (info), symbol, ++ FALSE, FALSE, TRUE); ++ if (h != NULL ++ && (h->root.type == bfd_link_hash_undefined ++ || h->root.type == bfd_link_hash_undefweak ++ || (h->ref_regular && !h->def_regular))) + { +- struct elf_link_hash_entry *eh = (struct elf_link_hash_entry *) h; +- eh->start_stop = 1; +- eh->u2.start_stop_section = sec; +- _bfd_elf_link_hash_hide_symbol (info, eh, TRUE); +- if (ELF_ST_VISIBILITY (eh->other) != STV_INTERNAL) +- eh->other = ((eh->other & ~ELF_ST_VISIBILITY (-1)) +- | STV_HIDDEN); ++ h->root.type = bfd_link_hash_defined; ++ h->root.u.def.section = sec; ++ h->root.u.def.value = 0; ++ h->def_regular = 1; ++ h->def_dynamic = 0; ++ h->start_stop = 1; ++ h->u2.start_stop_section = sec; ++ if (symbol[0] == '.') ++ { ++ /* .startof. and .sizeof. symbols are local. */ ++ _bfd_elf_link_hash_hide_symbol (info, h, TRUE); ++ } ++ else if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) ++ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED; ++ return &h->root; + } +- return h; ++ return NULL; + } +diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c +index 86bae0e..74beaf4 100644 +--- a/bfd/elfnn-aarch64.c ++++ b/bfd/elfnn-aarch64.c +@@ -4981,9 +4981,27 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, + const char *name; + bfd_vma addend = 0; + +- if ((input_section->flags & SEC_ALLOC) == 0 +- || h->plt.offset == (bfd_vma) -1) +- abort (); ++ if ((input_section->flags & SEC_ALLOC) == 0) ++ { ++ /* Dynamic relocs are not propagated for SEC_DEBUGGING ++ sections because such sections are not SEC_ALLOC and ++ thus ld.so will not process them. */ ++ if ((input_section->flags & SEC_DEBUGGING) != 0) ++ return bfd_reloc_ok; ++ ++ if (h->root.root.string) ++ name = h->root.root.string; ++ else ++ name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, NULL); ++ _bfd_error_handler ++ /* xgettext:c-format */ ++ (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"), ++ input_bfd, input_section, rel->r_offset, howto->name, name); ++ bfd_set_error (bfd_error_bad_value); ++ return FALSE; ++ } ++ else if (h->plt.offset == (bfd_vma) -1) ++ goto bad_ifunc_reloc; + + /* STT_GNU_IFUNC symbol must go through PLT. */ + plt = globals->root.splt ? globals->root.splt : globals->root.iplt; +@@ -4992,6 +5010,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, + switch (bfd_r_type) + { + default: ++bad_ifunc_reloc: + if (h->root.root.string) + name = h->root.root.string; + else +@@ -7634,8 +7653,39 @@ elfNN_aarch64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE + const asection *rel_sec ATTRIBUTE_UNUSED, + const Elf_Internal_Rela *rela) + { ++ struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info); ++ ++ if (htab->root.dynsym != NULL ++ && htab->root.dynsym->contents != NULL) ++ { ++ /* Check relocation against STT_GNU_IFUNC symbol if there are ++ dynamic symbols. */ ++ bfd *abfd = info->output_bfd; ++ const struct elf_backend_data *bed = get_elf_backend_data (abfd); ++ unsigned long r_symndx = ELFNN_R_SYM (rela->r_info); ++ if (r_symndx != STN_UNDEF) ++ { ++ Elf_Internal_Sym sym; ++ if (!bed->s->swap_symbol_in (abfd, ++ (htab->root.dynsym->contents ++ + r_symndx * bed->s->sizeof_sym), ++ 0, &sym)) ++ { ++ /* xgettext:c-format */ ++ _bfd_error_handler (_("%B symbol number %lu references" ++ " nonexistent SHT_SYMTAB_SHNDX section"), ++ abfd, r_symndx); ++ /* Ideally an error class should be returned here. */ ++ } ++ else if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) ++ return reloc_class_ifunc; ++ } ++ } ++ + switch ((int) ELFNN_R_TYPE (rela->r_info)) + { ++ case AARCH64_R (IRELATIVE): ++ return reloc_class_ifunc; + case AARCH64_R (RELATIVE): + return reloc_class_relative; + case AARCH64_R (JUMP_SLOT): +diff --git a/bfd/mach-o.c b/bfd/mach-o.c +index 2c1973c..51920df 100644 +--- a/bfd/mach-o.c ++++ b/bfd/mach-o.c +@@ -3749,6 +3749,9 @@ bfd_mach_o_read_symtab_strtab (bfd *abfd) + } + else + { ++ /* See PR 21840 for a reproducer. */ ++ if ((sym->strsize + 1) == 0) ++ return FALSE; + sym->strtab = bfd_alloc (abfd, sym->strsize + 1); + if (sym->strtab == NULL) + return FALSE; +diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h +index 6d6aed0..350c83e 100644 +--- a/bfd/nlmcode.h ++++ b/bfd/nlmcode.h +@@ -351,7 +351,9 @@ nlm_swap_auxiliary_headers_in (bfd *abfd) + bfd_byte *contents; + bfd_byte *p, *pend; + +- BFD_ASSERT (hdrLength == 0 && hdr == NULL); ++ /* See PR 21840 for a reproducer. */ ++ if (hdrLength != 0 || hdr != NULL) ++ return FALSE; + + pos = bfd_tell (abfd); + if (bfd_seek (abfd, dataOffset, SEEK_SET) != 0) diff --git a/bfd/po/fr.po b/bfd/po/fr.po index 6cd65af..fe2855f 100644 --- a/bfd/po/fr.po @@ -11177,13 +12037,39 @@ index 6cd65af..fe2855f 100644 #~ msgid "%B: %A+0x%lx: jump to stub routine which is not jal" #~ msgstr "%B: %A+0x%lx: saut vers la routine dans la partie de l'ébauche (stub) qui n'est pas jal" +diff --git a/bfd/section.c b/bfd/section.c +index 28eee7f..811d42a 100644 +--- a/bfd/section.c ++++ b/bfd/section.c +@@ -1240,7 +1240,7 @@ bfd_make_section_with_flags (bfd *abfd, const char *name, + struct section_hash_entry *sh; + asection *newsect; + +- if (abfd->output_has_begun) ++ if (abfd == NULL || name == NULL || abfd->output_has_begun) + { + bfd_set_error (bfd_error_invalid_operation); + return NULL; +diff --git a/bfd/tekhex.c b/bfd/tekhex.c +index 1d605d5..cb4b624 100644 +--- a/bfd/tekhex.c ++++ b/bfd/tekhex.c +@@ -307,7 +307,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp) + len = hex_value (*src++); + if (len == 0) + len = 16; +- for (i = 0; i < len && src < endp; i++) ++ for (i = 0; i < len && (src + i) < endp; i++) + dstp[i] = src[i]; + dstp[i] = 0; + *srcp = src + i; diff --git a/bfd/version.h b/bfd/version.h -index f3dfbf0..4b54927 100644 +index f3dfbf0..0c457a2 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20170724 -+#define BFD_VERSION_DATE 20170811 ++#define BFD_VERSION_DATE 20170830 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ @@ -11194,21 +12080,170 @@ index a54e7f8..d840ef6 100644 @@ -1 +1 @@ -m4_define([BFD_VERSION], [2.29]) +m4_define([BFD_VERSION], [2.29.0]) +diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c +index 91e8b6e..0b41db4 100644 +--- a/bfd/vms-alpha.c ++++ b/bfd/vms-alpha.c +@@ -895,7 +895,7 @@ _bfd_vms_slurp_ehdr (bfd *abfd) + + vms_rec = PRIV (recrd.rec); + /* PR 17512: file: 62736583. */ +- end = vms_rec + PRIV (recrd.buf_size); ++ end = PRIV (recrd.buf) + PRIV (recrd.buf_size); + + vms_debug2 ((2, "HDR/EMH\n")); + +@@ -5685,8 +5685,9 @@ evax_bfd_print_emh (FILE *file, unsigned char *rec, unsigned int rec_len) + { + struct vms_emh_common *emh = (struct vms_emh_common *)rec; + unsigned int subtype; ++ int extra; + +- subtype = (unsigned)bfd_getl16 (emh->subtyp); ++ subtype = (unsigned) bfd_getl16 (emh->subtyp); + + /* xgettext:c-format */ + fprintf (file, _(" EMH %u (len=%u): "), subtype, rec_len); +@@ -5697,58 +5698,82 @@ evax_bfd_print_emh (FILE *file, unsigned char *rec, unsigned int rec_len) + fprintf (file, _(" Error: The length is less than the length of an EMH record\n")); + return; + } +- ++ extra = rec_len - sizeof (struct vms_emh_common); ++ + switch (subtype) + { + case EMH__C_MHD: + { +- struct vms_emh_mhd *mhd = (struct vms_emh_mhd *)rec; +- const char *name; ++ struct vms_emh_mhd *mhd = (struct vms_emh_mhd *) rec; ++ const char * name; ++ const char * nextname; ++ const char * maxname; + ++ /* PR 21840: Check for invalid lengths. */ ++ if (rec_len < sizeof (* mhd)) ++ { ++ fprintf (file, _(" Error: The record length is less than the size of an EMH_MHD record\n")); ++ return; ++ } + fprintf (file, _("Module header\n")); + fprintf (file, _(" structure level: %u\n"), mhd->strlvl); + fprintf (file, _(" max record size: %u\n"), +- (unsigned)bfd_getl32 (mhd->recsiz)); ++ (unsigned) bfd_getl32 (mhd->recsiz)); + name = (char *)(mhd + 1); ++ maxname = (char *) rec + rec_len; ++ if (name > maxname - 2) ++ { ++ fprintf (file, _(" Error: The module name is missing\n")); ++ return; ++ } ++ nextname = name + name[0] + 1; ++ if (nextname >= maxname) ++ { ++ fprintf (file, _(" Error: The module name is too long\n")); ++ return; ++ } + fprintf (file, _(" module name : %.*s\n"), name[0], name + 1); +- name += name[0] + 1; ++ name = nextname; ++ if (name > maxname - 2) ++ { ++ fprintf (file, _(" Error: The module version is missing\n")); ++ return; ++ } ++ nextname = name + name[0] + 1; ++ if (nextname >= maxname) ++ { ++ fprintf (file, _(" Error: The module version is too long\n")); ++ return; ++ } + fprintf (file, _(" module version : %.*s\n"), name[0], name + 1); +- name += name[0] + 1; +- fprintf (file, _(" compile date : %.17s\n"), name); ++ name = nextname; ++ if ((maxname - name) < 17 && maxname[-1] != 0) ++ fprintf (file, _(" Error: The compile date is truncated\n")); ++ else ++ fprintf (file, _(" compile date : %.17s\n"), name); + } + break; ++ + case EMH__C_LNM: +- { +- fprintf (file, _("Language Processor Name\n")); +- fprintf (file, _(" language name: %.*s\n"), +- (int)(rec_len - sizeof (struct vms_emh_common)), +- (char *)rec + sizeof (struct vms_emh_common)); +- } ++ fprintf (file, _("Language Processor Name\n")); ++ fprintf (file, _(" language name: %.*s\n"), extra, (char *)(emh + 1)); + break; ++ + case EMH__C_SRC: +- { +- fprintf (file, _("Source Files Header\n")); +- fprintf (file, _(" file: %.*s\n"), +- (int)(rec_len - sizeof (struct vms_emh_common)), +- (char *)rec + sizeof (struct vms_emh_common)); +- } ++ fprintf (file, _("Source Files Header\n")); ++ fprintf (file, _(" file: %.*s\n"), extra, (char *)(emh + 1)); + break; ++ + case EMH__C_TTL: +- { +- fprintf (file, _("Title Text Header\n")); +- fprintf (file, _(" title: %.*s\n"), +- (int)(rec_len - sizeof (struct vms_emh_common)), +- (char *)rec + sizeof (struct vms_emh_common)); +- } ++ fprintf (file, _("Title Text Header\n")); ++ fprintf (file, _(" title: %.*s\n"), extra, (char *)(emh + 1)); + break; ++ + case EMH__C_CPR: +- { +- fprintf (file, _("Copyright Header\n")); +- fprintf (file, _(" copyright: %.*s\n"), +- (int)(rec_len - sizeof (struct vms_emh_common)), +- (char *)rec + sizeof (struct vms_emh_common)); +- } ++ fprintf (file, _("Copyright Header\n")); ++ fprintf (file, _(" copyright: %.*s\n"), extra, (char *)(emh + 1)); + break; ++ + default: + fprintf (file, _("unhandled emh subtype %u\n"), subtype); + break; +@@ -6220,7 +6245,7 @@ evax_bfd_print_etir (FILE *file, const char *name, + fprintf (file, _("OPR_ADD (add)\n")); + break; + case ETIR__C_OPR_SUB: +- fprintf (file, _("OPR_SUB (substract)\n")); ++ fprintf (file, _("OPR_SUB (subtract)\n")); + break; + case ETIR__C_OPR_MUL: + fprintf (file, _("OPR_MUL (multiply)\n")); diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index b74dbcf..35c9a61 100644 +index b74dbcf..7c9b86f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog -@@ -2,6 +2,10 @@ - - * configure: Regenerate. - +@@ -1,3 +1,12 @@ ++2017-08-12 Alan Modra ++ ++ * readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes ++ by name data. ++ +2017-07-24 Tristan Gingold + + * configure: Regenerate. + - 2017-07-21 Nick Clifton + 2017-07-24 Tristan Gingold - * po/fr.po: Updated French translation. + * configure: Regenerate. diff --git a/binutils/configure b/binutils/configure index e903709..38d08d0 100755 --- a/binutils/configure @@ -11295,6 +12330,38 @@ index e903709..38d08d0 100755 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +diff --git a/binutils/readelf.c b/binutils/readelf.c +index b2f75c0..9bbfc95 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -17465,8 +17465,11 @@ process_note (Elf_Internal_Note * pnote, + + printf (" "); + +- if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN +- || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC) ++ if (((const_strneq (pnote->namedata, "GA") ++ && strchr ("*$!+", pnote->namedata[2]) != NULL) ++ || strchr ("*$!+", pnote->namedata[0]) != NULL) ++ && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN ++ || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) + print_gnu_build_attribute_name (pnote); + else + print_symbol (-20, name); +@@ -17484,8 +17487,11 @@ process_note (Elf_Internal_Note * pnote, + return print_stapsdt_note (pnote); + else if (const_strneq (pnote->namedata, "CORE")) + return print_core_note (pnote); +- else if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN +- || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC) ++ else if (((const_strneq (pnote->namedata, "GA") ++ && strchr ("*$!+", pnote->namedata[2]) != NULL) ++ || strchr ("*$!+", pnote->namedata[0]) != NULL) ++ && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN ++ || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) + return print_gnu_build_attribute_description (pnote, file); + + if (pnote->descsz) diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index fc864bf..f669248 100644 --- a/elfcpp/ChangeLog @@ -11343,10 +12410,21 @@ index a57f547..cccec4c 100644 template diff --git a/gas/ChangeLog b/gas/ChangeLog -index d5b208a..6540ac2 100644 +index d5b208a..0de5dd8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog -@@ -1,3 +1,46 @@ +@@ -1,3 +1,57 @@ ++2017-08-15 Ramana Radhakrishnan ++ ++ Backport from mainline: ++ * config/tc-aarch64.c (REGDEF_ALIAS): Define ++ (reg_names): Update for ip0, ip1, fp, lr to use REGDEF_ALIAS ++ * doc/c-aarch64.texi: Update documentation on .req. ++ * testsuite/gas/diagnostic.s: Update ++ * testsuite/gas/diagnostic.l: Likewise ++ * testsuite/gas/register_aliases.s: New file. ++ * testsuite/gas/register_aliases.d: New file. ++ +2017-08-10 Nick Clifton + + Backport from mainline: @@ -11445,6 +12523,48 @@ index 28867bd..8cc9581 100644 ms->indirect_syms[n] = sym; } } +diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c +index f095ab9..e805863 100644 +--- a/gas/config/tc-aarch64.c ++++ b/gas/config/tc-aarch64.c +@@ -6772,6 +6772,7 @@ aarch64_canonicalize_symbol_name (char *name) + also have mixed-case names. */ + + #define REGDEF(s,n,t) { #s, n, REG_TYPE_##t, TRUE } ++#define REGDEF_ALIAS(s, n, t) { #s, n, REG_TYPE_##t, FALSE} + #define REGNUM(p,n,t) REGDEF(p##n, n, t) + #define REGSET16(p,t) \ + REGNUM(p, 0,t), REGNUM(p, 1,t), REGNUM(p, 2,t), REGNUM(p, 3,t), \ +@@ -6793,17 +6794,16 @@ static const reg_entry reg_names[] = { + REGSET31 (x, R_64), REGSET31 (X, R_64), + REGSET31 (w, R_32), REGSET31 (W, R_32), + ++ REGDEF_ALIAS (ip0, 16, R_64), REGDEF_ALIAS (IP0, 16, R_64), ++ REGDEF_ALIAS (ip1, 17, R_64), REGDEF_ALIAS (IP1, 16, R_64), ++ REGDEF_ALIAS (fp, 29, R_64), REGDEF_ALIAS (FP, 29, R_64), ++ REGDEF_ALIAS (lr, 30, R_64), REGDEF_ALIAS (LR, 30, R_64), + REGDEF (wsp, 31, SP_32), REGDEF (WSP, 31, SP_32), + REGDEF (sp, 31, SP_64), REGDEF (SP, 31, SP_64), + + REGDEF (wzr, 31, Z_32), REGDEF (WZR, 31, Z_32), + REGDEF (xzr, 31, Z_64), REGDEF (XZR, 31, Z_64), + +- REGDEF (ip0, 16, R_64), REGDEF (IP0, 16, R_64), +- REGDEF (ip1, 17, R_64), REGDEF (IP1, 17, R_64), +- REGDEF (fp, 29, R_64), REGDEF (FP, 29, R_64), +- REGDEF (lr, 30, R_64), REGDEF (LR, 30, R_64), +- + /* Floating-point single precision registers. */ + REGSET (s, FP_S), REGSET (S, FP_S), + +@@ -6830,6 +6830,7 @@ static const reg_entry reg_names[] = { + }; + + #undef REGDEF ++#undef REGDEF_ALIAS + #undef REGNUM + #undef REGSET16 + #undef REGSET31 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index e22ffe6..c3662da 100644 --- a/gas/config/tc-arm.c @@ -11585,6 +12705,20 @@ index e0637c7..b82204d 100644 @item -mregnames @itemx -mno-regnames Allow or disallow symbolic names for registers. +diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi +index 6774205..e73d48c 100644 +--- a/gas/doc/c-aarch64.texi ++++ b/gas/doc/c-aarch64.texi +@@ -363,6 +363,9 @@ example: + foo .req w0 + @end smallexample + ++ip0, ip1, lr and fp are automatically defined to ++alias to X16, X17, X30 and X29 respectively. ++ + @c SSSSSSSSSSSSSSSSSSSSSSSSSS + + @c TTTTTTTTTTTTTTTTTTTTTTTTTT diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi index 2f417cb..a50d726 100644 --- a/gas/doc/c-s390.texi @@ -11598,6 +12732,63 @@ index 2f417cb..a50d726 100644 @menu * s390 Options:: Command-line Options. +diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l +index b749d2e..cd3ce99 100644 +--- a/gas/testsuite/gas/aarch64/diagnostic.l ++++ b/gas/testsuite/gas/aarch64/diagnostic.l +@@ -172,3 +172,7 @@ + [^:]*:295: Error: invalid use of 'MUL' at operand 4 -- `orr x0,x0,#0xff,mul#1' + [^:]*:296: Error: invalid use of 'MUL' at operand 4 -- `orr x0,x0,#0xfe,mul#255' + [^:]*:297: Error: invalid use of 'MUL' at operand 4 -- `orr x0,x0,#0xfc,mul#256' ++[^:]*:299: Warning: ignoring redefinition of register alias 'ip0' ++[^:]*:300: Warning: ignoring redefinition of register alias 'ip1' ++[^:]*:301: Warning: ignoring redefinition of register alias 'lr' ++[^:]*:302: Warning: ignoring redefinition of register alias 'fp' +diff --git a/gas/testsuite/gas/aarch64/diagnostic.s b/gas/testsuite/gas/aarch64/diagnostic.s +index 09126e6..12e8504 100644 +--- a/gas/testsuite/gas/aarch64/diagnostic.s ++++ b/gas/testsuite/gas/aarch64/diagnostic.s +@@ -295,3 +295,8 @@ + orr x0, x0, #0xff, mul #1 + orr x0, x0, #0xfe, mul #255 + orr x0, x0, #0xfc, mul #256 ++ ++ ip0 .req x0 ++ ip1 .req x1 ++ lr .req x2 ++ fp .req x3 +diff --git a/gas/testsuite/gas/aarch64/register_aliases.d b/gas/testsuite/gas/aarch64/register_aliases.d +new file mode 100644 +index 0000000..677d5f0 +--- /dev/null ++++ b/gas/testsuite/gas/aarch64/register_aliases.d +@@ -0,0 +1,10 @@ ++#objdump: -dr ++ ++.*: file format .* ++ ++Disassembly of section \.text: ++ ++0+ <.*>: ++ 0: 8b1e0210 add x16, x16, x30 ++ 4: f90003b0 str x16, \[x29\] ++ 8: f94003b1 ldr x17, \[x29\] +\ No newline at end of file +diff --git a/gas/testsuite/gas/aarch64/register_aliases.s b/gas/testsuite/gas/aarch64/register_aliases.s +new file mode 100644 +index 0000000..5864283 +--- /dev/null ++++ b/gas/testsuite/gas/aarch64/register_aliases.s +@@ -0,0 +1,9 @@ ++ # test register aliases. ++ lr .req x30 ++ fp .req x29 ++ ip0 .req x16 ++ ip1 .req x17 ++ add ip0, ip0, lr ++ str ip0, [fp] ++ ldr ip1, [fp] ++ diff --git a/gas/testsuite/gas/arm/crc32-armv8-a-bad.d b/gas/testsuite/gas/arm/crc32-armv8-a-bad.d index 18d4844..bc559e0 100644 --- a/gas/testsuite/gas/arm/crc32-armv8-a-bad.d @@ -11733,12 +12924,28 @@ index ea520aa..01e1d22 100644 +[^:]*.s:16: Warning: using r15 results in unpredictable behaviour [^:]*.s:17: Warning: using r15 results in unpredictable behaviour diff --git a/gold/ChangeLog b/gold/ChangeLog -index b1b30cb..39a6bf1 100644 +index b1b30cb..6cfb34e 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog -@@ -1,3 +1,25 @@ +@@ -1,3 +1,41 @@ ++2017-08-28 Alan Modra ++ ++ PR 21847 ++ * powerpc.cc (Target_powerpc::is_elfv2_localentry0): Test ++ non_zero_localentry. ++ (Target_powerpc::resolve): New function. ++ (powerpc_info): Set has_resolve for 64-bit. ++ * target.h (Sized_target::resolve): Return bool. ++ * resolve.cc (Symbol_table::resolve): Continue with normal ++ processing when target resolve returns false. ++ * symtab.h (Symbol::non_zero_localentry, set_non_zero_localentry): ++ New accessors. ++ (Symbol::non_zero_localentry_): New flag bit. ++ * symtab.cc (Symbol::init_fields): Init non_zero_localentry_. ++ +2017-07-31 Alan Modra + ++ PR 21847 + * powerpc.cc (Target_powerpc::scan_relocs): Warn on --plt-localentry + without ld.so checks. + @@ -11762,6 +12969,127 @@ index b1b30cb..39a6bf1 100644 2017-07-23 Alan Modra * powerpc.cc (glink_eh_frame_fde_64v2): Correct advance to +diff --git a/gold/aarch64.cc b/gold/aarch64.cc +index 696df19..b4287a6 100644 +--- a/gold/aarch64.cc ++++ b/gold/aarch64.cc +@@ -1864,7 +1864,7 @@ class AArch64_relobj : public Sized_relobj_file + // applied. + bool + try_fix_erratum_843419_optimized( +- The_erratum_stub*, ++ The_erratum_stub*, AArch64_address, + typename Sized_relobj_file::View_size&); + + // Whether a section needs to be scanned for relocation stubs. +@@ -1980,6 +1980,7 @@ AArch64_relobj::fix_errata_and_relocate_erratum_stubs( + { + typedef typename elfcpp::Swap<32,big_endian>::Valtype Insntype; + unsigned int shnum = this->shnum(); ++ const Relobj::Output_sections& out_sections(this->output_sections()); + for (unsigned int i = 1; i < shnum; ++i) + { + The_stub_table* stub_table = this->stub_table(i); +@@ -1988,33 +1989,48 @@ AArch64_relobj::fix_errata_and_relocate_erratum_stubs( + std::pair + ipair(stub_table->find_erratum_stubs_for_input_section(this, i)); + Erratum_stub_set_iter p = ipair.first, end = ipair.second; ++ typename Sized_relobj_file::View_size& ++ pview((*pviews)[i]); ++ AArch64_address view_offset = 0; ++ if (pview.is_input_output_view) ++ { ++ // In this case, write_sections has not added the output offset to ++ // the view's address, so we must do so. Currently this only happens ++ // for a relaxed section. ++ unsigned int index = this->adjust_shndx(i); ++ const Output_relaxed_input_section* poris = ++ out_sections[index]->find_relaxed_input_section(this, index); ++ gold_assert(poris != NULL); ++ view_offset = poris->address() - pview.address; ++ } ++ + while (p != end) + { + The_erratum_stub* stub = *p; +- typename Sized_relobj_file::View_size& +- pview((*pviews)[i]); + + // Double check data before fix. +- gold_assert(pview.address + stub->sh_offset() ++ gold_assert(pview.address + view_offset + stub->sh_offset() + == stub->erratum_address()); + + // Update previously recorded erratum insn with relocated + // version. + Insntype* ip = +- reinterpret_cast(pview.view + stub->sh_offset()); ++ reinterpret_cast( ++ pview.view + view_offset + stub->sh_offset()); + Insntype insn_to_fix = ip[0]; + stub->update_erratum_insn(insn_to_fix); + + // First try to see if erratum is 843419 and if it can be fixed + // without using branch-to-stub. +- if (!try_fix_erratum_843419_optimized(stub, pview)) ++ if (!try_fix_erratum_843419_optimized(stub, view_offset, pview)) + { + // Replace the erratum insn with a branch-to-stub. + AArch64_address stub_address = + stub_table->erratum_stub_address(stub); + unsigned int b_offset = stub_address - stub->erratum_address(); + AArch64_relocate_functions::construct_b( +- pview.view + stub->sh_offset(), b_offset & 0xfffffff); ++ pview.view + view_offset + stub->sh_offset(), ++ b_offset & 0xfffffff); + } + + // Erratum fix is done (or skipped), continue to relocate erratum +@@ -2024,7 +2040,8 @@ AArch64_relobj::fix_errata_and_relocate_erratum_stubs( + // erratum stub, ignoring the fact the erratum could never be + // executed. + stub_table->relocate_erratum_stub( +- stub, pview.view + (stub_table->address() - pview.address)); ++ stub, ++ pview.view + view_offset + (stub_table->address() - pview.address)); + + // Next erratum stub. + ++p; +@@ -2042,7 +2059,7 @@ AArch64_relobj::fix_errata_and_relocate_erratum_stubs( + template + bool + AArch64_relobj::try_fix_erratum_843419_optimized( +- The_erratum_stub* stub, ++ The_erratum_stub* stub, AArch64_address view_offset, + typename Sized_relobj_file::View_size& pview) + { + if (stub->type() != ST_E_843419) +@@ -2052,9 +2069,11 @@ AArch64_relobj::try_fix_erratum_843419_optimized( + typedef typename elfcpp::Swap<32,big_endian>::Valtype Insntype; + E843419_stub* e843419_stub = + reinterpret_cast*>(stub); +- AArch64_address pc = pview.address + e843419_stub->adrp_sh_offset(); ++ AArch64_address pc = ++ pview.address + view_offset + e843419_stub->adrp_sh_offset(); + unsigned int adrp_offset = e843419_stub->adrp_sh_offset (); +- Insntype* adrp_view = reinterpret_cast(pview.view + adrp_offset); ++ Insntype* adrp_view = ++ reinterpret_cast(pview.view + view_offset + adrp_offset); + Insntype adrp_insn = adrp_view[0]; + + // If the instruction at adrp_sh_offset is "mrs R, tpidr_el0", it may come +@@ -2070,8 +2089,9 @@ AArch64_relobj::try_fix_erratum_843419_optimized( + // return true. + if (!Insn_utilities::is_adrp(adrp_insn) && adrp_offset) + { +- Insntype* prev_view +- = reinterpret_cast(pview.view + adrp_offset - 4); ++ Insntype* prev_view = ++ reinterpret_cast( ++ pview.view + view_offset + adrp_offset - 4); + Insntype prev_insn = prev_view[0]; + + if (Insn_utilities::is_mrs_tpidr_el0(prev_insn)) diff --git a/gold/compressed_output.cc b/gold/compressed_output.cc index 4374ba1..45077f7 100644 --- a/gold/compressed_output.cc @@ -11798,10 +13126,61 @@ index 4fc160b..5555562 100644 if (calculate_only) diff --git a/gold/powerpc.cc b/gold/powerpc.cc -index 1135acd..b0d7585 100644 +index 1135acd..629da4f 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc -@@ -7660,8 +7660,10 @@ Target_powerpc::scan_relocs( +@@ -1026,7 +1026,8 @@ class Target_powerpc : public Sized_target + && this->plt_localentry0() + && gsym->type() == elfcpp::STT_FUNC + && gsym->is_defined() +- && gsym->nonvis() >> 3 == 0); ++ && gsym->nonvis() >> 3 == 0 ++ && !gsym->non_zero_localentry()); + } + + bool +@@ -1051,6 +1052,22 @@ class Target_powerpc : public Sized_target + return false; + } + ++ // Remember any symbols seen with non-zero localentry, even those ++ // not providing a definition ++ bool ++ resolve(Symbol* to, const elfcpp::Sym& sym, Object*, ++ const char*) ++ { ++ if (size == 64) ++ { ++ unsigned char st_other = sym.get_st_other(); ++ if ((st_other & elfcpp::STO_PPC64_LOCAL_MASK) != 0) ++ to->set_non_zero_localentry(); ++ } ++ // We haven't resolved anything, continue normal processing. ++ return false; ++ } ++ + int + abiversion () const + { return this->processor_specific_flags() & elfcpp::EF_PPC64_ABI; } +@@ -1599,7 +1616,7 @@ Target::Target_info Target_powerpc<64, true>::powerpc_info = + true, // is_big_endian + elfcpp::EM_PPC64, // machine_code + false, // has_make_symbol +- false, // has_resolve ++ true, // has_resolve + false, // has_code_fill + true, // is_default_stack_executable + false, // can_icf_inline_merge_sections +@@ -1627,7 +1644,7 @@ Target::Target_info Target_powerpc<64, false>::powerpc_info = + false, // is_big_endian + elfcpp::EM_PPC64, // machine_code + false, // has_make_symbol +- false, // has_resolve ++ true, // has_resolve + false, // has_code_fill + true, // is_default_stack_executable + false, // can_icf_inline_merge_sections +@@ -7660,8 +7677,10 @@ Target_powerpc::scan_relocs( { if (parameters->options().user_set_plt_localentry()) plt_localentry0 = parameters->options().plt_localentry(); @@ -11814,6 +13193,76 @@ index 1135acd..b0d7585 100644 } this->plt_localentry0_ = plt_localentry0; this->plt_localentry0_init_ = true; +diff --git a/gold/resolve.cc b/gold/resolve.cc +index 8f4d2e3..7c22606 100644 +--- a/gold/resolve.cc ++++ b/gold/resolve.cc +@@ -266,8 +266,8 @@ Symbol_table::resolve(Sized_symbol* to, + { + Sized_target* sized_target; + sized_target = parameters->sized_target(); +- sized_target->resolve(to, sym, object, version); +- return; ++ if (sized_target->resolve(to, sym, object, version)) ++ return; + } + + if (!object->is_dynamic()) +diff --git a/gold/symtab.cc b/gold/symtab.cc +index 43909ff..7e0a3f8 100644 +--- a/gold/symtab.cc ++++ b/gold/symtab.cc +@@ -81,6 +81,7 @@ Symbol::init_fields(const char* name, const char* version, + this->undef_binding_weak_ = false; + this->is_predefined_ = false; + this->is_protected_ = false; ++ this->non_zero_localentry_ = false; + } + + // Return the demangled version of the symbol's name, but only +diff --git a/gold/symtab.h b/gold/symtab.h +index 77552ae..c371731 100644 +--- a/gold/symtab.h ++++ b/gold/symtab.h +@@ -883,6 +883,16 @@ class Symbol + set_is_protected() + { this->is_protected_ = true; } + ++ // Return state of PowerPC64 ELFv2 specific flag. ++ bool ++ non_zero_localentry() const ++ { return this->non_zero_localentry_; } ++ ++ // Set PowerPC64 ELFv2 specific flag. ++ void ++ set_non_zero_localentry() ++ { this->non_zero_localentry_ = true; } ++ + protected: + // Instances of this class should always be created at a specific + // size. +@@ -1084,6 +1094,8 @@ class Symbol + // The visibility_ field will be STV_DEFAULT in this case because we + // must treat it as such from outside the shared object. + bool is_protected_ : 1; ++ // Used by PowerPC64 ELFv2 to track st_other localentry (bit 36). ++ bool non_zero_localentry_ : 1; + }; + + // The parts of a symbol which are size specific. Using a template +diff --git a/gold/target.h b/gold/target.h +index 5ca8435..cf6d902 100644 +--- a/gold/target.h ++++ b/gold/target.h +@@ -852,7 +852,7 @@ class Sized_target : public Target + // pre-existing symbol. SYM is the new symbol, seen in OBJECT. + // VERSION is the version of SYM. This will only be called if + // has_resolve() returns true. +- virtual void ++ virtual bool + resolve(Symbol*, const elfcpp::Sym&, Object*, + const char*) + { gold_unreachable(); } diff --git a/gprof/ChangeLog b/gprof/ChangeLog index ef39520..c9b0714 100644 --- a/gprof/ChangeLog @@ -11916,10 +13365,137 @@ index 30aa546..fb9f076 100755 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/ld/ChangeLog b/ld/ChangeLog -index bc7d797..8c374e3 100644 +index bc7d797..c806a53 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog -@@ -1,3 +1,39 @@ +@@ -1,3 +1,166 @@ ++2017-08-17 Andrew Burgess ++ ++ PR 21961 ++ * ldlang.c (lang_discard_section_p): New function. ++ (lang_add_section): Checks moved out into new function, which is ++ now called. ++ (lang_place_orphans): Call lang_discard_section_p instead of ++ duplicating some of the checks from lang_add_section. ++ * testsuite/ld-elf/orphan-11.d: New file. ++ * testsuite/ld-elf/orphan-11.ld: New file. ++ * testsuite/ld-elf/orphan-11.s: New file. ++ * testsuite/ld-elf/orphan-12.d: New file. ++ * testsuite/ld-elf/orphan-12.s: New file. ++ ++2017-08-23 Alan Modra ++ ++ * testsuite/ld-gc/pr19161.d: Don't xfail hppa. ++ ++2017-08-21 H.J. Lu ++ Alan Modra ++ ++ PR ld/21964 ++ * testsuite/ld-elf/pr21562a.d: Update for changed start/stop symbols. ++ * testsuite/ld-elf/pr21562b.d: Likewise. ++ * testsuite/ld-elf/pr21562c.d: Likewise. ++ * testsuite/ld-elf/pr21562d.d: Likewise. ++ * testsuite/ld-elf/pr21562e.d: Likewise. ++ * testsuite/ld-elf/pr21562f.d: Likewise. ++ * testsuite/ld-elf/pr21562g.d: Likewise. ++ * testsuite/ld-elf/pr21562h.d: Likewise. ++ * testsuite/ld-elf/pr21562i.d: Likewise. ++ * testsuite/ld-elf/pr21562j.d: Likewise. ++ * testsuite/ld-elf/pr21562k.d: Likewise. ++ * testsuite/ld-elf/pr21562l.d: Likewise. ++ * testsuite/ld-elf/pr21562m.d: Likewise. ++ * testsuite/ld-elf/pr21562n.d: Likewise. ++ * testsuite/ld-elf/sizeofa.d: Likewise. ++ * testsuite/ld-elf/sizeofb.d: Likewise. ++ * testsuite/ld-elf/startofa.d: Likewise. ++ * testsuite/ld-elf/startofb.d: Likewise. ++ * testsuite/ld-gc/pr20022.d: Likewise. ++ * testsuite/ld-gc/start.d: Likewise. ++ * testsuite/ld-elf/pr21964-1a.c: New file. ++ * testsuite/ld-elf/pr21964-1b.c: New file. ++ * testsuite/ld-elf/pr21964-2a.c: New file. ++ * testsuite/ld-elf/pr21964-2b.c: New file. ++ * testsuite/ld-elf/shared.exp: Run PR ld/21964 tests. ++ ++2017-08-05 Alan Modra ++ ++ * testsuite/ld-unique/pr21529.d: Don't xfail hppa. ++ ++2017-08-03 Nick Clifton ++ ++ PR ld/21884 ++ * testsuite/ld-elf/pr21884.d: Add AVR, HPPA, IA64, M68HC1x and ++ SCORE to list of targets not supporting file format changes during ++ linking. ++ * testsuite/ld-unique/pr21529.d: Likewise. ++ * emultempl/avrelf.em (_before_allocation): Skip for non-ELF ++ output formats. ++ (avr_elf_create_output_section_statements): Fail if the output ++ format is not ELF. ++ (avr_finish): Do not access the ELF header in non-ELF format ++ output bfds. ++ * emultempl/m68hc1xelf.em (_before_allocation): Skip for non-ELF ++ output formats. ++ (m68hc11elf_create_output_section_statements): Fail if the putput ++ format is not ELF. ++ (m68hc11elf_after_allocation): Skip for non-ELF output formats. ++ ++2017-07-25 Alan Modra ++ ++ * testsuite/ld-powerpc/tlsopt5.s: Add cfi. ++ * testsuite/ld-powerpc/tlsopt5.d: Update. ++ * testsuite/ld-powerpc/tlsopt5.wf: New file. ++ * testsuite/ld-powerpc/powerpc.exp: Perform new tlsopt5 test. ++ ++2017-07-14 Alan Modra ++ ++ * testsuite/ld-powerpc/powerpc.exp: Add -shared to tlsop5 tests. ++ * testsuite/ld-powerpc/tlsopt5.d: Adjust. ++ * testsuite/ld-powerpc/tlsopt1_32.s: Use r30 as GOT pointer. ++ * testsuite/ld-powerpc/tlsopt2_32.s: Likewise. ++ * testsuite/ld-powerpc/tlsopt3_32.s: Likewise. ++ * testsuite/ld-powerpc/tlsopt4_32.s: Likewise. ++ * testsuite/ld-powerpc/tlsopt5_32.s: Rewrite. ++ * testsuite/ld-powerpc/tlsopt1_32.d: Adjust. ++ * testsuite/ld-powerpc/tlsopt2_32.d: Adjust. ++ * testsuite/ld-powerpc/tlsopt3_32.d: Adjust. ++ * testsuite/ld-powerpc/tlsopt5_32.d: Adjust. ++ ++2017-08-13 H.J. Lu ++ ++ PR ld/21923 ++ * configure.ac (TESTBFDLIB): Replace --rpath with -Wl,--rpath, ++ for --disable-static. ++ * configure: Regenerated. ++ ++2017-08-13 H.J. Lu ++ ++ * testsuite/ld-i386/i386.exp: Run pr21884-nacl. ++ * testsuite/ld-x86-64/x86-64.exp: Likewise. ++ * testsuite/ld-i386/pr21884.d: Don't run on nacl targets. ++ * testsuite/ld-x86-64/pr21884.d: Likewise. ++ * testsuite/ld-i386/pr21884.t: Revert the last change. ++ * testsuite/ld-x86-64/pr21884.t: Likewise. ++ * testsuite/ld-i386/pr21884-nacl.d: New file. ++ * testsuite/ld-i386/pr21884-nacl.t: Likewise. ++ * testsuite/ld-x86-64/pr21884-nacl.d: Likewise. ++ * testsuite/ld-x86-64/pr21884-nacl.t: Likewise. ++ ++2017-08-13 Alan Modra ++ ++ * testsuite/ld-i386/pr21884.t: Remove unneeded format, arch and entry. ++ * testsuite/ld-x86-64/pr21884.t: Likewise. ++ ++2017-08-11 H.J. Lu ++ ++ PR ld/21884 ++ * testsuite/ld-i386/i386.exp: Run pr21884. ++ * testsuite/ld-x86-64/x86-64.exp: Likewise. ++ * testsuite/ld-i386/pr21884.d: New file. ++ * testsuite/ld-i386/pr21884.t: Likewise. ++ * testsuite/ld-x86-64/pr21884.d: Likewise. ++ * testsuite/ld-x86-64/pr21884.t: Likewise. ++ +2017-08-03 Alan Modra + + PR ld/21884 @@ -11960,7 +13536,7 @@ index bc7d797..8c374e3 100644 * configure: Regenerate. diff --git a/ld/configure b/ld/configure -index da20ab5..7b66a4f 100755 +index da20ab5..20fb84d 100755 --- a/ld/configure +++ b/ld/configure @@ -1,6 +1,6 @@ @@ -12027,6 +13603,15 @@ index da20ab5..7b66a4f 100755 cat >>confdefs.h <<_ACEOF +@@ -17255,7 +17255,7 @@ EMULATION_LIBPATH=$all_libpath + + + if test x${enable_static} = xno; then +- TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" ++ TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so" + else + TESTBFDLIB="../bfd/.libs/libbfd.a" + fi @@ -17827,7 +17827,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. @@ -12045,6 +13630,68 @@ index da20ab5..7b66a4f 100755 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +diff --git a/ld/configure.ac b/ld/configure.ac +index 34315e6..6f25d28 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -436,7 +436,7 @@ EMULATION_LIBPATH=$all_libpath + AC_SUBST(EMULATION_LIBPATH) + + if test x${enable_static} = xno; then +- TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" ++ TESTBFDLIB="-Wl,--rpath,../bfd/.libs ../bfd/.libs/libbfd.so" + else + TESTBFDLIB="../bfd/.libs/libbfd.a" + fi +diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em +index 2072124..acb478f 100644 +--- a/ld/emultempl/avrelf.em ++++ b/ld/emultempl/avrelf.em +@@ -71,6 +71,12 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) + + gld${EMULATION_NAME}_before_allocation (); + ++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) ++ { ++ avr_no_stubs = TRUE; ++ return; ++ } ++ + /* We only need stubs for avr6, avrxmega6, and avrxmega7. */ + if (strcmp ("${EMULATION_NAME}","avr6") + && strcmp ("${EMULATION_NAME}","avrxmega6") +@@ -108,6 +114,12 @@ avr_elf_create_output_section_statements (void) + { + flagword flags; + ++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) ++ { ++ einfo ("%X%P: changing output format whilst linking is not supported\n"); ++ return; ++ } ++ + stub_file = lang_add_input_file ("linker stubs", + lang_input_file_is_fake_enum, + NULL); +@@ -204,10 +216,14 @@ avr_finish (void) + } + + abfd = link_info.output_bfd; +- if (avr_link_relax) +- elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; +- else +- elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; ++ ++ if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour) ++ { ++ if (avr_link_relax) ++ elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; ++ else ++ elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; ++ } + + finish_default (); + } diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index d2551b6..9ac1840 100644 --- a/ld/emultempl/elf32.em @@ -12182,6 +13829,72 @@ index d2551b6..9ac1840 100644 && (flags & SEC_LOAD) != 0) place = &hold[orphan_rel]; else if ((flags & SEC_CODE) == 0) +diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em +index bfe88d6..f7337da 100644 +--- a/ld/emultempl/m68hc1xelf.em ++++ b/ld/emultempl/m68hc1xelf.em +@@ -66,6 +66,9 @@ m68hc11_elf_${EMULATION_NAME}_before_allocation (void) + + gld${EMULATION_NAME}_before_allocation (); + ++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) ++ return; ++ + /* If generating a relocatable output file, then we don't + have to generate the trampolines. */ + if (bfd_link_relocatable (&link_info)) +@@ -141,6 +144,12 @@ m68hc11_elf_${EMULATION_NAME}_before_allocation (void) + static void + m68hc11elf_create_output_section_statements (void) + { ++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) ++ { ++ einfo ("%X%P: changing output format whilst linking is not supported\n"); ++ return; ++ } ++ + stub_file = lang_add_input_file ("linker stubs", + lang_input_file_is_fake_enum, + NULL); +@@ -286,22 +295,25 @@ m68hc11elf_add_stub_section (const char *stub_sec_name, + static void + m68hc11elf_after_allocation (void) + { +- /* Now build the linker stubs. */ +- if (stub_file->the_bfd->sections != NULL) ++ if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour) + { +- /* Call again the trampoline analyzer to initialize the trampoline +- stubs with the correct symbol addresses. Since there could have +- been relaxation, the symbol addresses that were found during +- first call may no longer be correct. */ +- if (!elf32_m68hc11_size_stubs (link_info.output_bfd, +- stub_file->the_bfd, +- &link_info, 0)) ++ /* Now build the linker stubs. */ ++ if (stub_file->the_bfd->sections != NULL) + { +- einfo ("%X%P: can not size stub section: %E\n"); +- return; ++ /* Call again the trampoline analyzer to initialize the trampoline ++ stubs with the correct symbol addresses. Since there could have ++ been relaxation, the symbol addresses that were found during ++ first call may no longer be correct. */ ++ if (!elf32_m68hc11_size_stubs (link_info.output_bfd, ++ stub_file->the_bfd, ++ &link_info, 0)) ++ { ++ einfo ("%X%P: can not size stub section: %E\n"); ++ return; ++ } ++ if (!elf32_m68hc11_build_stubs (link_info.output_bfd, &link_info)) ++ einfo ("%X%P: can not build stubs: %E\n"); + } +- if (!elf32_m68hc11_build_stubs (link_info.output_bfd, &link_info)) +- einfo ("%X%P: can not build stubs: %E\n"); + } + + gld${EMULATION_NAME}_after_allocation (); diff --git a/ld/ld.texinfo b/ld/ld.texinfo index bb5f719..5d0b007 100644 --- a/ld/ld.texinfo @@ -12211,6 +13924,83 @@ index bb5f719..5d0b007 100644 @end table @ifclear GENERIC +diff --git a/ld/ldlang.c b/ld/ldlang.c +index 726bc8e..4ce0f51 100644 +--- a/ld/ldlang.c ++++ b/ld/ldlang.c +@@ -2274,6 +2274,34 @@ section_already_linked (bfd *abfd, asection *sec, void *data) + bfd_section_already_linked (abfd, sec, &link_info); + } + ++ ++/* Returns true if SECTION is one we know will be discarded based on its ++ section flags, otherwise returns false. */ ++ ++static bfd_boolean ++lang_discard_section_p (asection *section) ++{ ++ bfd_boolean discard; ++ flagword flags = section->flags; ++ ++ /* Discard sections marked with SEC_EXCLUDE. */ ++ discard = (flags & SEC_EXCLUDE) != 0; ++ ++ /* Discard the group descriptor sections when we're finally placing the ++ sections from within the group. */ ++ if ((flags & SEC_GROUP) != 0 ++ && link_info.resolve_section_groups) ++ discard = TRUE; ++ ++ /* Discard debugging sections if we are stripping debugging ++ information. */ ++ if ((link_info.strip == strip_debugger || link_info.strip == strip_all) ++ && (flags & SEC_DEBUGGING) != 0) ++ discard = TRUE; ++ ++ return discard; ++} ++ + /* The wild routines. + + These expand statements like *(.text) and foo.o to a list of +@@ -2295,26 +2323,14 @@ lang_add_section (lang_statement_list_type *ptr, + lang_input_section_type *new_section; + bfd *abfd = link_info.output_bfd; + +- /* Discard sections marked with SEC_EXCLUDE. */ +- discard = (flags & SEC_EXCLUDE) != 0; ++ /* Is this section one we know should be discarded? */ ++ discard = lang_discard_section_p (section); + + /* Discard input sections which are assigned to a section named + DISCARD_SECTION_NAME. */ + if (strcmp (output->name, DISCARD_SECTION_NAME) == 0) + discard = TRUE; + +- /* Discard the group descriptor sections when we're finally placing the +- sections from within the group. */ +- if ((section->flags & SEC_GROUP) == SEC_GROUP +- && link_info.resolve_section_groups) +- discard = TRUE; +- +- /* Discard debugging sections if we are stripping debugging +- information. */ +- if ((link_info.strip == strip_debugger || link_info.strip == strip_all) +- && (flags & SEC_DEBUGGING) != 0) +- discard = TRUE; +- + if (discard) + { + if (section->output_section == NULL) +@@ -6411,7 +6427,7 @@ lang_place_orphans (void) + + if (file->flags.just_syms) + bfd_link_just_syms (file->the_bfd, s, &link_info); +- else if ((s->flags & SEC_EXCLUDE) != 0) ++ else if (lang_discard_section_p (s)) + s->output_section = bfd_abs_section_ptr; + else if (strcmp (s->name, "COMMON") == 0) + { diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index 07553b4..7a146b7 100644 --- a/ld/scripttempl/avr.sc @@ -12233,9 +14023,246 @@ index 07553b4..7a146b7 100644 ${RELOCATING+. = ALIGN(2);} /* For tablejump instruction arrays. We don't relax +diff --git a/ld/testsuite/ld-elf/orphan-11.d b/ld/testsuite/ld-elf/orphan-11.d +new file mode 100644 +index 0000000..3daefba +--- /dev/null ++++ b/ld/testsuite/ld-elf/orphan-11.d +@@ -0,0 +1,9 @@ ++#source: orphan-11.s ++#ld: -T orphan-11.ld --orphan-handling=error ++#objdump: -wh ++#notarget: d30v-* dlx-* fr30-* frv-* ft32-* i860-* i960-* iq2000-* mn10200-* moxie-* ms1-* msp430-* mt-* pj-* ++ ++#... ++ . \.text .* ++ . \.data .* ++#pass +diff --git a/ld/testsuite/ld-elf/orphan-11.ld b/ld/testsuite/ld-elf/orphan-11.ld +new file mode 100644 +index 0000000..74c7789 +--- /dev/null ++++ b/ld/testsuite/ld-elf/orphan-11.ld +@@ -0,0 +1,16 @@ ++SECTIONS ++{ ++ . = SIZEOF_HEADERS; ++ .text : { *(.text .text.*) } ++ .data : { *(.data .data.*) } ++ .bss : { *(.bss .bss.*) *(COMMON) } ++ .sbss : { *(.sbss .sbss.*) } ++ .note : { *(.note .note.*) } ++ .rela : { *(.rela .rela.*) } ++ .rel : { *(.rel .rel.*) } ++ ++ /DISCARD/ : { ++ *(.reginfo) *(.MIPS.abiflags) *(.trampolines) *(.iplt*) ++ *(.note*) *(.got*) *(.igot*) *(.*.attributes) *(.*.info) ++ *(.pdr) "linker stubs*"(*) } ++} +diff --git a/ld/testsuite/ld-elf/orphan-11.s b/ld/testsuite/ld-elf/orphan-11.s +new file mode 100644 +index 0000000..3d7961b +--- /dev/null ++++ b/ld/testsuite/ld-elf/orphan-11.s +@@ -0,0 +1,11 @@ ++ .section .text.foo,"axG",%progbits,foo_group ++ .word 0 ++ ++ .section .data.foo,"waG",%progbits,foo_group ++ .word 1 ++ ++ .section .text, "ax" ++ .word 0 ++ ++ .section .data, "wa" ++ .word 1 +diff --git a/ld/testsuite/ld-elf/orphan-12.d b/ld/testsuite/ld-elf/orphan-12.d +new file mode 100644 +index 0000000..71a8c93 +--- /dev/null ++++ b/ld/testsuite/ld-elf/orphan-12.d +@@ -0,0 +1,9 @@ ++#source: orphan-12.s ++#ld: -T orphan-11.ld --strip-debug --orphan-handling=error ++#objdump: -wh ++#notarget: d30v-* dlx-* fr30-* frv-* ft32-* i860-* i960-* iq2000-* mn10200-* moxie-* ms1-* msp430-* mt-* pj-* ++ ++#... ++ . \.text .* ++ . \.data .* ++#pass +diff --git a/ld/testsuite/ld-elf/orphan-12.s b/ld/testsuite/ld-elf/orphan-12.s +new file mode 100644 +index 0000000..f9cbcf7 +--- /dev/null ++++ b/ld/testsuite/ld-elf/orphan-12.s +@@ -0,0 +1,8 @@ ++ .section .debug_info, "",%progbits ++ .word 0 ++ ++ .section .text, "ax" ++ .word 0 ++ ++ .section .data, "wa" ++ .word 1 +diff --git a/ld/testsuite/ld-elf/pr21562a.d b/ld/testsuite/ld-elf/pr21562a.d +index ecf013f..e978734 100644 +--- a/ld/testsuite/ld-elf/pr21562a.d ++++ b/ld/testsuite/ld-elf/pr21562a.d +@@ -8,5 +8,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562b.d b/ld/testsuite/ld-elf/pr21562b.d +index 063a141..f1d058a 100644 +--- a/ld/testsuite/ld-elf/pr21562b.d ++++ b/ld/testsuite/ld-elf/pr21562b.d +@@ -8,5 +8,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562c.d b/ld/testsuite/ld-elf/pr21562c.d +index 1d72a0d..1bfbff3 100644 +--- a/ld/testsuite/ld-elf/pr21562c.d ++++ b/ld/testsuite/ld-elf/pr21562c.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562d.d b/ld/testsuite/ld-elf/pr21562d.d +index f752a24..4f8e91e 100644 +--- a/ld/testsuite/ld-elf/pr21562d.d ++++ b/ld/testsuite/ld-elf/pr21562d.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562e.d b/ld/testsuite/ld-elf/pr21562e.d +index 769f2f8..ee969bd 100644 +--- a/ld/testsuite/ld-elf/pr21562e.d ++++ b/ld/testsuite/ld-elf/pr21562e.d +@@ -6,5 +6,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562f.d b/ld/testsuite/ld-elf/pr21562f.d +index cb81c2a..119f43e 100644 +--- a/ld/testsuite/ld-elf/pr21562f.d ++++ b/ld/testsuite/ld-elf/pr21562f.d +@@ -6,5 +6,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562g.d b/ld/testsuite/ld-elf/pr21562g.d +index 9926416..f3d2a31 100644 +--- a/ld/testsuite/ld-elf/pr21562g.d ++++ b/ld/testsuite/ld-elf/pr21562g.d +@@ -6,5 +6,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562h.d b/ld/testsuite/ld-elf/pr21562h.d +index 1e723ba..0517aec 100644 +--- a/ld/testsuite/ld-elf/pr21562h.d ++++ b/ld/testsuite/ld-elf/pr21562h.d +@@ -6,5 +6,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562i.d b/ld/testsuite/ld-elf/pr21562i.d +index f5b59c5..8baa583 100644 +--- a/ld/testsuite/ld-elf/pr21562i.d ++++ b/ld/testsuite/ld-elf/pr21562i.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562j.d b/ld/testsuite/ld-elf/pr21562j.d +index 70e311e..99d987c 100644 +--- a/ld/testsuite/ld-elf/pr21562j.d ++++ b/ld/testsuite/ld-elf/pr21562j.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562k.d b/ld/testsuite/ld-elf/pr21562k.d +index 4c62eb7..6aa8334 100644 +--- a/ld/testsuite/ld-elf/pr21562k.d ++++ b/ld/testsuite/ld-elf/pr21562k.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562l.d b/ld/testsuite/ld-elf/pr21562l.d +index b0ba90d..82bab1e 100644 +--- a/ld/testsuite/ld-elf/pr21562l.d ++++ b/ld/testsuite/ld-elf/pr21562l.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562m.d b/ld/testsuite/ld-elf/pr21562m.d +index fbcf76f..e1ad876 100644 +--- a/ld/testsuite/ld-elf/pr21562m.d ++++ b/ld/testsuite/ld-elf/pr21562m.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/pr21562n.d b/ld/testsuite/ld-elf/pr21562n.d +index 2453169..583c771 100644 +--- a/ld/testsuite/ld-elf/pr21562n.d ++++ b/ld/testsuite/ld-elf/pr21562n.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass diff --git a/ld/testsuite/ld-elf/pr21884.d b/ld/testsuite/ld-elf/pr21884.d new file mode 100644 -index 0000000..52cd2c1 +index 0000000..0de7b83 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21884.d @@ -0,0 +1,11 @@ @@ -12243,7 +14270,7 @@ index 0000000..52cd2c1 +#source: pr21884b.s +#ld: -T pr21884.t +#objdump: -b binary -s -+#notarget: aarch64*-*-* arm*-*-* nds32*-*-* ++#notarget: aarch64*-*-* arm*-*-* avr-*-* hppa-*-* ia64-*-* m68hc1*-*-* nds32*-*-* score-*-* +# Skip targets which can't change output format to binary. + +.*: file format binary @@ -12285,6 +14312,758 @@ index 0000000..e533837 + .type bar,%function +bar: + .byte 0 +diff --git a/ld/testsuite/ld-elf/pr21964-1a.c b/ld/testsuite/ld-elf/pr21964-1a.c +new file mode 100644 +index 0000000..f2eae53 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr21964-1a.c +@@ -0,0 +1,11 @@ ++extern int __start___verbose[]; ++extern int __stop___verbose[]; ++int foo (void) ++{ ++ static int my_var __attribute__((used, section("__verbose"))) = 5; ++ if (__start___verbose == __stop___verbose ++ || __start___verbose[0] != 5) ++ return -1; ++ else ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/pr21964-1b.c b/ld/testsuite/ld-elf/pr21964-1b.c +new file mode 100644 +index 0000000..440c937 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr21964-1b.c +@@ -0,0 +1,24 @@ ++#include ++ ++extern int foo (void); ++ ++extern int __start___verbose[]; ++extern int __stop___verbose[]; ++static int my_var __attribute__((used, section("__verbose"))) = 6; ++int bar (void) ++{ ++ if (__start___verbose == __stop___verbose) ++ return -1; ++ ++ if (__start___verbose[0] != 6) ++ return -2; ++ else ++ return 0; ++} ++ ++int main() ++{ ++ if (bar () == 0 && foo () == 0) ++ printf ("PASS\n"); ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/pr21964-2a.c b/ld/testsuite/ld-elf/pr21964-2a.c +new file mode 100644 +index 0000000..617ce75 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr21964-2a.c +@@ -0,0 +1,11 @@ ++extern int __start___verbose[]; ++extern int __stop___verbose[]; ++int foo (void) ++{ ++ static int my_var __attribute__((used, section("__verbose"))) = 5; ++ if (__start___verbose == __stop___verbose ++ && __start___verbose[0] != 5) ++ return -1; ++ else ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/pr21964-2b.c b/ld/testsuite/ld-elf/pr21964-2b.c +new file mode 100644 +index 0000000..5f638a3 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr21964-2b.c +@@ -0,0 +1,27 @@ ++#include ++#include ++ ++int main() ++{ ++ void *dl; ++ void *sym; ++ int (*func) (void); ++ ++ dl = dlopen("pr21964-2.so", RTLD_LAZY); ++ if (!dl) ++ return 1; ++ ++ sym = dlsym(dl, "__start___verbose"); ++ if (!sym) ++ return 2; ++ ++ func = dlsym(dl, "foo"); ++ if (!func) ++ return 3; ++ if (func () == 0) ++ printf ("PASS\n"); ++ ++ dlclose(dl); ++ ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp +index 8b139ec..0802fa2 100644 +--- a/ld/testsuite/ld-elf/shared.exp ++++ b/ld/testsuite/ld-elf/shared.exp +@@ -423,6 +423,12 @@ set build_tests { + {"Build libpr19073.so" + "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC" + {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"} ++ {"Build pr21964-1.so" ++ "-shared" "-fPIC" ++ {pr21964-1a.c} {} "pr21964-1.so"} ++ {"Build pr21964-2.so" ++ "-shared" "-fPIC" ++ {pr21964-2a.c} {} "pr21964-2.so"} + } + + run_cc_link_tests $build_tests +@@ -540,6 +546,9 @@ set run_tests [list \ + [list "Run pr18458" \ + "-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \ + {pr18458c.c} "pr18458" "pass.out" ] \ ++ [list "Run pr21964-1" \ ++ "-Wl,--no-as-needed,-rpath,tmpdir tmpdir/pr21964-1.so" "" \ ++ {pr21964-1b.c} "pr21964-1" "pass.out" ] \ + ] + + # NetBSD ELF systems do not currently support the .*_array sections. +@@ -586,6 +595,9 @@ set dlopen_run_tests [list \ + [list "Run dl6d1 with --dynamic-list-data and dlopen on libdl6d.so" \ + "-Wl,--no-as-needed,--dynamic-list-data $extralibs" "" \ + {dl6dmain.c} "dl6d1" "dl6b.out" ] \ ++ [list "Run pr21964-2" \ ++ "-Wl,--no-as-needed,-rpath,tmpdir $extralibs" "" \ ++ {pr21964-2b.c} "pr21964-2" "pass.out" ] \ + ] + + # Only run them when libdl is available. +diff --git a/ld/testsuite/ld-elf/sizeofa.d b/ld/testsuite/ld-elf/sizeofa.d +index 572ffbd..3eaa4e5 100644 +--- a/ld/testsuite/ld-elf/sizeofa.d ++++ b/ld/testsuite/ld-elf/sizeofa.d +@@ -6,7 +6,7 @@ Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + + #... +- +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +(LOC|GLOB)AL +DEFAULT +[0-9]+ +___?stop_scnfoo ++ +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +(PROTECTED|DEFAULT) +[0-9]+ +___?stop_scnfoo + #... + +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +UND +.sizeof.scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d +index ac4a6a4..c7d4edd 100644 +--- a/ld/testsuite/ld-elf/sizeofb.d ++++ b/ld/testsuite/ld-elf/sizeofb.d +@@ -7,7 +7,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + + #... +- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo +-#... +- +[0-9]+: 0+10 + +0 +NOTYPE +LOCAL +DEFAULT +ABS +.sizeof.scnfoo ++ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/startofa.d b/ld/testsuite/ld-elf/startofa.d +index 07d5dda..6a4460f 100644 +--- a/ld/testsuite/ld-elf/startofa.d ++++ b/ld/testsuite/ld-elf/startofa.d +@@ -6,7 +6,7 @@ Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + + #... +- +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +(LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo|GLOBAL +DEFAULT +UND +.startof.scnfoo) ++ +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +UND +.startof.scnfoo + #... +- +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +(UND +.startof.scnfoo|[0-9]+ +___?start_scnfoo) ++ +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +(PROTECTED|DEFAULT) +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d +index 5d659bb..b0cf563 100644 +--- a/ld/testsuite/ld-elf/startofb.d ++++ b/ld/testsuite/ld-elf/startofb.d +@@ -7,7 +7,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + + #... +- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +.startof.scnfoo +-#... +- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo ++ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo + #pass +diff --git a/ld/testsuite/ld-gc/pr19161.d b/ld/testsuite/ld-gc/pr19161.d +index baee8da..474cbd4 100644 +--- a/ld/testsuite/ld-gc/pr19161.d ++++ b/ld/testsuite/ld-gc/pr19161.d +@@ -2,7 +2,7 @@ + #source: dummy.s + #ld: --gc-sections -e main tmpdir/pr19161-1.o tmpdir/pr19161-2.o + #nm: --format=bsd +-#xfail: epiphany-*-* frv-*-* hppa-*-* iq2000-*-* lm32-*-* m32c-*-* ++#xfail: epiphany-*-* frv-*-* iq2000-*-* lm32-*-* m32c-*-* + #xfail: mips64vr-*-* msp430-*-* powerpc*-*-eabivle rl78-*-* rx-*-* sh*-*-* + + #... +diff --git a/ld/testsuite/ld-gc/pr20022.d b/ld/testsuite/ld-gc/pr20022.d +index 906f73d..40473c2 100644 +--- a/ld/testsuite/ld-gc/pr20022.d ++++ b/ld/testsuite/ld-gc/pr20022.d +@@ -9,5 +9,5 @@ + #... + \[[ 0-9]+\] _foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+[ \t]+.* + #... +- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start__foo ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +__start__foo + #pass +diff --git a/ld/testsuite/ld-gc/start.d b/ld/testsuite/ld-gc/start.d +index 9113b48..18e74c1 100644 +--- a/ld/testsuite/ld-gc/start.d ++++ b/ld/testsuite/ld-gc/start.d +@@ -5,5 +5,5 @@ + #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux* + + #... +-[0-9a-f]+ d +__start__foo ++[0-9a-f]+ D +__start__foo + #... +diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp +index 6c53046..1734d67 100644 +--- a/ld/testsuite/ld-i386/i386.exp ++++ b/ld/testsuite/ld-i386/i386.exp +@@ -434,6 +434,8 @@ run_dump_test "property-x86-shstk3a" + run_dump_test "property-x86-shstk3b" + run_dump_test "property-x86-shstk4" + run_dump_test "property-x86-shstk5" ++run_dump_test "pr21884" ++run_dump_test "pr21884-nacl" + + if { !([istarget "i?86-*-linux*"] + || [istarget "i?86-*-gnu*"] +diff --git a/ld/testsuite/ld-i386/pr21884-nacl.d b/ld/testsuite/ld-i386/pr21884-nacl.d +new file mode 100644 +index 0000000..82daaaa +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr21884-nacl.d +@@ -0,0 +1,10 @@ ++#source: dummy.s ++#as: --32 ++#ld: -m elf_i386 -T pr21884-nacl.t -b binary ++#objdump: -b binary -s ++#target: i?86-*-nacl* x86_64-*-nacl* ++ ++.*: file format binary ++ ++Contents of section .data: ++#pass +diff --git a/ld/testsuite/ld-i386/pr21884-nacl.t b/ld/testsuite/ld-i386/pr21884-nacl.t +new file mode 100644 +index 0000000..3ffb56c +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr21884-nacl.t +@@ -0,0 +1,11 @@ ++OUTPUT_FORMAT("elf32-i386-nacl"); ++OUTPUT_ARCH(i386); ++ ++ENTRY(_start); ++SECTIONS { ++ . = 0x10000; ++ _start = . ; ++ .data : { ++ *(.data) ++ } ++} +diff --git a/ld/testsuite/ld-i386/pr21884.d b/ld/testsuite/ld-i386/pr21884.d +new file mode 100644 +index 0000000..ea73aa2 +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr21884.d +@@ -0,0 +1,10 @@ ++#source: dummy.s ++#as: --32 ++#ld: -m elf_i386 -T pr21884.t -b binary ++#objdump: -b binary -s ++#notarget: i?86-*-nacl* x86_64-*-nacl* ++ ++.*: file format binary ++ ++Contents of section .data: ++#pass +diff --git a/ld/testsuite/ld-i386/pr21884.t b/ld/testsuite/ld-i386/pr21884.t +new file mode 100644 +index 0000000..4cf8cdc +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr21884.t +@@ -0,0 +1,11 @@ ++OUTPUT_FORMAT("elf32-i386"); ++OUTPUT_ARCH(i386); ++ ++ENTRY(_start); ++SECTIONS { ++ . = 0x10000; ++ _start = . ; ++ .data : { ++ *(.data) ++ } ++} +diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp +index f709b1e..6249ccb 100644 +--- a/ld/testsuite/ld-powerpc/powerpc.exp ++++ b/ld/testsuite/ld-powerpc/powerpc.exp +@@ -140,7 +140,7 @@ set ppcelftests { + "tlsopt4_32"} + {"TLS32 DLL" "-shared -melf32ppc --version-script tlsdll.ver" "" "-a32" {tlsdll_32.s} + {} "tlsdll32.so"} +- {"TLS32 opt 5" "-melf32ppc --gc-sections --secure-plt tmpdir/tlsdll32.so" "" "-a32" {tlsopt5_32.s} ++ {"TLS32 opt 5" "-melf32ppc -shared --gc-sections --secure-plt tmpdir/tlsdll32.so" "" "-a32" {tlsopt5_32.s} + {{objdump -dr tlsopt5_32.d}} + "tlsopt5_32"} + {"Shared library with global symbol" "-shared -melf32ppc" "" "-a32" {sdalib.s} +@@ -210,8 +210,8 @@ set ppc64elftests { + "tlsopt4"} + {"TLS DLL" "-shared -melf64ppc --version-script tlsdll.ver" "" "-a64" {tlsdll.s} + {} "tlsdll.so"} +- {"TLS opt 5" "-melf64ppc --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s} +- {{objdump -dr tlsopt5.d}} ++ {"TLS opt 5" "-melf64ppc -shared --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s} ++ {{objdump -dr tlsopt5.d} {readelf -wf tlsopt5.wf}} + "tlsopt5"} + {"sym@tocbase" "-shared -melf64ppc" "" "-a64" {symtocbase-1.s symtocbase-2.s} + {{objdump -dj.data symtocbase.d}} "symtocbase.so"} +diff --git a/ld/testsuite/ld-powerpc/tlsopt1_32.d b/ld/testsuite/ld-powerpc/tlsopt1_32.d +index ec9c7ca..fd0f7eb 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt1_32.d ++++ b/ld/testsuite/ld-powerpc/tlsopt1_32.d +@@ -15,7 +15,7 @@ Disassembly of section \.text: + Disassembly of section \.no_opt1: + + 0+1800098 <\.no_opt1>: +-.*: (38 6d ff f4|f4 ff 6d 38) addi r3,r13,-12 ++.*: (38 7e ff f4|f4 ff 7e 38) addi r3,r30,-12 + .*: (2c 04 00 00|00 00 04 2c) cmpwi r4,0 + .*: (41 82 00 0c|0c 00 82 41) beq .* + .*: (4b ff ff f1|f1 ff ff 4b) bl 1800094 <__tls_get_addr> +diff --git a/ld/testsuite/ld-powerpc/tlsopt1_32.s b/ld/testsuite/ld-powerpc/tlsopt1_32.s +index aba2bbc..79d6662 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt1_32.s ++++ b/ld/testsuite/ld-powerpc/tlsopt1_32.s +@@ -2,7 +2,7 @@ + # this section should not be optimised since we have old-style + # __tls_get_addr without marker relocs, and the arg setup insn + # is shared with two __tls_get_addr calls. +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + cmpwi 4,0 + beq 0f + bl __tls_get_addr +diff --git a/ld/testsuite/ld-powerpc/tlsopt2_32.d b/ld/testsuite/ld-powerpc/tlsopt2_32.d +index baffe91..7dc1bce 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt2_32.d ++++ b/ld/testsuite/ld-powerpc/tlsopt2_32.d +@@ -15,9 +15,9 @@ Disassembly of section \.text: + Disassembly of section \.no_opt2: + + 0+1800098 <\.no_opt2>: +-.*: (38 6d ff f4|f4 ff 6d 38) addi r3,r13,-12 ++.*: (38 7e ff f4|f4 ff 7e 38) addi r3,r30,-12 + .*: (2c 04 00 00|00 00 04 2c) cmpwi r4,0 + .*: (41 82 00 08|08 00 82 41) beq .* +-.*: (38 6d ff f4|f4 ff 6d 38) addi r3,r13,-12 ++.*: (38 7e ff f4|f4 ff 7e 38) addi r3,r30,-12 + .*: (4b ff ff ed|ed ff ff 4b) bl 1800094 <__tls_get_addr> + #pass +diff --git a/ld/testsuite/ld-powerpc/tlsopt2_32.s b/ld/testsuite/ld-powerpc/tlsopt2_32.s +index bca1247..8c387d0 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt2_32.s ++++ b/ld/testsuite/ld-powerpc/tlsopt2_32.s +@@ -2,9 +2,9 @@ + # this section should not be optimised since we have old-style + # __tls_get_addr without marker relocs, and two arg setup insns + # feed into one __tls_get_addr call. +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + cmpwi 4,0 + beq 0f +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + 0: + bl __tls_get_addr +diff --git a/ld/testsuite/ld-powerpc/tlsopt3_32.d b/ld/testsuite/ld-powerpc/tlsopt3_32.d +index 55827a2..2bc999f 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt3_32.d ++++ b/ld/testsuite/ld-powerpc/tlsopt3_32.d +@@ -15,9 +15,9 @@ Disassembly of section \.text: + Disassembly of section \.no_opt3: + + 0+1800098 <\.no_opt3>: +-.*: (38 6d ff ec|ec ff 6d 38) addi r3,r13,-20 ++.*: (38 7e ff ec|ec ff 7e 38) addi r3,r30,-20 + .*: (48 00 00 0c|0c 00 00 48) b .* +-.*: (38 6d ff f4|f4 ff 6d 38) addi r3,r13,-12 ++.*: (38 7e ff f4|f4 ff 7e 38) addi r3,r30,-12 + .*: (48 00 00 0c|0c 00 00 48) b .* + .*: (4b ff ff ed|ed ff ff 4b) bl 1800094 <__tls_get_addr> + .*: (48 00 00 08|08 00 00 48) b .* +diff --git a/ld/testsuite/ld-powerpc/tlsopt3_32.s b/ld/testsuite/ld-powerpc/tlsopt3_32.s +index 6432c24..c2b5fcd 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt3_32.s ++++ b/ld/testsuite/ld-powerpc/tlsopt3_32.s +@@ -5,9 +5,9 @@ gd0: .space 8 + + .section ".no_opt3", "ax", %progbits + # this section should also not be optimised +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + b 0f +- addi 3,13,gd0@got@tlsgd ++ addi 3,30,gd0@got@tlsgd + b 1f + 0: + bl __tls_get_addr +diff --git a/ld/testsuite/ld-powerpc/tlsopt4_32.s b/ld/testsuite/ld-powerpc/tlsopt4_32.s +index 9643fcb..762067e 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt4_32.s ++++ b/ld/testsuite/ld-powerpc/tlsopt4_32.s +@@ -4,7 +4,7 @@ + gd0: .space 8 + + .section ".opt1", "ax", %progbits +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + cmpwi 4,0 + beq 0f + bl __tls_get_addr(gd@tlsgd) +@@ -14,17 +14,17 @@ gd0: .space 8 + 1: + + .section ".opt2", "ax", %progbits +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + cmpwi 4,0 + beq 0f +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + 0: + bl __tls_get_addr(gd@tlsgd) + + .section ".opt3", "ax", %progbits +- addi 3,13,gd@got@tlsgd ++ addi 3,30,gd@got@tlsgd + b 0f +- addi 3,13,gd0@got@tlsgd ++ addi 3,30,gd0@got@tlsgd + b 1f + 0: + bl __tls_get_addr(gd@tlsgd) +diff --git a/ld/testsuite/ld-powerpc/tlsopt5.d b/ld/testsuite/ld-powerpc/tlsopt5.d +index b356a2e..3c85185 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt5.d ++++ b/ld/testsuite/ld-powerpc/tlsopt5.d +@@ -1,6 +1,6 @@ + #source: tlsopt5.s + #as: -a64 +-#ld: --gc-sections --no-plt-localentry tlsdll.so ++#ld: -shared --gc-sections --no-plt-localentry tlsdll.so + #objdump: -dr + #target: powerpc64*-*-* + +@@ -8,7 +8,7 @@ + + Disassembly of section \.text: + +-0000000010000300 <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>: ++0+2c0 <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>: + .*: (00 00 63 e9|e9 63 00 00) ld r11,0\(r3\) + .*: (08 00 83 e9|e9 83 00 08) ld r12,8\(r3\) + .*: (78 1b 60 7c|7c 60 1b 78) mr r0,r3 +@@ -27,14 +27,14 @@ Disassembly of section \.text: + .*: (a6 03 68 7d|7d 68 03 a6) mtlr r11 + .*: (20 00 80 4e|4e 80 00 20) blr + +-0000000010000344 <_start>: ++0+304 <_start>: + .*: (08 80 62 38|38 62 80 08) addi r3,r2,-32760 + .*: (b9 ff ff 4b|4b ff ff b9) bl .* + .*: (00 00 00 60|60 00 00 00) nop +-.*: (b8 02 01 00|00 00 00 00) .* +-.*: (00 00 00 00|00 01 02 b8) .* ++.*: (f8 02 01 00|00 00 00 00) .* ++.*: (00 00 00 00|00 01 02 f8) .* + +-0000000010000358 <__glink_PLTresolve>: ++0+318 <__glink_PLTresolve>: + .*: (a6 02 08 7c|7c 08 02 a6) mflr r0 + .*: (05 00 9f 42|42 9f 00 05) bcl .* + .*: (a6 02 68 7d|7d 68 02 a6) mflr r11 +@@ -50,5 +50,5 @@ Disassembly of section \.text: + .*: (08 00 6b e9|e9 6b 00 08) ld r11,8\(r11\) + .*: (20 04 80 4e|4e 80 04 20) bctr + +-0000000010000390 <__tls_get_addr_opt@plt>: ++0+350 <__tls_get_addr_opt@plt>: + .*: (c8 ff ff 4b|4b ff ff c8) b .* +diff --git a/ld/testsuite/ld-powerpc/tlsopt5.s b/ld/testsuite/ld-powerpc/tlsopt5.s +index 598bbd9..70902ef 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt5.s ++++ b/ld/testsuite/ld-powerpc/tlsopt5.s +@@ -1,5 +1,7 @@ + .globl _start + _start: ++ .cfi_startproc + addi 3,2,gd@got@tlsgd + bl __tls_get_addr(gd@tlsgd) + nop ++ .cfi_endproc +diff --git a/ld/testsuite/ld-powerpc/tlsopt5.wf b/ld/testsuite/ld-powerpc/tlsopt5.wf +new file mode 100644 +index 0000000..05ef7e0 +--- /dev/null ++++ b/ld/testsuite/ld-powerpc/tlsopt5.wf +@@ -0,0 +1,32 @@ ++Contents of the \.eh_frame section: ++ ++0+ 0+10 0+ CIE ++ Version: 1 ++ Augmentation: "zR" ++ Code alignment factor: 4 ++ Data alignment factor: -8 ++ Return address column: 65 ++ Augmentation data: 1b ++ ++ DW_CFA_def_cfa: r1 ofs 0 ++ ++0+14 0+14 0+18 FDE cie=0+ pc=0+2c0\.\.0+304 ++ DW_CFA_advance_loc: 48 to 0+2f0 ++ DW_CFA_offset_extended_sf: r65 at cfa\+8 ++ DW_CFA_advance_loc: 16 to 0+300 ++ DW_CFA_restore_extended: r65 ++ ++0+2c 0+18 0+30 FDE cie=0+ pc=0+318\.\.0+354 ++ DW_CFA_advance_loc: 4 to 0+31c ++ DW_CFA_register: r65 in r0 ++ DW_CFA_advance_loc: 28 to 0+338 ++ DW_CFA_restore_extended: r65 ++ DW_CFA_nop ++ DW_CFA_nop ++ DW_CFA_nop ++ DW_CFA_nop ++ ++0+48 0+10 0+4c FDE cie=0+ pc=0+304\.\.0+310 ++ DW_CFA_nop ++ DW_CFA_nop ++ DW_CFA_nop +diff --git a/ld/testsuite/ld-powerpc/tlsopt5_32.d b/ld/testsuite/ld-powerpc/tlsopt5_32.d +index 9749248..64acf10 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt5_32.d ++++ b/ld/testsuite/ld-powerpc/tlsopt5_32.d +@@ -1,6 +1,6 @@ + #source: tlsopt5_32.s + #as: -a32 +-#ld: --gc-sections --secure-plt tlsdll32.so ++#ld: -shared --gc-sections --secure-plt tlsdll32.so + #objdump: -dr + #target: powerpc*-*-* + +@@ -8,12 +8,25 @@ + + Disassembly of section \.text: + +-01800230 <_start>: +-.*: (f8 ff 6d 38|38 6d ff f8) addi r3,r13,-8 +-.*: (0d 00 00 48|48 00 00 0d) bl 1800240 <__tls_get_addr_opt@plt> +- \.\.\. ++0+200 <_start>: ++.*: (f0 ff 21 94|94 21 ff f0) stwu r1,-16\(r1\) ++.*: (a6 02 08 7c|7c 08 02 a6) mflr r0 ++.*: (05 00 9f 42|42 9f 00 05) bcl .* ++.*: (08 00 c1 93|93 c1 00 08) stw r30,8\(r1\) ++.*: (a6 02 c8 7f|7f c8 02 a6) mflr r30 ++.*: (01 00 de 3f|3f de 00 01) addis r30,r30,1 ++.*: (14 00 01 90|90 01 00 14) stw r0,20\(r1\) ++.*: (7c 01 de 3b|3b de 01 7c) addi r30,r30,380 ++.*: (f8 ff 7e 38|38 7e ff f8) addi r3,r30,-8 ++.*: (1d 00 00 48|48 00 00 1d) bl 240 <.*__tls_get_addr_opt.*> ++.*: (14 00 01 80|80 01 00 14) lwz r0,20\(r1\) ++.*: (08 00 c1 83|83 c1 00 08) lwz r30,8\(r1\) ++.*: (a6 03 08 7c|7c 08 03 a6) mtlr r0 ++.*: (10 00 21 38|38 21 00 10) addi r1,r1,16 ++.*: (20 00 80 4e|4e 80 00 20) blr ++.* + +-01800240 <__tls_get_addr_opt@plt>: ++0+240 <.*__tls_get_addr_opt.*>: + .*: (00 00 63 81|81 63 00 00) lwz r11,0\(r3\) + .*: (04 00 83 81|81 83 00 04) lwz r12,4\(r3\) + .*: (78 1b 60 7c|7c 60 1b 78) mr r0,r3 +@@ -22,31 +35,31 @@ Disassembly of section \.text: + .*: (20 00 82 4d|4d 82 00 20) beqlr + .*: (78 03 03 7c|7c 03 03 78) mr r3,r0 + .*: (00 00 00 60|60 00 00 00) nop +-.*: (81 01 60 3d|3d 60 01 81) lis r11,385 +-.*: (9c 03 6b 81|81 6b 03 9c) lwz r11,924\(r11\) ++.*: (0c 00 7e 81|81 7e 00 0c) lwz r11,12\(r30\) + .*: (a6 03 69 7d|7d 69 03 a6) mtctr r11 + .*: (20 04 80 4e|4e 80 04 20) bctr ++.*: (00 00 00 60|60 00 00 00) nop + +-01800270 <__glink>: ++0+270 <__glink>: + .*: (00 00 00 60|60 00 00 00) nop + .*: (00 00 00 60|60 00 00 00) nop + .*: (00 00 00 60|60 00 00 00) nop + .*: (00 00 00 60|60 00 00 00) nop + +-01800280 <__glink_PLTresolve>: +-.*: (81 01 80 3d|3d 80 01 81) lis r12,385 +-.*: (80 fe 6b 3d|3d 6b fe 80) addis r11,r11,-384 +-.*: (94 03 0c 80|80 0c 03 94) lwz r0,916\(r12\) +-.*: (90 fd 6b 39|39 6b fd 90) addi r11,r11,-624 ++0+280 <__glink_PLTresolve>: ++.*: (00 00 6b 3d|3d 6b 00 00) addis r11,r11,0 ++.*: (a6 02 08 7c|7c 08 02 a6) mflr r0 ++.*: (05 00 9f 42|42 9f 00 05) bcl .* ++.*: (1c 00 6b 39|39 6b 00 1c) addi r11,r11,28 ++.*: (a6 02 88 7d|7d 88 02 a6) mflr r12 ++.*: (a6 03 08 7c|7c 08 03 a6) mtlr r0 ++.*: (50 58 6c 7d|7d 6c 58 50) subf r11,r12,r11 ++.*: (01 00 8c 3d|3d 8c 00 01) addis r12,r12,1 ++.*: (00 01 0c 80|80 0c 01 00) lwz r0,256\(r12\) ++.*: (04 01 8c 81|81 8c 01 04) lwz r12,260\(r12\) + .*: (a6 03 09 7c|7c 09 03 a6) mtctr r0 + .*: (14 5a 0b 7c|7c 0b 5a 14) add r0,r11,r11 +-.*: (98 03 8c 81|81 8c 03 98) lwz r12,920\(r12\) + .*: (14 5a 60 7d|7d 60 5a 14) add r11,r0,r11 + .*: (20 04 80 4e|4e 80 04 20) bctr + .*: (00 00 00 60|60 00 00 00) nop + .*: (00 00 00 60|60 00 00 00) nop +-.*: (00 00 00 60|60 00 00 00) nop +-.*: (00 00 00 60|60 00 00 00) nop +-.*: (00 00 00 60|60 00 00 00) nop +-.*: (00 00 00 60|60 00 00 00) nop +-.*: (00 00 00 60|60 00 00 00) nop +diff --git a/ld/testsuite/ld-powerpc/tlsopt5_32.s b/ld/testsuite/ld-powerpc/tlsopt5_32.s +index 36b4858..d07b742 100644 +--- a/ld/testsuite/ld-powerpc/tlsopt5_32.s ++++ b/ld/testsuite/ld-powerpc/tlsopt5_32.s +@@ -1,4 +1,18 @@ + .globl _start + _start: +- addi 3,13,gd@got@tlsgd +- bl __tls_get_addr(gd@tlsgd) ++ stwu 1,-16(1) ++ mflr 0 ++ bcl 20,31,.L2 ++.L2: ++ stw 30,8(1) ++ mflr 30 ++ addis 30,30,_GLOBAL_OFFSET_TABLE_-.L2@ha ++ stw 0,20(1) ++ addi 30,30,_GLOBAL_OFFSET_TABLE_-.L2@l ++ addi 3,30,gd@got@tlsgd ++ bl __tls_get_addr(gd@tlsgd)@plt ++ lwz 0,20(1) ++ lwz 30,8(1) ++ mtlr 0 ++ addi 1,1,16 ++ blr +diff --git a/ld/testsuite/ld-unique/pr21529.d b/ld/testsuite/ld-unique/pr21529.d +index bc4763d..ffc1a72 100644 +--- a/ld/testsuite/ld-unique/pr21529.d ++++ b/ld/testsuite/ld-unique/pr21529.d +@@ -1,5 +1,6 @@ + #ld: --oformat binary -T pr21529.ld -e main + #objdump: -s -b binary +-#xfail: aarch64*-*-* arm*-*-* hppa-*-* ia64-*-* nds32*-*-* score-*-* ++#notarget: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* score-*-* ++# Skip targets which can't change output format to binary. + + #pass +diff --git a/ld/testsuite/ld-x86-64/pr21884-nacl.d b/ld/testsuite/ld-x86-64/pr21884-nacl.d +new file mode 100644 +index 0000000..8883505 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr21884-nacl.d +@@ -0,0 +1,10 @@ ++#source: dummy.s ++#as: --64 ++#ld: -m elf_x86_64 -T pr21884-nacl.t -b binary ++#objdump: -b binary -s ++#target: x86_64-*-nacl* ++ ++.*: file format binary ++ ++Contents of section .data: ++#pass +diff --git a/ld/testsuite/ld-x86-64/pr21884-nacl.t b/ld/testsuite/ld-x86-64/pr21884-nacl.t +new file mode 100644 +index 0000000..722312e +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr21884-nacl.t +@@ -0,0 +1,11 @@ ++OUTPUT_FORMAT("elf64-x86-64-nacl"); ++OUTPUT_ARCH(i386:x86-64); ++ ++ENTRY(_start); ++SECTIONS { ++ . = 0x10000; ++ _start = . ; ++ .data : { ++ *(.data) ++ } ++} +diff --git a/ld/testsuite/ld-x86-64/pr21884.d b/ld/testsuite/ld-x86-64/pr21884.d +new file mode 100644 +index 0000000..7a2a3f3 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr21884.d +@@ -0,0 +1,10 @@ ++#source: dummy.s ++#as: --64 ++#ld: -m elf_x86_64 -T pr21884.t -b binary ++#objdump: -b binary -s ++#notarget: x86_64-*-nacl* ++ ++.*: file format binary ++ ++Contents of section .data: ++#pass +diff --git a/ld/testsuite/ld-x86-64/pr21884.t b/ld/testsuite/ld-x86-64/pr21884.t +new file mode 100644 +index 0000000..edd2070 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr21884.t +@@ -0,0 +1,11 @@ ++OUTPUT_FORMAT("elf64-x86-64"); ++OUTPUT_ARCH(i386:x86-64); ++ ++ENTRY(_start); ++SECTIONS { ++ . = 0x10000; ++ _start = . ; ++ .data : { ++ *(.data) ++ } ++} +diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp +index c582582..13c68b8 100644 +--- a/ld/testsuite/ld-x86-64/x86-64.exp ++++ b/ld/testsuite/ld-x86-64/x86-64.exp +@@ -365,6 +365,8 @@ run_dump_test "property-x86-shstk4" + run_dump_test "property-x86-shstk4-x32" + run_dump_test "property-x86-shstk5" + run_dump_test "property-x86-shstk5-x32" ++run_dump_test "pr21884" ++run_dump_test "pr21884-nacl" + + if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { + return diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f48c01e..f13e503 100644 --- a/opcodes/ChangeLog diff --git a/binutils.changes b/binutils.changes index c598ae8..7aee4b0 100644 --- a/binutils.changes +++ b/binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-aarch64-binutils.changes b/cross-aarch64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-aarch64-binutils.changes +++ b/cross-aarch64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-arm-binutils.changes b/cross-arm-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-arm-binutils.changes +++ b/cross-arm-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-avr-binutils.changes b/cross-avr-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-avr-binutils.changes +++ b/cross-avr-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-epiphany-binutils.changes b/cross-epiphany-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-epiphany-binutils.changes +++ b/cross-epiphany-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-hppa-binutils.changes b/cross-hppa-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-hppa-binutils.changes +++ b/cross-hppa-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-hppa64-binutils.changes b/cross-hppa64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-hppa64-binutils.changes +++ b/cross-hppa64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-i386-binutils.changes b/cross-i386-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-i386-binutils.changes +++ b/cross-i386-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-ia64-binutils.changes b/cross-ia64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-ia64-binutils.changes +++ b/cross-ia64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-m68k-binutils.changes b/cross-m68k-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-m68k-binutils.changes +++ b/cross-m68k-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-mips-binutils.changes b/cross-mips-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-mips-binutils.changes +++ b/cross-mips-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-ppc-binutils.changes b/cross-ppc-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-ppc-binutils.changes +++ b/cross-ppc-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-ppc64-binutils.changes b/cross-ppc64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-ppc64-binutils.changes +++ b/cross-ppc64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-ppc64le-binutils.changes b/cross-ppc64le-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-ppc64le-binutils.changes +++ b/cross-ppc64le-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-riscv64-binutils.changes b/cross-riscv64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-riscv64-binutils.changes +++ b/cross-riscv64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-rx-binutils.changes b/cross-rx-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-rx-binutils.changes +++ b/cross-rx-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-s390-binutils.changes b/cross-s390-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-s390-binutils.changes +++ b/cross-s390-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-s390x-binutils.changes b/cross-s390x-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-s390x-binutils.changes +++ b/cross-s390x-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-sparc-binutils.changes b/cross-sparc-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-sparc-binutils.changes +++ b/cross-sparc-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-sparc64-binutils.changes b/cross-sparc64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-sparc64-binutils.changes +++ b/cross-sparc64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-spu-binutils.changes b/cross-spu-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-spu-binutils.changes +++ b/cross-spu-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. ------------------------------------------------------------------- diff --git a/cross-x86_64-binutils.changes b/cross-x86_64-binutils.changes index c598ae8..7aee4b0 100644 --- a/cross-x86_64-binutils.changes +++ b/cross-x86_64-binutils.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 30 13:04:20 UTC 2017 - matz@suse.com + +- Update to 2.29 (@5d25156), upstream fix for PR21884, as + well as PRs 18808 18841 21840 21988 21910 21962 21964. + ------------------------------------------------------------------- Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com -- Last fixed for PR21884 weren't complete, adjust +- Last fixes for PR21884 weren't complete, adjust binutils-2.29-branch.diff some more for this. -------------------------------------------------------------------