This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linking after -freorder-blocks-and-partition was used


Hello,

I'm having a hard time getting -freorder-blocks-and-partition to work as
expected.

This optimization flag, used with __builtin_expect() to provide branch
prediction hints, produces an object file that groups uncommon code
blocks in a separate section called ".text.unlikely". However, when I
further link the object file with other object files I get an executable
that is missing the ".text.unlikely" section. 

I am first running with -fprofile-generate, then running the executable,
and then recompiling with -fprofile-use. I see the ".text.unlikely"
section in an intermediate object file, but not in the final executable.

Is this a bug ? I tested with gcc4.1.1/ld2.17.

Thanks for any help.
Kristis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]