Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch/riscv64: Update 'mcount.S' to support tracking based on mcount func
In order to figure out the address of parent_loc, we need the frame pointer, but compiler optimization such as `-O2` in gcc removes the `fp` so we won't be able know where to change to hijack the return address to `mcount_return`. This problem only happens in gcc, but not in clang. To avoid the problem, `-fno-omit-frame-pointer` must be used when gcc optimization option is used in riscv64. Tested-by: Seonghee Jin <[email protected]> Tested-by: Paran Lee <[email protected]> Co-authored-by: Honggyu Kim <[email protected]> Signed-off-by: Gichoel Choi <[email protected]>
- Loading branch information