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

            Bug ID: 36297
           Summary: [ELF] - LLD can produce excessive undefined symbols
                    with specific linker script.
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedb...@nondot.org
          Reporter: gri...@accesssoftek.com
                CC: llvm-bugs@lists.llvm.org

Imagine following script:

SECTIONS { .bar (a+b) : { *(.stub) } };

And assume that there is no .stub section in object.
"a+b" here is address expression.
We add all symbols referenced by script as undefined
early. ".bar" becomes empty section and removed from output.

a and b though present as undefined in symtab and no error
is produced.

bfd produce error:
test.script:4: non constant or forward reference address expression for section
.bar

gold too:
ld: error: undefined symbol 'a' referenced in expression
ld: error: undefined symbol 'a' referenced in expression

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to