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

            Bug ID: 46834
           Summary: Self assignment of code symbols fails in linker
                    scripts
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Created attachment 23769
  --> https://bugs.llvm.org/attachment.cgi?id=23769&action=edit
Tar file that includes a testcase (assembly file and linker script).

We have linker scripts which have expressions like below.

_init = DEFINED(user_init) ? user_init : _init;

which is like a self assignment. Such linker scripts work ok with GNU ld with
_init retaining its value. In lld, it gets zeroed out. I am attaching a simple
assembly file and a linker script which show this problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to