AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

GCC stack protector on AIX? Anyone get it working?

  • 1.  GCC stack protector on AIX? Anyone get it working?

    Posted Fri August 28, 2009 03:27 PM

    Originally posted by: SystemAdmin


    Hi all,
    I'm a bit of an AIX newbie. I'm trying to compile a program using gcc's stack protector feature. I installed gcc on server using pware's GCC package and I can compile a sample program like:

    
    #include <stdio.h>   
    
    int main(
    
    int argc,
    
    char **argv) 
    { printf(
    "hello world\n");   
    
    return 0; 
    }
    


    When I turn on stack-protector though, I get:
    g++ -fstack-protector-all main.cpp
    collect2: library libssp_nonshared not found

    I've been hunting on google for a solution to this and it seems like my libc needs to have some stuff built into that mine doesn't. Is there a package out there that includes a libc with the stack protection builtin?
    #AIX-Forum


  • 2.  Re: GCC stack protector on AIX? Anyone get it working?

    Posted Thu September 03, 2009 03:29 PM

    Originally posted by: SystemAdmin


    Hi, I asked on stackoverflow and it looks like it is not available for AIX (yet?)

    How do I get C++ programs to link with gcc’s stack protector feature on AIX?
    #AIX-Forum