[llvm-bugs] [Bug 35744] New: [ELF] - -defsym incorrectly works with reserved symbols.
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 25 01:22:14 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35744
Bug ID: 35744
Summary: [ELF] - -defsym incorrectly works with reserved
symbols.
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: grimar at accesssoftek.com
CC: llvm-bugs at lists.llvm.org
Using code from defsym.s:
.globl foo1
foo1 = 0x123
.global _start
_start:
movl $foo2, %edx
and invocation:
# RUN: ld.lld -o %t %t.o --defsym=foo2=etext
Produces symbols foo2 and etext with value of 0x201005, what is correct,
though when expression is used instead, i.e:
# RUN: ld.lld -o %t %t.o --defsym=foo2=etext+1
then foo2 symbol value becomes wrong:
Symbol {
Name: foo2 (13)
Value: 0x201000
Size: 0
Binding: Global (0x1)
Type: None (0x0)
Other: 0
Section: .text (0x1)
}
Symbol {
Name: etext (18)
Value: 0x201005
Size: 0
Binding: Global (0x1)
Type: None (0x0)
Other: 0
Section: .text (0x1)
}
]
--
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/20171225/3df78283/attachment.html>
More information about the llvm-bugs
mailing list