tests/backtrace-dwarf.c failure due to -freorder-blocks-and-partition

Mark Wielaard mark@klomp.org
Thu Aug 30 16:16:00 GMT 2018

Hi Martin,

Sorry for dropping this after you provided such an excellent analysis.
So the problem really is that main gets split into main.cold which is
jumped into, so a simple backtrace won't see the "hot" main anymore. If
we would use the debuginfo we might be able to get the "correct"
function name, but that isn't really the purpose of this testcase.

The only problem is that I haven't been able to replicate this in the
testsuite (I do see the partitioning in the standalone testcase you

Is it just run-backtrace-dwarf that is a problem for you?
In that case, does the attached patch help? It puts all of main in its
own section, which should prevent gcc from partitioning it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: backtrace-dwarf-no-partition.patch
Type: text/x-patch
Size: 454 bytes
URL: <http://sourceware.org/pipermail/elfutils-devel/attachments/20180830/43a157f7/attachment.bin>

More information about the Elfutils-devel mailing list