------- Comment #2 from roger at eyesopen dot com  2006-05-13 18:59 -------
This is the correct documented behaviour.  See the section entitled 
"USE_SELECT_SECTION_FOR_FUNCTIONS" in doc/tm.texi, which reads:

> @defmac USE_SELECT_SECTION_FOR_FUNCTIONS
> Define this macro if you wish TARGET_ASM_SELECT_SECTION to be called
> for @code{FUNCTION_DECL}s as well as for variables and constants.
>
> In the case of a @code{FUNCTION_DECL}, @var{reloc} will be zero if the
> function has been determined to be likely to be called, and nonzero if
> it is unlikely to be called.
> @end defmac

This is also cross referenced from the TARGET_ASM_SELECT_SECTION target
hook documentation, as the semantics for selecting function sections.
The only backend(s) that define USE_SELECT_SECTION_FOR_FUNCTIONS, darwin,
appears to implement the semantics as described above.

The two calls in function_section and current_function_section are guarded
by #ifdef USE_SELECT_SECTION_FOR_FUNCTIONS.  Admittedly, this could have
been implemented by a second target hook, and/or the variable names in the
varasm functions could be less confusing, but this isn't a bug, and certainly
not P1.


-- 

roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to