This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: default_no_named_section bad default
- From: Mike Stump <mikestump at comcast dot net>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 May 2013 14:53:26 -0700
- Subject: Re: default_no_named_section bad default
- References: <72050C5D-275C-4457-9D5C-FE4A96F029BE at comcast dot net>
On May 31, 2013, at 11:13 AM, Mike Stump <mikestump@comcast.net> wrote:
> I think really, we either need to have a default of 0 (to crash in a nice way)
The previous patch does not fix it. I think we need to use 0 instead:
Ok?
New idea:
Index: target.def
===================================================================
--- target.def (revision 199270)
+++ target.def (working copy)
@@ -225,7 +225,7 @@ DEFHOOK
(named_section,
"",
void, (const char *name, unsigned int flags, tree decl),
- default_no_named_section)
+ 0)
/* Return preferred text (sub)section for function DECL.
Main purpose of this function is to separate cold, normal and hot
Index: varasm.c
===================================================================
--- varasm.c (revision 199270)
+++ varasm.c (working copy)
@@ -6042,19 +6042,6 @@ have_global_bss_p (void)
return bss_noswitch_section || targetm.have_switchable_bss_sections;
}
-/* Output assembly to switch to section NAME with attribute FLAGS.
- Four variants for common object file formats. */
-
-void
-default_no_named_section (const char *name ATTRIBUTE_UNUSED,
- unsigned int flags ATTRIBUTE_UNUSED,
- tree decl ATTRIBUTE_UNUSED)
-{
- /* Some object formats don't support named sections at all. The
- front-end should already have flagged this as an error. */
- gcc_unreachable ();
-}
-