[LLVMbugs] [Bug 23850] New: inlined symbols remain undefined in object code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 15 13:06:40 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23850

            Bug ID: 23850
           Summary: inlined symbols remain undefined in object code
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: thomas.dubuisson at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When using `-ON` where `N < 2` the generated object code fails to either inline
functions or generate code for said functions:

```
% clang -O0 -c bug.c
% objdump -t bug.o

bug.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 bug.c
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .comment       0000000000000000 .comment
0000000000000000 l    d  .note.GNU-stack        0000000000000000
.note.GNU-stack
0000000000000000 l    d  .eh_frame      0000000000000000 .eh_frame
0000000000000000 g     F .text  000000000000000d g
0000000000000000         *UND*  0000000000000000 f


[tommd at vodka]/tmp% cat bug.c
inline void f()
{}

void g()
{
    f();
}
```

Notice how `f` is marked `inline` then appears as `UND` in the objdump.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150615/a6891c70/attachment.html>


More information about the llvm-bugs mailing list