[Bug target/38239] [4.9, 5, 6 regression] The function mcount in gmon.o changes register ecx
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 15 12:19:45 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38239
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <ro@gcc.gnu.org>:
https://gcc.gnu.org/g:8ceb5e4a6020d16a251c14efe5b7d2b3b88dfec9
commit r17-1566-g8ceb5e4a6020d16a251c14efe5b7d2b3b88dfec9
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Mon Jun 15 14:18:59 2026 +0200
libgcc: Fix _mcount on 32-bit Solaris/x86 [PR38239]
Profiling on 32-bit Solaris/x86 has been broken since
Save call-clobbered registers in _mcount on 32-bit Solaris/x86 (PR
target/38239)
https://gcc.gnu.org/pipermail/gcc-patches/2016-March/444175.html
This was only recently noticed when setting up a Solaris/i386 binutils
buildbot.
Since internal_mcount is a regular function on Solaris, the selfpc and
frompcindex args need to pushed to the stack. Besides, the patch fixes
a couple of warnings in gmon.c
Bootstrapped withoug regressions on i386-pc-solaris2.11. With this
patch, the binutils gprof tests PASS.
2026-06-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libgcc:
PR target/38239
* config/sol2/gmon.c [__i386__] (_mcount): Pass selfpc, frompc to
internal_mcount.
(internal_mcount): Remove already_setup.
Remove obsolete comment.
(moncontrol): Disable profil(2) deprecation warning.
More information about the Gcc-bugs
mailing list