public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* What is text.hot section in elf files ?
@ 2006-02-06  7:27 Sandeep Kumar
  2006-02-06  7:48 ` Ravi Ramaseshan
  0 siblings, 1 reply; 2+ messages in thread
From: Sandeep Kumar @ 2006-02-06  7:27 UTC (permalink / raw)
  To: binutils, gcc, gcc-bugs

Hello everyone,
While scrolling down the objdump of the code for /usr/bin/gcc, There
is a section called text.hot section, which is normally not present on
the elf files. What is that? is it something specific to /usr/bin/gcc
only.How can be create such sections in our normal executables ?


--
Regards,
Sandeep





A man with one watch knows what time it is; a man with two watches is
never quite sure.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What is text.hot section in elf files ?
  2006-02-06  7:27 What is text.hot section in elf files ? Sandeep Kumar
@ 2006-02-06  7:48 ` Ravi Ramaseshan
  0 siblings, 0 replies; 2+ messages in thread
From: Ravi Ramaseshan @ 2006-02-06  7:48 UTC (permalink / raw)
  To: Sandeep Kumar; +Cc: binutils, gcc, gcc-bugs

Hi,

On 2/6/06, Sandeep Kumar <sandeepksinha@gmail.com> wrote:
> Hello everyone,
> While scrolling down the objdump of the code for /usr/bin/gcc, There
> is a section called text.hot section, which is normally not present on
> the elf files. What is that? is it something specific to /usr/bin/gcc
> only.How can be create such sections in our normal executables ?

Seems to be something that gcc generates. Read below:

<snip http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Optimize-Options.html>

-freorder-functions
    Reorder basic blocks in the compiled function in order to reduce
number of taken branches and improve code locality. This is
implemented by using special subsections text.hot for most frequently
executed functions and text.unlikely for unlikely executed functions.
Reordering is done by the linker so object file format must support
named sections and linker must place them in a reasonable way.

    Also profile feedback must be available in to make this option
effective. See -fprofile-arcs for details.

    Enabled at levels -O2, -O3, -Os

</snip>

Cheers,
--
Ravi Ramaseshan
http://www.geocities.com/ramaseshan_ravi/

" Reality is only something we believe in strongly. "


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-06  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06  7:27 What is text.hot section in elf files ? Sandeep Kumar
2006-02-06  7:48 ` Ravi Ramaseshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).