[all-commits] [llvm/llvm-project] 922f42: [clang][AIX] Fix mcount name and call arguments
Chris Bowler via All-commits
all-commits at lists.llvm.org
Thu Oct 20 13:26:09 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 922f42d531b873db59fce81aefa4dcaae999d5ce
https://github.com/llvm/llvm-project/commit/922f42d531b873db59fce81aefa4dcaae999d5ce
Author: Michael Francis <michaelfrancis at ibm.com>
Date: 2022-10-20 (Thu, 20 Oct 2022)
Changed paths:
M clang/lib/Basic/Targets/OSTargets.h
A clang/test/CodeGen/mcount-aix.c
M llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
Log Message:
-----------
[clang][AIX] Fix mcount name and call arguments
Currently, compiling a program with the `-pg` flag will result in an
undefined symbol error for `.mcount`. This revision fixes the call to
use `__mcount`, which requires a pointer argument to a pointer-sized
object (unique per inserted call) on AIX.
This is only a partial fix. This patch should fix the `-pg` flag's
behaviour on AIX to work with code you are compiling, but it will not
link against standard libraries with `mcount` instrumentation calls. The
next step is to add profiled libraries to the linker search paths in the
Clang driver for the AIX toolchain when linking with `-pg`.
Differential Review: https://reviews.llvm.org/D135384
More information about the All-commits
mailing list