- Last fixed for PR21884 weren't complete, adjust

binutils-2.29-branch.diff some more for this.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=247
This commit is contained in:
Michael Matz 2017-08-11 14:01:07 +00:00 committed by Git OBS Bridge
parent a30a0a2021
commit 383988ae48
23 changed files with 283 additions and 6 deletions

View File

@ -1,8 +1,18 @@
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 89f4338..211e340 100644
index 89f4338..cc9b787 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,53 @@
@@ -1,3 +1,63 @@
+2017-08-07 Nick Clifton <nickc@redhat.com>
+
+ PR 21884
+ * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
+ has not been set then use the bfd returned by
+ _bfd_elf_link_setup_gnu_properties. If that is null then search
+ through all the input bfds selecting the first normal, ELF format
+ one.
+ * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
+
+2017-08-08 Alan Modra <amodra@gmail.com>
+
+ PR 21017
@ -152,6 +162,63 @@ index b001a88..cd31410 100644
# Controls whether to enable development-mode features by default.
-development=false
+development=true
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index df16775..b46ed2d 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -6914,20 +6914,29 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
set it in check_relocs. */
if (dynobj == NULL)
{
- bfd *abfd;
-
- /* Find a normal input file to hold linker created
- sections. */
- for (abfd = info->input_bfds;
- abfd != NULL;
- abfd = abfd->link.next)
- if ((abfd->flags
- & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
- {
- htab->elf.dynobj = abfd;
- dynobj = abfd;
- break;
- }
+ if (pbfd != NULL)
+ {
+ htab->elf.dynobj = pbfd;
+ dynobj = pbfd;
+ }
+ else
+ {
+ bfd *abfd;
+
+ /* Find a normal input file to hold linker created
+ sections. */
+ for (abfd = info->input_bfds;
+ abfd != NULL;
+ abfd = abfd->link.next)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && (abfd->flags
+ & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
+ {
+ htab->elf.dynobj = abfd;
+ dynobj = abfd;
+ break;
+ }
+ }
}
/* Even when lazy binding is disabled by "-z now", the PLT0 entry may
@@ -7019,7 +7028,7 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
return pbfd;
/* Since create_dynamic_sections isn't always called, but GOT
- relocations need GOT relocations, create them here so that we
+ relocations need GOT sections, create them here so that we
don't need to do it in check_relocs. */
if (htab->elf.sgot == NULL
&& !_bfd_elf_create_got_section (dynobj, info))
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 2657736..94ef09e 100644
--- a/bfd/elf32-microblaze.c
@ -316,6 +383,22 @@ index f85f8cd..d25c72b 100644
local_plt = elf_s390_local_plt (ibfd);
if (local_plt != NULL)
for (i = 0; i < symtab_hdr->sh_info; i++)
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c80a9ca..821a7d9c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -7466,8 +7466,9 @@ error_alignment:
for (abfd = info->input_bfds;
abfd != NULL;
abfd = abfd->link.next)
- if ((abfd->flags
- & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && (abfd->flags
+ & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
{
htab->elf.dynobj = abfd;
dynobj = abfd;
diff --git a/bfd/po/fr.po b/bfd/po/fr.po
index 6cd65af..fe2855f 100644
--- a/bfd/po/fr.po
@ -11095,12 +11178,12 @@ 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/version.h b/bfd/version.h
index f3dfbf0..bed15b5 100644
index f3dfbf0..4b54927 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20170724
+#define BFD_VERSION_DATE 20170810
+#define BFD_VERSION_DATE 20170811
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
@ -11260,10 +11343,20 @@ index a57f547..cccec4c 100644
template<int size, bool big_endian>
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d5b208a..e4756be 100644
index d5b208a..6540ac2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,36 @@
@@ -1,3 +1,46 @@
+2017-08-10 Nick Clifton <nickc@redhat.com>
+
+ Backport from mainline:
+ 2017-08-10 Nick Clifton <nickc@redhat.com>
+
+ PR gas/21939
+ * config/obj-macho.c (obj_mach_o_set_indirect_symbols): Increase
+ size of indirect_syms array so that it is large enough to hold
+ every symbol if necessary.
+
+2017-08-09 Jiong Wang <jiong.wang@arm.com>
+
+ * config/tc-arm.c (do_crc32_1): Remove warning on REG_SP for thumb_mode.
@ -11300,6 +11393,58 @@ index d5b208a..e4756be 100644
2017-07-24 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c
index 28867bd..8cc9581 100644
--- a/gas/config/obj-macho.c
+++ b/gas/config/obj-macho.c
@@ -1808,15 +1808,21 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec,
{
unsigned n;
bfd_mach_o_asymbol *sym;
+
+ /* FIXME: It seems that there can be more indirect symbols
+ than is computed by the loop above. So be paranoid and
+ allocate enough space for every symbol to be indirect.
+ See PR 21939 for an example of where this is needed. */
+ if (nactual < bfd_get_symcount (abfd))
+ nactual = bfd_get_symcount (abfd);
+
ms->indirect_syms =
bfd_zalloc (abfd,
nactual * sizeof (bfd_mach_o_asymbol *));
if (ms->indirect_syms == NULL)
- {
- as_fatal (_("internal error: failed to allocate %d indirect"
- "symbol pointers"), nactual);
- }
+ as_fatal (_("internal error: failed to allocate %d indirect"
+ "symbol pointers"), nactual);
for (isym = list, n = 0; isym != NULL; isym = isym->next, n++)
{
@@ -1827,7 +1833,11 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec,
Absolute symbols are handled specially. */
if (sym->symbol.section == bfd_abs_section_ptr)
- ms->indirect_syms[n] = sym;
+ {
+ if (n >= nactual)
+ as_fatal (_("internal error: more indirect mach-o symbols than expected"));
+ ms->indirect_syms[n] = sym;
+ }
else if (S_IS_LOCAL (isym->sym) && ! lazy)
;
else
@@ -1847,6 +1857,8 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec,
&& ! (sym->n_type & BFD_MACH_O_N_PEXT)
&& (sym->n_type & BFD_MACH_O_N_EXT))
sym->n_desc |= lazy;
+ if (n >= nactual)
+ as_fatal (_("internal error: more indirect mach-o symbols than expected"));
ms->indirect_syms[n] = sym;
}
}
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index e22ffe6..c3662da 100644
--- a/gas/config/tc-arm.c

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 11 14:00:02 UTC 2017 - matz@suse.com
- Last fixed for PR21884 weren't complete, adjust
binutils-2.29-branch.diff some more for this.
-------------------------------------------------------------------
Thu Aug 10 14:49:16 UTC 2017 - matz@suse.com