https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120936

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:349da53f13de274864d01b6ccc466961c472dbe1

commit r16-1971-g349da53f13de274864d01b6ccc466961c472dbe1
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Thu Jul 3 10:13:48 2025 +0800

    x86: Emit label only for __mcount_loc section

    commit ecc81e33123d7ac9c11742161e128858d844b99d
    Author: Andi Kleen <a...@linux.intel.com>
    Date:   Fri Sep 26 04:06:40 2014 +0000

        Add direct support for Linux kernel __fentry__ patching

    emitted a label, 1, for __mcount_loc section:

    1:      call    mcount
            .section __mcount_loc, "a",@progbits
            .quad 1b
            .previous

    If __mcount_loc wasn't used, we got an unused label.  Update
    x86_function_profiler to emit label only when __mcount_loc section
    is used.

    gcc/

            PR target/120936
            * config/i386/i386.cc (x86_print_call_or_nop): Add a label
            argument and use it to print label.
            (x86_function_profiler): Emit label only when __mcount_loc
            section is used.

    gcc/testsuite/

            PR target/120936
            * gcc.target/i386/pr120936-1.c: New test
            * gcc.target/i386/pr120936-2.c: Likewise.
            * gcc.target/i386/pr120936-3.c: Likewise.
            * gcc.target/i386/pr120936-4.c: Likewise.
            * gcc.target/i386/pr120936-5.c: Likewise.
            * gcc.target/i386/pr120936-6.c: Likewise.
            * gcc.target/i386/pr120936-7.c: Likewise.
            * gcc.target/i386/pr120936-8.c: Likewise.
            * gcc.target/i386/pr120936-9.c: Likewise.
            * gcc.target/i386/pr120936-10.c: Likewise.
            * gcc.target/i386/pr120936-11.c: Likewise.
            * gcc.target/i386/pr120936-12.c: Likewise.
            * gcc.target/i386/pr93492-3.c: Updated.
            * gcc.target/i386/pr93492-5.c: Likewise.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

Reply via email to