[llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link on Linux/x86

Nelson Elhage nelhage at nelhage.com
Mon Jul 5 12:53:44 PDT 2010


Rebased to current mainline.

- Nelson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack-protector-linux.diff
Type: text/x-diff
Size: 6551 bytes
Desc: Fix -fstack-protector on Linux/x86
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100705/7320adb5/attachment.diff>
-------------- next part --------------

On Mon, 5 Jul 2010 11:22:52 -0700, Eric Christopher <echristo at apple.com> wrote:
> 
> On Jul 5, 2010, at 11:16 AM, Eric Christopher wrote:
> 
> > 
> > On Jul 5, 2010, at 11:11 AM, Nelson Elhage wrote:
> > 
> >> <stack-protector-linux.diff>
> > 
> > I'm not against this way in general.
> > 
> > You can use "isELF" in the Subtarget area instead of including triple though.  If you can make that change real fast that would be great.
> 
> As has been pointed out BSD is also elf.  I need to fix some comments and then give me a second to get things set up as far as the subtarget.
> 
> -eric
From: Nelson Elhage <nelhage at nelhage.com>
Subject: Re: [llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link on Linux/x86
To: Eric Christopher <echristo at apple.com>
Cc: llvm-commits at cs.uiuc.edu
Bcc: nelhage at mit.edu
In-Reply-To: <9396FE2A-1D59-4AAC-A5A8-F10DB3FA34FF at apple.com>
References: <201006190247.o5J2lCxL009172 at outgoing.mit.edu> <87wrt9ssrh.fsf at mit.edu> <9396FE2A-1D59-4AAC-A5A8-F10DB3FA34FF at apple.com>

On Mon, 5 Jul 2010 11:16:51 -0700, Eric Christopher <echristo at apple.com> wrote:
> 
> On Jul 5, 2010, at 11:11 AM, Nelson Elhage wrote:
> 
> > <stack-protector-linux.diff>
> 
> I'm not against this way in general.
> 
> You can use "isELF" in the Subtarget area instead of including triple though.  If you can make that change real fast that would be great.
> 
> -eric
From: Nelson Elhage <nelhage at nelhage.com>
Subject: Re: [llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link  on Linux/x86
To: llvm-commits at cs.uiuc.edu
Bcc: nelhage at mit.edu
In-Reply-To: <87wrt9ssrh.fsf at mit.edu>
References: <201006190247.o5J2lCxL009172 at outgoing.mit.edu> <87wrt9ssrh.fsf at mit.edu>

On Mon, 05 Jul 2010 14:11:46 -0400, Nelson Elhage <nelhage at nelhage.com> wrote:
> [bump] I haven't gotten an reply to this, and IRC suggested a reminder
> would be appropriate.
> 
> I'm happy to rewrite this using a different approach if something else
> would be more appropriate, but I'd love to see this bug fixed since it
> affects my ability to compile projects I work on with clang.
> 
From: Nelson Elhage <nelhage at nelhage.com>
Subject: Re: [llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link  on Linux/x86
To: llvm-commits at cs.uiuc.edu
Bcc: nelhage at mit.edu
In-Reply-To: <201006190247.o5J2lCxL009172 at outgoing.mit.edu>
References: <201006190247.o5J2lCxL009172 at outgoing.mit.edu>

On Fri, 18 Jun 2010 22:47:17 -0400 (EDT), Nelson Elhage <nelhage at nelhage.com> wrote:
> This patch adds a hook to TargetLowering to indicate whether the stack protector
> cookie is stored in a non-standard place.
> 
> Code-diving glibc, it appears that in general it stores the stack cookie off of
> the TCB header. I'm not sure if there's a more generic solution than the
> address-space/offset approach in this patch for accessing the TCB header in the
> generated IR.
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack-protector-linux.diff
Type: text/x-diff
Size: 6551 bytes
Desc: Fix -fstack-protector on Linux/x86
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100705/7320adb5/attachment-0001.diff>
-------------- next part --------------
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 


More information about the llvm-commits mailing list