In current llvm,
cat > test.c void foo() {}; llc will generate assembly code as (assembly patch)
.globl foo .globl .foo .csect foo[DS] foo: .long .foo .long TOC[TC0] .long 0
and symbol table as (xcoff object file) [4] m 0x00000004 .data 1 unamex foo [5] a4 0x0000000c 0 0 SD DS 0 0 [6] m 0x00000004 .data 1 extern foo [7] a4 0x00000004 0 0 LD DS 0 0 After first patch, the assembly will be as ``` .globl foo[DS] # -- Begin function foo .globl .foo .align 2 .csect foo[DS] .long .foo .long TOC[TC0] .long 0
and symbol table will as [6] m 0x00000004 .data 1 extern foo [7] a4 0x00000004 0 0 DS DS 0 0 Change the code for the assembly path and xcoff objectfile patch for llc.
FuncSym->getName() works means something is wrong here.
I assume FuncSym here is "foo", however FuncSym is supposed to be a "foo[DS]" name.
It's werid for us to have a symbol named "foo" here since we don't actually need that anywhere now after this patch.