From: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
To: binutils@sourceware.cygnus.com
Cc: "David S. Miller" <davem@redhat.com>
Subject: [PATCH] Revert of tc-sparc.h changes which break pic
Date: Mon, 26 Jul 1999 09:13:00 -0000 [thread overview]
Message-ID: <19990726181513.R5667@mff.cuni.cz> (raw)
Hi!
Ian's patch to tc-sparc.h broke -fpic/PIC support on SPARC completely.
I agree the patch is the right way to go, but first of all
elf{32,64}_sparc.c have to be tought to grok it.
The issue is that the change made symbols like .LLC001 go away and thus
assembler output was GOT22/GOT13/GOT10 with e.g. .rodata symbol and non-zero
addend, which sparc ELF backends just screw up.
Can this be applied and I will hack up support for non-zero addends for GOT
relocations? (I think it will be enough to do this for local symbols only,
the Alpha way of doing things seems to be too complicated for this issue.
I guess I could use a hash table for it, not linked lists as Alpha).
Example of code which barfs is e.g.:
gcc -shared -o libfoo.so foo.c
foo.c:
void foo(void)
{
printf ("bar");
}
not to mention ld.so's
__asm("sethi %%hi(.Load_address), %1\n"
".Load_address:\n\t"
"rd %%pc, %0\n\t"
"or %1, %%lo(.Load_address), %1\n\t"
: "=r"(pc), "=r"(la));
1999-07-25 Jakub Jelinek <jj@ultra.linux.cz>
* gas/config/tc-sparc.h (tc_fix_adjustable): Revert July, 10th
change until elfNN_sparc.c are tought to handle got entries with
non-zero addend correctly.
--- tc-sparc.h.jj9x Fri Jul 23 17:00:15 1999
+++ tc-sparc.h.jj9 Mon Jul 26 15:53:47 1999
@@ -132,7 +132,8 @@
|| ((FIX)->fx_subsy != NULL \
&& (S_GET_SEGMENT ((FIX)->fx_subsy) \
== S_GET_SEGMENT ((FIX)->fx_addsy))) \
- || S_IS_LOCAL ((FIX)->fx_addsy)))
+ || strchr (S_GET_NAME ((FIX)->fx_addsy), '\001') != NULL \
+ || strchr (S_GET_NAME ((FIX)->fx_addsy), '\002') != NULL))
#endif
#ifdef OBJ_AOUT
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.10 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
next reply other threads:[~1999-07-26 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-26 9:13 Jakub Jelinek [this message]
1999-07-26 14:09 ` Richard Henderson
1999-07-27 12:28 ` Ian Lance Taylor
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=19990726181513.R5667@mff.cuni.cz \
--to=jj@sunsite.ms.mff.cuni.cz \
--cc=binutils@sourceware.cygnus.com \
--cc=davem@redhat.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).