Mailinglist Archive: opensuse-packaging (155 mails)

< Previous Next >
[opensuse-packaging] Re: Stack protector isues?
On Tue, 7 Jan 2014, Andreas Schwab wrote:

Richard Biener <rguenther@xxxxxxx> writes:

The symbol is part of as well, given the name libc_nonshared.a
is always linked statically - is a linker script:

/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP ( /lib64/ /usr/lib64/libc_nonshared.a AS_NEEDED (
/lib64/ ) )

I think this is a bug in the linker in the logic for --as-needed in
connection with GROUP. Apparently the linker does not go back and
search again for the undefined symbol __stack_chk_fail
referenced by libc_nonshared.a. If I either remote --as-needed or add
-lc a second time the link succeeds.

That means a workaround is to change the order of and
libc_nonshared.a in this group ...

Note it also means your testcase doesn't need which is
usually unlikely ;)

Note that

int main () {}

rguenther@murzim:~> gcc t.c -fstack-protector-all

works for me on 13.1.


Richard Biener <rguenther@xxxxxxx>
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend"orffer
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups