Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > function-sections and data-sections option in gcc

Reply
Thread Tools

function-sections and data-sections option in gcc

 
 
Raman
Guest
Posts: n/a
 
      08-02-2007
Hi All,


Could any one tell what exactly these two option do. I have not been
able to understand why we use them because as per the gcc man page,
these options increase the size of libraries and exe


Thanks in advance,
Raman Chalotra

 
Reply With Quote
 
 
 
 
Spoon
Guest
Posts: n/a
 
      08-02-2007
Raman wrote:

> Could any one tell what exactly these two option do. I have not been
> able to understand why we use them because as per the gcc man page,
> these options increase the size of libraries and exe


This group is not appropriate to answer your question.
cf. http://gcc.gnu.org/lists.html

http://gcc.gnu.org/onlinedocs/gcc-4....e-Options.html

-ffunction-sections
-fdata-sections
Place each function or data item into its own section in the output
file if the target supports arbitrary sections. The name of the function
or the name of the data item determines the section's name in the output
file.

Use these options on systems where the linker can perform
optimizations to improve locality of reference in the instruction space.
Most systems using the ELF object format and SPARC processors running
Solaris 2 have linkers with such optimizations. AIX may have these
optimizations in the future.

Only use these options when there are significant benefits from
doing so. When you specify these options, the assembler and linker will
create larger object and executable files and will also be slower. You
will not be able to use gprof on all systems if you specify this option
and you may have problems with debugging if you specify both this option
and -g.
 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      08-02-2007
Raman wrote, On 02/08/07 08:49:
>
> Could any one tell what exactly these two option do. I have not been
> able to understand why we use them because as per the gcc man page,
> these options increase the size of libraries and exe


This is to do with gcc, not the C programming language, so you need to
ask somewhere that deals specifically with gcc such as gnu.gcc.help
--
Flash Gordon
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      08-02-2007
Raman said:

> Hi All,
>
>
> Could any one tell what exactly these two option do.


Yes. The people in gnu.gcc.help could.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-02-2007
Raman <> writes:
> Could any one tell what exactly these two option do. I have not been
> able to understand why we use them because as per the gcc man page,
> these options increase the size of libraries and exe


What two options?

Oh, I see, it's in the subject header. Please put the entire question
in the body of your message.

As it happens, your question really isn't about C. I believe the gcc
documentation answers your question. If not, try gnu.gcc.help.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Raman
Guest
Posts: n/a
 
      08-03-2007
On Aug 2, 2:02 pm, Keith Thompson <ks...@mib.org> wrote:
> Raman<ramanchalo...@gmail.com> writes:
> > Could any one tell what exactly these two option do. I have not been
> > able to understand why we use them because as per the gcc man page,
> > these options increase the size of libraries and exe

>
> What two options?
>
> Oh, I see, it's in the subject header. Please put the entire question
> in the body of your message.
>
> As it happens, your question really isn't about C. I believe the gcc
> documentation answers your question. If not, try gnu.gcc.help.
>
> --
> Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
> "We must do something. This is something. Therefore, we must do this."
> -- Antony Jay and Jonathan Lynn, "Yes Minister"



My apologise for putting option in subject.

Thanks for the responce.

Regards,
Raman Chalotra

 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      08-03-2007
Raman wrote:

> On Aug 2, 2:02 pm, Keith Thompson <ks...@mib.org> wrote:
>> Raman<ramanchalo...@gmail.com> writes:
>> > Could any one tell what exactly these two option do. I have not been
>> > able to understand why we use them because as per the gcc man page,
>> > these options increase the size of libraries and exe

>>
>> What two options?
>>
>> Oh, I see, it's in the subject header. Please put the entire question
>> in the body of your message.
>>
>> As it happens, your question really isn't about C. I believe the gcc
>> documentation answers your question. If not, try gnu.gcc.help.
>>
>> --
>> Keith Thompson (The_Other_Keith) ks...@mib.org
>> <http://www.ghoti.net/~kst>
>> San Diego Supercomputer Center <*>
>> <http://users.sdsc.edu/~kst>
>> "We must do something. This is something. Therefore, we must do this."
>> -- Antony Jay and Jonathan Lynn, "Yes Minister"

>
>
> My apologise for putting option in subject.
>
> Thanks for the responce.


Also please don't quote signature blocks, i.e., text after a '-- NL'
sequence, unless you're discussing it, which is almost always off-topic.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC 3.4.3 and GCC 4.1.2 ashnin C++ 1 07-07-2008 01:10 PM
C_INCLUDE_PATH and gcc -I option Madhur C Programming 3 06-09-2008 02:37 PM
C_INCLUDE_PATH and gcc -I option Madhur C++ 0 06-09-2008 01:54 PM
gcc 2.95 and gcc 3.2 gouqizi.lvcha@gmail.com C++ 8 03-16-2005 02:34 AM
C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1 Kevin P. Fleming C Programming 2 11-06-2003 05:15 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57