fix multiple define problem with ppc64le
building anything, e.g. envoy, that also builds gperftools, results in the error that StacktracePowerPCDummyFunction was previously defined. Rename this one, as its only a dummy function and is only used in this one place. Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
This commit is contained in:
parent
9acad869d2
commit
5a85c65255
1 changed files with 3 additions and 3 deletions
|
@ -150,8 +150,8 @@ static void **NextStackFrame(void **old_sp, const void *uc) {
|
|||
}
|
||||
|
||||
// This ensures that absl::GetStackTrace sets up the Link Register properly.
|
||||
void StacktracePowerPCDummyFunction() __attribute__((noinline));
|
||||
void StacktracePowerPCDummyFunction() { __asm__ volatile(""); }
|
||||
void AbslStacktracePowerPCDummyFunction() __attribute__((noinline));
|
||||
void AbslStacktracePowerPCDummyFunction() { __asm__ volatile(""); }
|
||||
|
||||
template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT>
|
||||
ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack.
|
||||
|
@ -176,7 +176,7 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
|
|||
// want here. While the compiler will always(?) set up LR for
|
||||
// subroutine calls, it may not for leaf functions (such as this one).
|
||||
// This routine forces the compiler (at least gcc) to push it anyway.
|
||||
StacktracePowerPCDummyFunction();
|
||||
AbslStacktracePowerPCDummyFunction();
|
||||
|
||||
// The LR save area is used by the callee, so the top entry is bogus.
|
||||
skip_count++;
|
||||
|
|
Loading…
Reference in a new issue