Stack smashing attack in statically compiled binaries

Robert Connolly robert at
Wed Mar 16 18:05:20 PST 2005

On March 16, 2005 04:54 pm, Manolis Tzanidakis wrote:
> Hello all,
> I' ve just finished building an hlfs system based on
> SVN-20050310 and I have a problem.
> When I compile something statically (even a simple main(){}) and run
> it I get the following msg:
> prog_name: stack smashing attack in function __do_global_ctors_aux()
> Aborted
> I tried building with -fno-stack-protector, -no-pie and even restore
> vanilla gcc specs with 'gcc -dumpspecs > $(gcc --print-file specs)'
> but still the same.
> btw. I omitted removing .a libs during building gcc,glibc,binutils.
> These programs I want to build must get statically linked in order to
> work correctly so any help will be really appreciated.
> TIA,

I have no idea what this could be. Be sure to check that you didn't use 
--disable-static on various packages. Though, libc, binutils, and gcc should 
be the only packages that affect this.


More information about the hlfs-dev mailing list