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] ld: aarch64: fix TLS relaxation where TCB_SIZE is used Date: Wed, 14 Dec 2016 09:08:00 -0000 [thread overview] Message-ID: <c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b@gdb-build> (raw) *** TEST RESULTS FOR COMMIT c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b *** Author: Yury Norov <ynorov@caviumnetworks.com> Branch: master Commit: c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b ld: aarch64: fix TLS relaxation where TCB_SIZE is used TCB_SIZE is 2*sizeof(void *), which is 0x10 for lp64, and 0x8 for ilp32. During relaxation, ld goes to do a replace: bl __tls_get_addr => add R0, R0, TCB_SIZE But actual implementation is: bfd_putl32 (0x91004000, contents + rel->r_offset + 4); Which is equivalent of add x0, x0, 0x10. This is wrong for ilp32. The possible fix for it is: bfd_putl32 (0x91000000 | (TCB_SIZE<<10), contents + rel->r_offset + 4); But ilp32 also needs w-registers, so it's simpler to put proper instruction in #if/#else condition. There are 2 such relaxations in elfNN_aarch64_tls_relax(), and so 2 new tests added for ilp32 mode to test it. Yury * bfd/elfnn-aarch64.c: fix TLS relaxations for ilp32 where TCB_SIZE is used. * ld/testsuite/ld-aarch64/aarch64-elf.exp: Add tests for the case. * ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: New file. * ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: New file. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
next reply other threads:[~2016-12-14 8:41 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-14 9:08 sergiodj+buildbot [this message] 2016-12-14 10:17 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot 2016-12-14 10:19 ` Failures on Debian-s390x-m64, " sergiodj+buildbot 2016-12-14 10:34 ` Failures on Fedora-i686, " sergiodj+buildbot 2016-12-14 11:52 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot 2016-12-14 14:25 ` Failures on Debian-i686, " sergiodj+buildbot 2016-12-19 4:55 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot 2016-12-19 5:54 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot -- strict thread matches above, loose matches on Subject: below -- 2016-12-14 6:47 [binutils-gdb] ld: aarch64: fix TLS relaxation where TCB_SIZE is used 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=c1fc2d7ee590f3bc87ee79c36e7216b0b6bb054b@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).