public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] PR24697, R_PPC_EMB_SDA21 cannot be used when making a shared object Date: Thu, 29 Aug 2019 12:16:00 -0000 [thread overview] Message-ID: <c0d9f31dbd8765dd925e6a4b4acdb9b23d1706f6@gdb-build> (raw) *** TEST RESULTS FOR COMMIT c0d9f31dbd8765dd925e6a4b4acdb9b23d1706f6 *** commit c0d9f31dbd8765dd925e6a4b4acdb9b23d1706f6 Author: Alan Modra <amodra@gmail.com> AuthorDate: Thu Aug 29 18:35:54 2019 +0930 Commit: Alan Modra <amodra@gmail.com> CommitDate: Thu Aug 29 21:07:00 2019 +0930 PR24697, R_PPC_EMB_SDA21 cannot be used when making a shared object This removes a restriction on various R_PPC_EMB relocations that has been present for ppc32 since 1996-04-26 git commit e25a798839. As far as I know, only those relocs that would require addressing via r2 for .sdata2/.sbss2 access are disallowed in shared libraries. PR 24697 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc when !bfd_link_executable for R_PPC_EMB_SDA2I16 and R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other reloc. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e604dc75f8..d292e87f56 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2019-08-29 Alan Modra <amodra@gmail.com> + + PR 24697 + * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc + when !bfd_link_executable for R_PPC_EMB_SDA2I16 and + R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other + reloc. + 2019-08-29 Alan Modra <amodra@gmail.com> * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 78d39efe48..5e5834a70c 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -3096,11 +3096,6 @@ ppc_elf_check_relocs (bfd *abfd, /* Indirect .sdata relocation. */ case R_PPC_EMB_SDAI16: - if (bfd_link_pic (info)) - { - bad_shared_reloc (abfd, r_type); - return FALSE; - } htab->sdata[0].sym->ref_regular = 1; if (!elf_allocate_pointer_linker_section (abfd, &htab->sdata[0], h, rel)) @@ -3114,7 +3109,7 @@ ppc_elf_check_relocs (bfd *abfd, /* Indirect .sdata2 relocation. */ case R_PPC_EMB_SDA2I16: - if (bfd_link_pic (info)) + if (!bfd_link_executable (info)) { bad_shared_reloc (abfd, r_type); return FALSE; @@ -3160,7 +3155,7 @@ ppc_elf_check_relocs (bfd *abfd, break; case R_PPC_EMB_SDA2REL: - if (bfd_link_pic (info)) + if (!bfd_link_executable (info)) { bad_shared_reloc (abfd, r_type); return FALSE; @@ -3177,11 +3172,6 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_VLE_SDA21: case R_PPC_EMB_SDA21: case R_PPC_EMB_RELSDA: - if (bfd_link_pic (info)) - { - bad_shared_reloc (abfd, r_type); - return FALSE; - } if (h != NULL) { ppc_elf_hash_entry (h)->has_sda_refs = TRUE; @@ -3194,11 +3184,6 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_EMB_NADDR16_LO: case R_PPC_EMB_NADDR16_HI: case R_PPC_EMB_NADDR16_HA: - if (bfd_link_pic (info)) - { - bad_shared_reloc (abfd, r_type); - return FALSE; - } if (h != NULL) h->non_got_ref = TRUE; break;
next reply other threads:[~2019-08-29 11:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-29 12:16 gdb-buildbot [this message] 2019-08-29 12:18 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot 2019-08-29 12:18 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " gdb-buildbot 2019-08-29 12:36 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot 2019-08-29 12:40 ` Failures on Fedora-i686, " gdb-buildbot 2019-08-29 12:47 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot 2019-08-29 12:55 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2019-08-29 13:00 ` Failures on Debian-s390x-m64, " gdb-buildbot 2019-08-29 13:06 ` Failures on Debian-s390x-native-gdbserver-m64, " gdb-buildbot 2019-08-29 13:06 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2019-08-29 13:08 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2019-08-29 13:23 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2019-08-29 13:33 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=c0d9f31dbd8765dd925e6a4b4acdb9b23d1706f6@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).