-ffuntion-sections doesn't work

Ramana Radhakrishnan ramana.radhakrishnan@codito.com
Wed Apr 11 13:11:00 GMT 2007


On Wed, 2007-04-11 at 05:57 -0700, zeta wrote:
> I guess the problem is with the linker. Maybe compiler generates an object
> file in which functions are in differents sections but linker reorders
> sections in order to generate the executable file. Is it correct?.

We don't know . You could use --save-temps to look at the intermediate
output created by GCC while creating the executable. 

~r
> 
> 
> Andrew Haley-2 wrote:
> > 
> > zeta writes:
> >  
> >  > I'm using -ffunction-sections flag in order to separate each program's
> >  > function in a different section. When I check the executable file with
> >  > objdump command, functions are placed in  the .text section as a normal
> >  > compilation without -ffunction-sections flag. Is there any requirement
> > to
> >  > use this flag? 
> > 
> > It usually works.  Tell us what you did.  Be precise.
> > 
> > Andrew.
> > 
> > 
> 
-- 
Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
Codito Technologies Pvt. Ltd.



More information about the Gcc-help mailing list