bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %gs:0x14


From: Neill Miller
Subject: Re: %gs:0x14
Date: Tue, 14 Nov 2006 11:29:32 -0600

On Tue, 14 Nov 2006 11:08:02 -0600
Neill Miller <neillm@thecodefactory.org> 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-*.so

boiler ~ # echo 'void f (void) { volatile char a[8]; a[3]; }' | gcc -S -x c -O2 
-fstack-protector -ffreestanding - -o -; uname -a; /lib/libc-*.so
        .file   ""
        .text
        .p2align 4,,15
.globl f
        .type   f, @function
f:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $24, %esp
        movl    %gs:20, %eax
        movl    %eax, -4(%ebp)
        xorl    %eax, %eax
        movzbl  -9(%ebp), %eax
        movl    -4(%ebp), %eax
        xorl    %gs:20, %eax
        jne     .L5
        leave
        ret
.L5:
        call    __stack_chk_fail
        .size   f, .-f
        .ident  "GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r1)"
        .section        .note.GNU-stack,"",@progbits
Linux boiler.chaos.net 2.6.18 #1 PREEMPT Sat Oct 7 15:31:26 CDT 2006 i686 AMD 
Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.1 (Gentoo 4.1.1-r1).
Compiled on a Linux 2.6.17 system on 2006-10-30.
Available extensions:
        The C stubs add-on version 2.1.2.
        crypt add-on version 2.1 by Michael Glad and others
        Gentoo patchset 1.2
        GNU Libidn by Simon Josefsson
        GNU libio by Per Bothner
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Native POSIX Threads Library by Ulrich Drepper et al
        Support for some architectures added on, not maintained in glibc core.
        BIND-8.2.3-T5B
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

-Neill.
(IRC: __sempai)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]