We have

#define HOT_TEXT_SECTION_NAME ".text.hot"
#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"

There is a little potential for confusion, for example suppose we have a very
hot function with the unlikely name of "unlikely" or a very cold function
called "hot". With -ffunction-sections, we got

[EMAIL PROTECTED] hot]$ cat x.c
void hot () { }

void unlikely () { }
[EMAIL PROTECTED] hot]$ gcc -c x.c -ffunction-sections
[EMAIL PROTECTED] hot]$ readelf --wide -S x.o | grep text
  [ 1] .text             PROGBITS        0000000000000000 000040 000000 00  AX 
0   0  4
  [ 4] .text.hot         PROGBITS        0000000000000000 000040 000006 00  AX 
0   0  1
  [ 5] .text.unlikely    PROGBITS        0000000000000000 000046 000006 00  AX 
0   0  1

Should we use a slightly different standard naming scheme so as to distinguish
the special names such as huge, hot and unlikely from the function naming
cheme?


-- 
           Summary: Potential problems with HOT_TEXT_SECTION_NAME
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24201

Reply via email to