summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c3
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/ldmisc.c2
-rw-r--r--ld/testsuite/ld-elf/indirect.exp3
5 files changed, 17 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b691d585712..607f37cfb27 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2019-10-07 Alan Modra <amodra@gmail.com>
+ * elflink.c (elf_fixup_link_order): Don't attempt to find
+ an elf_section for linker created bfd sections.
+
+2019-10-07 Alan Modra <amodra@gmail.com>
+
* elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
with non-local symbol. Don't double count __tls_get_addr calls
with marker relocs.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 371c0969e61..395d96d6cfb 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11535,7 +11535,8 @@ elf_fixup_link_order (bfd *abfd, asection *o)
{
s = p->u.indirect.section;
sub = s->owner;
- if (bfd_get_flavour (sub) == bfd_target_elf_flavour
+ if ((s->flags & SEC_LINKER_CREATED) == 0
+ && bfd_get_flavour (sub) == bfd_target_elf_flavour
&& elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass
&& (elfsec = _bfd_elf_section_from_bfd_section (sub, s))
&& elfsec < elf_numsections (sub)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index a3fd84f1bd1..ddec8c79ce3 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2019-10-07 Alan Modra <amodra@gmail.com>
+ * ldmisc.c (vfinfo): Save and restore bfd_error around bfd
+ function calls that might set it.
+ * testsuite/ld-elf/indirect.exp: Don't expect "nonrepresentable
+ section" message.
+
+2019-10-07 Alan Modra <amodra@gmail.com>
+
* testsuite/ld-powerpc/tlsexe.r: Adjust for added TLSMARK symbol.
* testsuite/ld-powerpc/tlsexe32.r: Likewise.
* testsuite/ld-powerpc/tlsso.r: Likewise.
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 848e227b052..2e53d645985 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -322,6 +322,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
unsigned int linenumber;
bfd_boolean discard_last;
bfd_boolean done;
+ bfd_error_type last_bfd_error = bfd_get_error ();
abfd = args[arg_no].reladdr.abfd;
section = args[arg_no].reladdr.sec;
@@ -406,6 +407,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
}
if (!done)
lfinfo (fp, "(%pA+0x%v)", section, offset);
+ bfd_set_error (last_bfd_error);
if (discard_last)
{
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp
index 1acb556dba0..6f1fed34e7f 100644
--- a/ld/testsuite/ld-elf/indirect.exp
+++ b/ld/testsuite/ld-elf/indirect.exp
@@ -123,11 +123,10 @@ set testname "Indirect symbol 1b"
set cmd "$ld -e start -o tmpdir/indirect1 tmpdir/indirect1a.o tmpdir/libindirect1c.so tmpdir/indirect1b.o"
check_link_message "$cmd" [list $string1 $string] "$testname"
-set string ": final link failed: nonrepresentable section on output"
set string2 ": no symbol version section for versioned symbol \`foo@FOO\'"
set testname "Indirect symbol 2"
set cmd "$ld -shared -o tmpdir/indirect2.so tmpdir/indirect2.o"
-check_link_message "$cmd" [list $string2 $string] "$testname"
+check_link_message "$cmd" [list $string2] "$testname"
global NOPIE_CFLAGS NOPIE_LDFLAGS