Bk6.6Ch6.9 glibc `__stack_chk_guard' work around.

Chris Staub chris at beaker67.com
Wed Mar 31 13:22:23 PDT 2010

On 03/31/2010 04:06 PM, Szabolcs Gyalókay wrote:
> Hi All,
> OK, then libssp is not supposed to be linked, then why isn't somebody
> asking the obvious question?
> In the original post Pete wrote:
>     It seems that libssp is suppose to be pulled in by
>     the gcc option '-fstack-protector' so that '-lssp'
>     shouldn't be necessary on the link line.
> So libssp is included because of '-fstack-protector'. I assume
> '-fstack-protector' is also not supposed to be there. Then why is it here:
> gcc res_hconf.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline
> -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes
> -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector
> I can only say for sure: I'm pasting instructions from the book, and I
> did not put it there.

I also see -fstack-protector on my Glibc build, but it doesn't try to 
pull in libssp. Perhaps that isn't the real problem.
> I think you have to start entertaining the possibility that something is
> wrong with the book.

Not likely when many other people have built it and have not had the 
same problem. The only other possibility I can think of is a possible 
problem with some certain hosts, but that should no longer be an issue 
once inside chroot.

> As an addition, the output of glibc's configure:
> checking for -fno-toplevel-reorder -fno-section-anchors... yes
> checking for -fstack-protector... yes
> checking for -fgnu89-inline... yes

Yeah, I see that too, and again, my Glibc build does not attempt to link 
to libssp.

More information about the lfs-support mailing list