Allow changing the fentry section per file and per function
When dynamically patching in/out instrumentation it can be useful
to handle different classes of functions differently. Add support
for changing the fentry section name on the command line
or as a function attributes. This allows to mark functions differently,
and handle them differently in dynamic patching.
gcc/:
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (current_fentry_section): Add.
(x86_function_profiler): Handle fentry section.
(ix86_attribute_table): Add fentry section.
* config/i386/i386.opt: Add -mfentry-section.
* doc/extend.texi: Document fentry_section attribute.
* doc/invoke.texi: Document -mfentry-section.
gcc/testsuite/:
2018-11-29 Andi Kleen <ak@linux.intel.com>
* gcc.target/i386/fentryname2.c: New test.
* gcc.target/i386/fentryname3.c: New test.
From-SVN: r266654