Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - strip stripping naked: Page 1 of 2 (11 Items)
   
strip stripping naked  
We just discovered to our dismay that strip will reset to the default the stacksize and throw away the stack size 
specify at link time!

Does that mean I need to use the option --strip-symbol to prevent the info about the stack size to be removed?  What 
symbol name should I use?
RE: strip stripping naked  
Maybe just put the stack size on the executable after stripping instead
of at link time?

Eg. stack size 512K:

ldrel -L -S 512K <executable> 

-----Original Message-----
From: Mario Charest [mailto:community-noreply@qnx.com] 
Sent: Wednesday, November 18, 2009 2:32 PM
To: general-toolchain
Subject: strip stripping naked

We just discovered to our dismay that strip will reset to the default
the stacksize and throw away the stack size specify at link time!

Does that mean I need to use the option --strip-symbol to prevent the
info about the stack size to be removed?  What symbol name should I use?



_______________________________________________

General
http://community.qnx.com/sf/go/post42187
RE: strip stripping naked  
Ok nice solution but it`s a real pain because stripping is done when we build the distribution and not at link time.  At
 that stage we don`t know the stack size needed for each executable. Is there any way to read it before stripping?

This is a nasty "bug".

> -----Original Message-----
> From: Max Feil [mailto:community-noreply@qnx.com]
> Sent: Wednesday, November 18, 2009 2:40 PM
> To: general-toolchain
> Subject: RE: strip stripping naked
> 
> Maybe just put the stack size on the executable after stripping instead
> of at link time?
> 
> Eg. stack size 512K:
> 
> ldrel -L -S 512K <executable>
> 
> -----Original Message-----
> From: Mario Charest [mailto:community-noreply@qnx.com]
> Sent: Wednesday, November 18, 2009 2:32 PM
> To: general-toolchain
> Subject: strip stripping naked
> 
> We just discovered to our dismay that strip will reset to the default
> the stacksize and throw away the stack size specify at link time!
> 
> Does that mean I need to use the option --strip-symbol to prevent the
> info about the stack size to be removed?  What symbol name should I
> use?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42187
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42188
> 
Re: strip stripping naked  
Or pass -Wl,-s to have the linker strip?

I normally use strip -g to ONLY strip debug info.

Max Feil wrote:
> Maybe just put the stack size on the executable after stripping instead
> of at link time?
> 
> Eg. stack size 512K:
> 
> ldrel -L -S 512K <executable> 
> 
> -----Original Message-----
> From: Mario Charest [mailto:community-noreply@qnx.com] 
> Sent: Wednesday, November 18, 2009 2:32 PM
> To: general-toolchain
> Subject: strip stripping naked
> 
> We just discovered to our dismay that strip will reset to the default
> the stacksize and throw away the stack size specify at link time!
> 
> Does that mean I need to use the option --strip-symbol to prevent the
> info about the stack size to be removed?  What symbol name should I use?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42187
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42188
> 

-- 
cburgess@qnx.com
RE: strip stripping naked  

> -----Original Message-----
> From: Colin Burgess [mailto:community-noreply@qnx.com]
> Sent: Wednesday, November 18, 2009 2:49 PM
> To: general-toolchain
> Subject: Re: strip stripping naked
> 
> Or pass -Wl,-s to have the linker strip?

We don`t want to strip there ;)

> 
> I normally use strip -g to ONLY strip debug info.

That will probably have to do for now.

I`m sure a bunch of people are currently being bitten by this.  I mean stripping is a "standard" procedure when 
releasing software no?

> 
> Max Feil wrote:
> > Maybe just put the stack size on the executable after stripping
> instead
> > of at link time?
> >
> > Eg. stack size 512K:
> >
> > ldrel -L -S 512K <executable>
> >
> > -----Original Message-----
> > From: Mario Charest [mailto:community-noreply@qnx.com]
> > Sent: Wednesday, November 18, 2009 2:32 PM
> > To: general-toolchain
> > Subject: strip stripping naked
> >
> > We just discovered to our dismay that strip will reset to the default
> > the stacksize and throw away the stack size specify at link time!
> >
> > Does that mean I need to use the option --strip-symbol to prevent the
> > info about the stack size to be removed?  What symbol name should I
> use?
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post42187
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post42188
> >
> 
> --
> cburgess@qnx.com
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42190
> 
RE: strip stripping naked  

> -----Original Message-----
> From: Colin Burgess [mailto:community-noreply@qnx.com]
> Sent: Wednesday, November 18, 2009 2:49 PM
> To: general-toolchain
> Subject: Re: strip stripping naked
> 
> Or pass -Wl,-s to have the linker strip?
> 
> I normally use strip -g to ONLY strip debug info.
> 


I`m told doing strip -g ends  up doing the same thing.

> Max Feil wrote:
> > Maybe just put the stack size on the executable after stripping
> instead
> > of at link time?
> >
> > Eg. stack size 512K:
> >
> > ldrel -L -S 512K <executable>
> >
> > -----Original Message-----
> > From: Mario Charest [mailto:community-noreply@qnx.com]
> > Sent: Wednesday, November 18, 2009 2:32 PM
> > To: general-toolchain
> > Subject: strip stripping naked
> >
> > We just discovered to our dismay that strip will reset to the default
> > the stacksize and throw away the stack size specify at link time!
> >
> > Does that mean I need to use the option --strip-symbol to prevent the
> > info about the stack size to be removed?  What symbol name should I
> use?
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post42187
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post42188
> >
> 
> --
> cburgess@qnx.com
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42190
> 
Re: strip stripping naked  
Mario Charest wrote:
> We just discovered to our dismay that strip will reset to the default the stacksize and throw away the stack size 
specify at link time!

Which version of Momentics are you using? 6.3.2? In 6.4.x I wouldn't 
expect the note to be strip-able as it should end up in an allocated 
section.

> Does that mean I need to use the option --strip-symbol to prevent the info about the stack size to be removed?  What 
symbol name should I use?

There is no symbol for the stack not size.. The stack size is specified 
in an ELF note section marked with QNX and has note type 3.

Regards,

Ryan Mansfield
RE: strip stripping naked  

> -----Original Message-----
> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
> Sent: Wednesday, November 18, 2009 2:53 PM
> To: general-toolchain
> Subject: Re: strip stripping naked
> 
> Mario Charest wrote:
> > We just discovered to our dismay that strip will reset to the default
> the stacksize and throw away the stack size specify at link time!
> 
> Which version of Momentics are you using? 6.3.2? In 6.4.x I wouldn't
> expect the note to be strip-able as it should end up in an allocated
> section.

We tried with strip from both 6.3.2 and 6.4.1 with no difference in behavior (having the default stack size made our 
program crashed)

> 
> > Does that mean I need to use the option --strip-symbol to prevent the
> info about the stack size to be removed?  What symbol name should I
> use?
> 
> There is no symbol for the stack not size.. The stack size is specified
> in an ELF note section marked with QNX and has note type 3.
> 
> Regards,
> 
> Ryan Mansfield
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post42193
> 
Re: strip stripping naked  
Mario Charest wrote:
> 
>> -----Original Message-----
>> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
>> Sent: Wednesday, November 18, 2009 2:53 PM
>> To: general-toolchain
>> Subject: Re: strip stripping naked
>>
>> Mario Charest wrote:
>>> We just discovered to our dismay that strip will reset to the default
>> the stacksize and throw away the stack size specify at link time!
>>
>> Which version of Momentics are you using? 6.3.2? In 6.4.x I wouldn't
>> expect the note to be strip-able as it should end up in an allocated
>> section.
> 
> We tried with strip from both 6.3.2 and 6.4.1 with no difference in behavior (having the default stack size made our 
program crashed)

No, it wouldn't be a difference in how strip functions. The difference 
would be between how the note is created, and manipulated (i.e. linker 
and ldrel).

It works as I expected in 6.4.1 but I reproduced the problem under 
6.3.2. I'll try to come up with a reasonable solution for you for 6.3.2.

Regards,

Ryan Mansfield
Re: strip stripping naked  
> Mario Charest wrote
> 
> No, it wouldn't be a difference in how strip functions. The difference 
> would be between how the note is created, and manipulated (i.e. linker 
> and ldrel).
> 
> It works as I expected in 6.4.1 but I reproduced the problem under 
> 6.3.2. I'll try to come up with a reasonable solution for you for 6.3.2.

Any update?

> 
> Regards,
> 
> Ryan Mansfield