[llvm-bugs] [Bug 34012] New: --no-undefined-version fails with version aliases

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 31 17:23:53 PDT 2017


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

            Bug ID: 34012
           Summary: --no-undefined-version fails with version aliases
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: smeenai at fb.com
                CC: compnerd at compnerd.org, grimar at accesssoftek.com,
                    llvm-bugs at lists.llvm.org, rafael.espindola at gmail.com,
                    ruiu at google.com

# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "V1 { global: f; local: *; };" > %t.script
# RUN: ld.lld -shared --version-script %t.script --no-undefined-version %t.o \
# RUN:   -o %t.so

.global _f
_f:
        retq
.symver _f, f at V1

The above fails with

error: version script assignment of 'V1' to symbol 'f' failed: symbol not
defined

We attempt to look up f in the symbol table. However, the symbol table actually
contains f at V1, so the lookup fails.

I'm not 100% sure my version script (marking a symbol as global when it already
has a .symver) is valid, but both bfd and gold are happy with it. Additionally,
bfd actually needs the global: f to export the symbol even with the .symver;
gold and lld export it without.

-- 
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/20170801/835dff78/attachment.html>


More information about the llvm-bugs mailing list