Hi, On 2/6/06, Sandeep Kumar <[EMAIL PROTECTED]> 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. "