public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/45286] kact.sa_restorer = &restore_rt; in sigaction.c glibc get miss compile with -fPIE on x86_64
Date: Mon, 16 Aug 2010 11:16:00 -0000	[thread overview]
Message-ID: <20100816111615.30374.qmail@sourceware.org> (raw)
In-Reply-To: <bug-45286-17238@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from jakub at gcc dot gnu dot org  2010-08-16 11:16 -------
Re: #c12, the difference is because the source code is different.
In the first preprocessed source, restore_rt isn't hidden, in the latter it is.
So, in the first case (-fPIE) gcc can't assume __restore_rt is defined in the
same shared library or binary, in the latter case it can.
Shorter testcase is:
extern void foo (void) asm ("baz")
#ifdef HIDDEN
__attribute__((visibility ("hidden")))
#endif
;
void *bar (void)
{
  return &foo;
}
asm (".text; .type baz, @function; baz: nop; .previous");

-fpie vs. -fpic -DHIDDEN, the only difference is again:
-       movq    baz@GOTPCREL(%rip), %rax
+       leaq    baz(%rip), %rax

So, if there is any bug, it is either on the assembler/ld side, or on the glibc
side or user side, compiling glibc in a way it was never meant to be compiled.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45286


  parent reply	other threads:[~2010-08-16 11:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15  1:00 [Bug c/45286] New: " zorry at ume dot nu
2010-08-15  1:02 ` [Bug c/45286] " zorry at ume dot nu
2010-08-15  1:04 ` zorry at ume dot nu
2010-08-15  2:25 ` hjl dot tools at gmail dot com
2010-08-15  4:41 ` vapier at gentoo dot org
2010-08-15  5:40 ` hjl dot tools at gmail dot com
2010-08-15  5:49 ` vapier at gentoo dot org
2010-08-15 20:36 ` hjl dot tools at gmail dot com
2010-08-15 20:41 ` vapier at gentoo dot org
2010-08-15 20:46 ` hjl dot tools at gmail dot com
2010-08-15 21:01 ` vapier at gentoo dot org
2010-08-15 21:15 ` hjl dot tools at gmail dot com
2010-08-15 21:32 ` zorry at ume dot nu
2010-08-15 21:36 ` hjl dot tools at gmail dot com
2010-08-15 21:59 ` vapier at gentoo dot org
2010-08-15 22:12 ` rguenth at gcc dot gnu dot org
2010-08-16 11:16 ` jakub at gcc dot gnu dot org [this message]
2010-08-18  3:23 ` vapier at gentoo dot org
2010-08-18  3:29 ` hjl dot tools at gmail dot com
2010-08-18  3:39 ` vapier at gentoo dot org
2010-08-18  3:59 ` hjl dot tools at gmail dot com
     [not found] <bug-45286-4@http.gcc.gnu.org/bugzilla/>
2015-07-04 15:23 ` zorry at gentoo dot org
2015-07-04 15:40 ` hjl.tools at gmail dot com

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=20100816111615.30374.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: 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).