public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Phil Blundell <pb@nexus.co.uk> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: target/5399: arm/thumb: pointer indirections when using -fpic Date: Wed, 16 Jan 2002 03:16:00 -0000 [thread overview] Message-ID: <20020116111602.18656.qmail@sources.redhat.com> (raw) The following reply was made to PR target/5399; it has been noted by GNATS. From: Phil Blundell <pb@nexus.co.uk> To: Adrian von Bidder <avbidder@atlas.acter.ch> Cc: gcc-gnats@gcc.gnu.org Subject: Re: target/5399: arm/thumb: pointer indirections when using -fpic Date: 16 Jan 2002 11:11:54 +0000 On Wed, 2002-01-16 at 10:22, Adrian von Bidder wrote: > The problem is - afaics - the GOTOFF (instead of GOT). In the linked binary, > .L2 contains the offset of .LC1 from start of GOT, which is start of data, too, > and not the offset of a GOT entry for .LC1. So the first load loads .L2, the > second load already loads the string pointer .LC1 and the third load then loads > the first four bytes of the string itself... Try something like this. The problem isn't so much the GOTOFF itself (although the handling of that is fairly broken) as that the indirection through .LC1 shouldn't be happening in the first place. p. Index: arm.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v retrieving revision 1.98.4.3 diff -u -r1.98.4.3 arm.h --- arm.h 2001/12/07 09:49:23 1.98.4.3 +++ arm.h 2002/01/16 11:08:13 @@ -1899,7 +1899,8 @@ #define THUMB_LEGITIMATE_CONSTANT_P(X) \ ( GET_CODE (X) == CONST_INT \ || GET_CODE (X) == CONST_DOUBLE \ - || CONSTANT_ADDRESS_P (X)) + || CONSTANT_ADDRESS_P (X) \ + || flag_pic) #define LEGITIMATE_CONSTANT_P(X) \ (TARGET_ARM ? ARM_LEGITIMATE_CONSTANT_P (X) : THUMB_LEGITIMATE_CONSTANT_P (X))
next reply other threads:[~2002-01-16 11:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-01-16 3:16 Phil Blundell [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-01-18 9:35 pb 2002-01-16 2:26 Adrian von Bidder
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=20020116111602.18656.qmail@sources.redhat.com \ --to=pb@nexus.co.uk \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.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).