From: kaz Kojima <kkojima@rr.iij4u.or.jp>
To: libc-hacker@sources.redhat.com
Cc: hp@bitrange.com, stephen.clarke@superh.com, joern.rennecke@superh.com
Subject: SH TLS macros fix
Date: Sat, 05 Oct 2002 14:55:00 -0000 [thread overview]
Message-ID: <200210050302.g9532GO02850@r-rr.iij4u.or.jp> (raw)
Hi,
Uli pointed out to me that now SH TLS ABI doesn't need R_SH_TLS_*_MOV
relocations. I've fixed binutils and then found the current macros
for SH in elf/tls-macros.h don't match ABI. Here is a fix.
BTW, I've revised my tiny TLS memo
<URL:http://dodo.nurs.or.jp/~kkojima/gnu-on-sh/tls-sh-memo.txt>.
I'll send binutils changes to binutils mailing list ASAP.
Regards,
kaz
--
2002-10-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf/tls-macros.h: Fix SH version of macros so as to match
ABI syntax.
--- ORIG/libc/elf/tls-macros.h Thu Oct 3 19:42:19 2002
+++ LOCAL/libc/elf/tls-macros.h Sat Oct 5 10:10:52 2002
@@ -154,8 +154,8 @@
"bra 2f\n\t" \
" add %1,%0\n\t" \
".align 2\n\t" \
- "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
"1: .long " #x "@gottpoff\n\t" \
+ "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
"2:" \
: "=r" (__l), "=r" (__tp) : : "r0", "r12"); \
__l; })
@@ -171,17 +171,20 @@
"add r0,r1\n\t" \
"jsr @r1\n\t" \
" add r12,r4\n\t" \
- "mov.l 3f,%0\n\t" \
"bra 4f\n\t" \
- " add r0,%0\n\t" \
+ " nop\n\t" \
".align 2\n\t" \
- "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
"1: .long " #x "@tlsldm\n\t" \
"2: .long __tls_get_addr@plt\n\t" \
+ "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
+ "4: mov.l 3f,%0\n\t" \
+ "bra 5f\n\t" \
+ " add r0,%0\n\t" \
+ ".align 2\n\t" \
"3: .long " #x "@dtpoff\n\t" \
- "4:" \
+ "5:" \
: "=r" (__l) : : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r12", "pr", "t"); \
+ "r12", "pr", "t"); \
__l; })
# define TLS_GD(x) \
@@ -198,12 +201,12 @@
"bra 3f\n\t" \
" mov r0,%0\n\t" \
".align 2\n\t" \
- "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
"1: .long " #x "@tlsgd\n\t" \
"2: .long __tls_get_addr@plt\n\t" \
+ "0: .long _GLOBAL_OFFSET_TABLE_\n\t" \
"3:" \
: "=r" (__l) : : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r12", "pr", "t"); \
+ "r12", "pr", "t"); \
__l; })
#else
reply other threads:[~2002-10-05 3:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200210050302.g9532GO02850@r-rr.iij4u.or.jp \
--to=kkojima@rr.iij4u.or.jp \
--cc=hp@bitrange.com \
--cc=joern.rennecke@superh.com \
--cc=libc-hacker@sources.redhat.com \
--cc=stephen.clarke@superh.com \
/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: link
Be 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).