Xiaodan Tang(deleted)
|
gcc -fstack-proctector problem?
|
Xiaodan Tang(deleted)
06/23/2009 9:05 PM
post32389
|
gcc -fstack-proctector problem?
This is on 6.4.1
I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp, but how come the gcc -c successed?
One of my project is using “gcc -c -fstack-protector" to test in configure, leads to mistakely allow that flag...
$ gcc --version
gcc (GCC) 4.3.3
Copyright (C) 2008 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.
$ cat sp.c
int main()
{
}
$ gcc -c -fstack-protector sp.c
$ echo $?
0
$ gcc -o sp -fstack-protector sp.c
/usr/qnx641/host/qnx6/x86/usr/bin/ntox86-ld: cannot find -lssp_nonshared
collect2: ld returned 1 exit status
|
|
|
Colin Burgess(deleted)
|
Re: gcc -fstack-proctector problem?
|
Colin Burgess(deleted)
06/23/2009 9:18 PM
post32391
|
Re: gcc -fstack-proctector problem?
It would seem that the specs is still trying to bring in the libssp_nonshared when linking
Xiaodan Tang wrote:
> This is on 6.4.1
>
> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp, but how come the gcc -c successed?
>
> One of my project is using “gcc -c -fstack-protector" to test in configure, leads to mistakely allow that flag...
>
> $ gcc --version
> gcc (GCC) 4.3.3
> Copyright (C) 2008 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.
>
> $ cat sp.c
> int main()
> {
> }
>
> $ gcc -c -fstack-protector sp.c
> $ echo $?
> 0
> $ gcc -o sp -fstack-protector sp.c
> /usr/qnx641/host/qnx6/x86/usr/bin/ntox86-ld: cannot find -lssp_nonshared
> collect2: ld returned 1 exit status
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post32389
--
cburgess@qnx.com
|
|
|
Ryan Mansfield(deleted)
|
Re: gcc -fstack-proctector problem?
|
Ryan Mansfield(deleted)
06/23/2009 9:20 PM
post32392
|
Re: gcc -fstack-proctector problem?
Xiaodan Tang wrote:
> This is on 6.4.1
>
> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp, but how come the gcc -c successed?
>
> One of my project is using “gcc -c -fstack-protector" to test in configure, leads to mistakely allow that flag...
--disable-libssp only disables the building of the SSP runtime libraries
but it does not disable SSP altogether. The proper conf test should be
to link the executable.
What are you trying to build?
Regards,
Ryan Mansfield
|
|
|
Xiaodan Tang(deleted)
|
RE: gcc -fstack-proctector problem?
|
Xiaodan Tang(deleted)
06/23/2009 9:24 PM
post32394
|
RE: gcc -fstack-proctector problem?
I am trying to build "cups" (pkgsrc/HEAD_641/print/cups), and was
confused about the failure of the linker.
If I took away the "-fstack-protector" in linking, you can see all those
_stack_guard/_stack_available function unresolved.
Looking at the configure, it test weather it should add this flag or
not, but do a "gcc -c -fstack-protector", which successed.
As of now, I am patching the configure to force it off to get going, but
thought this worth to mention.
-xtang
> -----Original Message-----
> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
> Sent: June 23, 2009 9:20 PM
> To: general-toolchain
> Subject: Re: gcc -fstack-proctector problem?
>
> Xiaodan Tang wrote:
> > This is on 6.4.1
> >
> > I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp, but
how
> come the gcc -c successed?
> >
> > One of my project is using "gcc -c -fstack-protector" to test in
> configure, leads to mistakely allow that flag...
>
> --disable-libssp only disables the building of the SSP runtime
libraries
> but it does not disable SSP altogether. The proper conf test should be
> to link the executable.
>
> What are you trying to build?
>
> Regards,
>
> Ryan Mansfield
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post32392
|
|
|
Ryan Mansfield(deleted)
|
Re: gcc -fstack-proctector problem?
|
Ryan Mansfield(deleted)
06/23/2009 9:25 PM
post32395
|
Re: gcc -fstack-proctector problem?
Xiaodan Tang wrote:
> I am trying to build "cups" (pkgsrc/HEAD_641/print/cups), and was
> confused about the failure of the linker.
>
> If I took away the "-fstack-protector" in linking, you can see all those
> _stack_guard/_stack_available function unresolved.
>
> Looking at the configure, it test weather it should add this flag or
> not, but do a "gcc -c -fstack-protector", which successed.
>
> As of now, I am patching the configure to force it off to get going, but
> thought this worth to mention.
Looks like someone has already proposed a fix to cups:
http://lists.busybox.net/pipermail/buildroot/2009-May/027475.html
Regards,
Ryan Mansfield
>> -----Original Message-----
>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>> Sent: June 23, 2009 9:20 PM
>> To: general-toolchain
>> Subject: Re: gcc -fstack-proctector problem?
>>
>> Xiaodan Tang wrote:
>>> This is on 6.4.1
>>>
>>> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp, but
> how
>> come the gcc -c successed?
>>> One of my project is using "gcc -c -fstack-protector" to test in
>> configure, leads to mistakely allow that flag...
>>
>> --disable-libssp only disables the building of the SSP runtime
> libraries
>> but it does not disable SSP altogether. The proper conf test should be
>> to link the executable.
>>
>> What are you trying to build?
>>
>> Regards,
>>
>> Ryan Mansfield
>>
>> _______________________________________________
>> General
>> http://community.qnx.com/sf/go/post32392
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post32394
>
|
|
|
Xiaodan Tang(deleted)
|
RE: gcc -fstack-proctector problem?
|
Xiaodan Tang(deleted)
06/23/2009 9:29 PM
post32396
|
RE: gcc -fstack-proctector problem?
Cool, this is exactly what I am trying to do :)
-xtang
> -----Original Message-----
> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
> Sent: June 23, 2009 9:26 PM
> To: general-toolchain
> Subject: Re: gcc -fstack-proctector problem?
>
> Xiaodan Tang wrote:
> > I am trying to build "cups" (pkgsrc/HEAD_641/print/cups), and was
> > confused about the failure of the linker.
> >
> > If I took away the "-fstack-protector" in linking, you can see all
those
> > _stack_guard/_stack_available function unresolved.
> >
> > Looking at the configure, it test weather it should add this flag or
> > not, but do a "gcc -c -fstack-protector", which successed.
> >
> > As of now, I am patching the configure to force it off to get going,
but
> > thought this worth to mention.
>
> Looks like someone has already proposed a fix to cups:
>
> http://lists.busybox.net/pipermail/buildroot/2009-May/027475.html
>
> Regards,
>
> Ryan Mansfield
> >> -----Original Message-----
> >> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
> >> Sent: June 23, 2009 9:20 PM
> >> To: general-toolchain
> >> Subject: Re: gcc -fstack-proctector problem?
> >>
> >> Xiaodan Tang wrote:
> >>> This is on 6.4.1
> >>>
> >>> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp,
but
> > how
> >> come the gcc -c successed?
> >>> One of my project is using "gcc -c -fstack-protector" to test in
> >> configure, leads to mistakely allow that flag...
> >>
> >> --disable-libssp only disables the building of the SSP runtime
> > libraries
> >> but it does not disable SSP altogether. The proper conf test should
be
> >> to link the executable.
> >>
> >> What are you trying to build?
> >>
> >> Regards,
> >>
> >> Ryan Mansfield
> >>
> >> _______________________________________________
> >> General
> >> http://community.qnx.com/sf/go/post32392
> >
> > _______________________________________________
> > General
> > http://community.qnx.com/sf/go/post32394
> >
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post32395
|
|
|
Colin Burgess(deleted)
|
Re: gcc -fstack-proctector problem?
|
Colin Burgess(deleted)
06/23/2009 9:37 PM
post32398
|
Re: gcc -fstack-proctector problem?
Ryan how is the libssp implemented?
Xiaodan Tang wrote:
> Cool, this is exactly what I am trying to do :)
>
> -xtang
>
>> -----Original Message-----
>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>> Sent: June 23, 2009 9:26 PM
>> To: general-toolchain
>> Subject: Re: gcc -fstack-proctector problem?
>>
>> Xiaodan Tang wrote:
>>> I am trying to build "cups" (pkgsrc/HEAD_641/print/cups), and was
>>> confused about the failure of the linker.
>>>
>>> If I took away the "-fstack-protector" in linking, you can see all
> those
>>> _stack_guard/_stack_available function unresolved.
>>>
>>> Looking at the configure, it test weather it should add this flag or
>>> not, but do a "gcc -c -fstack-protector", which successed.
>>>
>>> As of now, I am patching the configure to force it off to get going,
> but
>>> thought this worth to mention.
>> Looks like someone has already proposed a fix to cups:
>>
>> http://lists.busybox.net/pipermail/buildroot/2009-May/027475.html
>>
>> Regards,
>>
>> Ryan Mansfield
>>>> -----Original Message-----
>>>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>>>> Sent: June 23, 2009 9:20 PM
>>>> To: general-toolchain
>>>> Subject: Re: gcc -fstack-proctector problem?
>>>>
>>>> Xiaodan Tang wrote:
>>>>> This is on 6.4.1
>>>>>
>>>>> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp,
> but
>>> how
>>>> come the gcc -c successed?
>>>>> One of my project is using "gcc -c -fstack-protector" to test in
>>>> configure, leads to mistakely allow that flag...
>>>>
>>>> --disable-libssp only disables the building of the SSP runtime
>>> libraries
>>>> but it does not disable SSP altogether. The proper conf test should
> be
>>>> to link the executable.
>>>>
>>>> What are you trying to build?
>>>>
>>>> Regards,
>>>>
>>>> Ryan Mansfield
>>>>
>>>> _______________________________________________
>>>> General
>>>> http://community.qnx.com/sf/go/post32392
>>> _______________________________________________
>>> General
>>> http://community.qnx.com/sf/go/post32394
>>>
>> _______________________________________________
>> General
>> http://community.qnx.com/sf/go/post32395
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post32396
>
--
cburgess@qnx.com
|
|
|
Ryan Mansfield(deleted)
|
Re: gcc -fstack-proctector problem?
|
Ryan Mansfield(deleted)
06/23/2009 9:55 PM
post32399
|
Re: gcc -fstack-proctector problem?
Colin Burgess wrote:
> Ryan how is the libssp implemented?
It sets random guard values at end of the stack frame, and then checks
to make sure they haven't been clobbered. The Linux implementations uses
routines provided by glibc (__stack_chk_guard/__pointer_chk_guard)
Regards,
Ryan Mansfield
> Xiaodan Tang wrote:
>> Cool, this is exactly what I am trying to do :)
>>
>> -xtang
>>
>>> -----Original Message-----
>>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>>> Sent: June 23, 2009 9:26 PM
>>> To: general-toolchain
>>> Subject: Re: gcc -fstack-proctector problem?
>>>
>>> Xiaodan Tang wrote:
>>>> I am trying to build "cups" (pkgsrc/HEAD_641/print/cups), and was
>>>> confused about the failure of the linker.
>>>>
>>>> If I took away the "-fstack-protector" in linking, you can see all
>> those
>>>> _stack_guard/_stack_available function unresolved.
>>>>
>>>> Looking at the configure, it test weather it should add this flag or
>>>> not, but do a "gcc -c -fstack-protector", which successed.
>>>>
>>>> As of now, I am patching the configure to force it off to get going,
>> but
>>>> thought this worth to mention.
>>> Looks like someone has already proposed a fix to cups:
>>>
>>> http://lists.busybox.net/pipermail/buildroot/2009-May/027475.html
>>>
>>> Regards,
>>>
>>> Ryan Mansfield
>>>>> -----Original Message-----
>>>>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>>>>> Sent: June 23, 2009 9:20 PM
>>>>> To: general-toolchain
>>>>> Subject: Re: gcc -fstack-proctector problem?
>>>>>
>>>>> Xiaodan Tang wrote:
>>>>>> This is on 6.4.1
>>>>>>
>>>>>> I can see i386-pc-nto-qnx6.4.0 is compiled with -disable-libssp,
>> but
>>>> how
>>>>> come the gcc -c successed?
>>>>>> One of my project is using "gcc -c -fstack-protector" to test in
>>>>> configure, leads to mistakely allow that flag...
>>>>>
>>>>> --disable-libssp only disables the building of the SSP runtime
>>>> libraries
>>>>> but it does not disable SSP altogether. The proper conf test should
>> be
>>>>> to link the executable.
>>>>>
>>>>> What are you trying to build?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Ryan Mansfield
>>>>>
>>>>> _______________________________________________
>>>>> General
>>>>> http://community.qnx.com/sf/go/post32392
>>>> _______________________________________________
>>>> General
>>>> http://community.qnx.com/sf/go/post32394
>>>>
>>> _______________________________________________
>>> General
>>> http://community.qnx.com/sf/go/post32395
>>
>> _______________________________________________
>> General
>> http://community.qnx.com/sf/go/post32396
>>
>
|
|
|
|