public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] PR ld/22570: MIPS/BFD: Fix TLS relocation resolution for PIE executables Date: Wed, 11 Jul 2018 17:09:00 -0000 [thread overview] Message-ID: <9143e72c6d4ddefbcb41c0f6361ad140354145ef@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 9143e72c6d4ddefbcb41c0f6361ad140354145ef *** Author: Maciej W. Rozycki <macro@mips.com> Branch: master Commit: 9143e72c6d4ddefbcb41c0f6361ad140354145ef PR ld/22570: MIPS/BFD: Fix TLS relocation resolution for PIE executables Correct a commit 0e1862bb401f ("Add output_type to bfd_link_info") issue and use `bfd_link_dll' rather than `bfd_link_pic' in determining whether to fully resolve GD, LD and IE TLS relocations referring to symbols locally defined rather than deferring them to the load time by means of dynamic relocations. Such symbols cannot be preempted in PIE executables, which are necessarily PIC, and therefore their values (thread pointer offsets) are fixed at the static link time as is the associated module ID of the main executable. Given the `tlsbin-o32.s' and `tlsdyn-o32.s' sources from our test suite this removes the absolute TLS relocations from the static: DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE *ABS* 1000002c R_MIPS_TLS_TPREL32 *ABS* 10000030 R_MIPS_TLS_DTPMOD32 *ABS* 10000038 R_MIPS_TLS_DTPMOD32 *ABS* and the dynamic: DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE *ABS* 1000002c R_MIPS_TLS_TPREL32 *ABS* 10000038 R_MIPS_TLS_DTPMOD32 *ABS* 10000044 R_MIPS_TLS_DTPMOD32 *ABS* 10000030 R_MIPS_TLS_DTPMOD32 tlsvar_gd 10000034 R_MIPS_TLS_DTPREL32 tlsvar_gd 10000040 R_MIPS_TLS_TPREL32 tlsvar_ie PIE executable respectively, as reported by `objdump -R', and fills the corresponding GOT slots with the values expected, as recorded with the test cases added. The new output from `objdump -R' is: DYNAMIC RELOCATION RECORDS (none) and: DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE *ABS* 10000030 R_MIPS_TLS_DTPMOD32 tlsvar_gd 10000034 R_MIPS_TLS_DTPREL32 tlsvar_gd 10000040 R_MIPS_TLS_TPREL32 tlsvar_ie for the static and the dynamic executable respectively. 2018-07-11 Maciej W. Rozycki <macro@mips.com> Rich Felker <bugdal@aerifal.cx> bfd/ PR ld/22570 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather than `bfd_link_pic' to determine whether dynamic relocations are to be produced. (mips_elf_initialize_tls_slots): Likewise. ld/ PR ld/22570 * testsuite/ld-mips-elf/tlsbin-pie-o32.d: New test. * testsuite/ld-mips-elf/tlsbin-pie-o32.got: New test. * testsuite/ld-mips-elf/tlsdyn-pie-o32.d: New test. * testsuite/ld-mips-elf/tlsdyn-pie-o32.got: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
next reply other threads:[~2018-07-11 17:09 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-11 17:09 sergiodj+buildbot [this message] 2018-07-11 17:09 ` Failures on Fedora-i686, branch master sergiodj+buildbot 2018-07-11 17:10 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot 2018-07-11 17:11 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot 2018-07-11 17:11 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot 2018-07-11 17:12 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot 2018-07-11 17:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot 2018-07-11 17:24 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot 2018-07-11 17:37 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot 2018-07-11 17:48 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot 2018-07-11 17:55 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot 2018-07-11 18:03 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot 2018-07-11 18:03 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+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=9143e72c6d4ddefbcb41c0f6361ad140354145ef@gdb-build \ --to=sergiodj+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).