===================================================================
@@ -6191,6 +6191,8 @@
if (!(flags & SECTION_DEBUG))
*f++ = 'a';
+ if (flags & SECTION_EXCLUDE)
+ *f++ = 'e';
if (flags & SECTION_WRITE)
*f++ = 'w';
if (flags & SECTION_CODE)
===================================================================
@@ -443,6 +443,7 @@
#define SECTION_COMMON 0x800000 /* contains common data */
#define SECTION_RELRO 0x1000000 /* data is readonly after relocation
processing */
#define SECTION_MACH_DEP 0x2000000 /* subsequent bits reserved for target */
+#define SECTION_EXCLUDE 0x4000000 /* discarded by the linker */
===================================================================
@@ -4428,7 +4428,7 @@
&& cgraph_node (current_function_decl) != NULL
&& (cgraph_node (current_function_decl))->callees != NULL)
{
- flags = SECTION_DEBUG;
+ flags = SECTION_DEBUG | SECTION_EXCLUDE;
asprintf (&profile_fnname, ".gnu.callgraph.text.%s", fnname);
switch_to_section (get_section (profile_fnname, flags, NULL));
fprintf (asm_out_file, "\t.string \"Function %s\"\n", fnname);