[llvm] [XCOFF] make related SD symbols as isFunction (PR #69553)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 29 18:51:44 PDT 2023
================
@@ -1242,10 +1242,8 @@ bool XCOFFSymbolRef::isFunction() const {
const XCOFFCsectAuxRef CsectAuxRef = ExpCsectAuxEnt.get();
- // A function definition should be a label definition.
- // FIXME: This is not necessarily the case when -ffunction-sections is
- // enabled.
- if (!CsectAuxRef.isLabel())
+ // A function definition should not be a common type symbol.
+ if (CsectAuxRef.getSymbolType() == XCOFF::XTY_CM)
return false;
----------------
chenzheng1030 wrote:
I know what you mean. If so, maybe we don't need the change in target-independent llvm-symbolizer part. Because now we only treat the label symbol as the function while the section symbol is not a function. So there will be no two symbols(one is LD and the other is SD) with same addresses. I'll see how to implement this.
https://github.com/llvm/llvm-project/pull/69553
More information about the llvm-commits
mailing list