Re: %gs:0x14

2006-11-21 Thread Roland McGrath
I think it really ought to be controlled by a -mno-stack-protector-tls or suchlike, for complete flexibility. Obviously it should default to disabled for -ffreestanding. Those are GCC quality issues. AFAIK, it does configure checks on the installed libc for linux configs to decide the ssp stuff.

Re: %gs:0x14

2006-11-15 Thread Thomas Schwinge
Hello! On Tue, Nov 14, 2006 at 04:15:08PM +0100, Thomas Schwinge wrote: > Using `-fstack-protector' with GCC 4.1 made it include assembler code > using ``%gs:0x14'' even with `-ffreestanding'. However, this isn't the > correct thing to do on a) GNU/Hurd user space and neither b) in kernel > space

Re: %gs:0x14

2006-11-14 Thread Samuel Thibault
Neill Miller, le Tue 14 Nov 2006 11:29:32 -0600, a écrit : > One more time, this time adding the -ffreestanding option after the > -fstack-protector option: > > movl%gs:20, %eax So gcc is still buggy. Samuel ___ Bug-hurd mailing list Bug

Re: %gs:0x14

2006-11-14 Thread Neill Miller
On Tue, 14 Nov 2006 11:08:02 -0600 Neill Miller <[EMAIL PROTECTED]> wrote: One more time, this time adding the -ffreestanding option after the -fstack-protector option: > > $ echo 'void f (void) { volatile char a[8]; a[3]; }' | gcc -S -x c -O2 > > -fstack-protector - -o -; uname -a; /lib/libc-*

Re: %gs:0x14

2006-11-14 Thread Neill Miller
On Tue, 14 Nov 2006 17:57:50 +0100 Thomas Schwinge <[EMAIL PROTECTED]> wrote: Oops, that was on PPC. Let me try this again ;-) Note that while it's an AMD 64 chip, it's running in full 32-bit mode with no 64 bit anything. Hope that helps. > #v+ > $ echo 'void f (void) { volatile char a[8]; a[

Re: %gs:0x14

2006-11-14 Thread Samuel Thibault
Neill Miller, le Tue 14 Nov 2006 11:08:02 -0600, a écrit : > [EMAIL PROTECTED] ~ $ echo 'void f (void) { volatile char a[8]; a[3]; }' | > gcc -S -x c -O2 -fstack-protector - -o -; uname -a; /lib/libc-*.so > lwz 0,-28680(2) That's the TLS STACK_CHK_GUARD instruction. Could you retry with

Re: %gs:0x14

2006-11-14 Thread Neill Miller
On Tue, 14 Nov 2006 17:57:50 +0100 Thomas Schwinge <[EMAIL PROTECTED]> wrote: Hello, Hope this helps! > ... because this is a Debian testing system and they're still using a > 2.3-based glibc. That's probably it. If someone has easy access to a > system with a really recent GCC 4.1 or GCC 4.2

Re: %gs:0x14

2006-11-14 Thread Thomas Schwinge
Hello! On Tue, Nov 14, 2006 at 04:26:26PM +0100, Samuel Thibault wrote: > Thomas Schwinge, le Tue 14 Nov 2006 16:15:08 +0100, a ?crit : > > Using `-fstack-protector' with GCC 4.1 made it include assembler code > > using ``%gs:0x14'' even with `-ffreestanding'. However, this isn't the > > correct

Re: %gs:0x14

2006-11-14 Thread Thomas Schwinge
Hello! On Tue, Nov 14, 2006 at 05:38:21PM +0100, I wrote: > On Tue, Nov 14, 2006 at 04:26:26PM +0100, Samuel Thibault wrote: > > Thomas Schwinge, le Tue 14 Nov 2006 16:15:08 +0100, a ?crit : > > > Using `-fstack-protector' with GCC 4.1 made it include assembler code > > > using ``%gs:0x14'' even w

Re: %gs:0x14

2006-11-14 Thread Samuel Thibault
Thomas Schwinge, le Tue 14 Nov 2006 16:15:08 +0100, a écrit : > Using `-fstack-protector' with GCC 4.1 made it include assembler code > using ``%gs:0x14'' even with `-ffreestanding'. However, this isn't the > correct thing to do in kernel > space (with `-ffreestanding'). I think I've now tracked

Re: %gs:0x14

2006-11-14 Thread Thomas Schwinge
[Also sent to Roland and to bug-hurd.] Hello! Using `-fstack-protector' with GCC 4.1 made it include assembler code using ``%gs:0x14'' even with `-ffreestanding'. However, this isn't the correct thing to do on a) GNU/Hurd user space and neither b) in kernel space (with `-ffreestanding'). I thi