mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
Accept and handle absolute symbols with empty name.
llvm-svn: 200911
This commit is contained in:
@@ -96,7 +96,8 @@ public:
|
||||
buildDuplicateNameMap(*shlibAtom);
|
||||
}
|
||||
for (const lld::AbsoluteAtom *absAtom : file.absolute()) {
|
||||
buildDuplicateNameMap(*absAtom);
|
||||
if (!absAtom->name().empty())
|
||||
buildDuplicateNameMap(*absAtom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
19
lld/test/elf/abs-dup.objtxt
Normal file
19
lld/test/elf/abs-dup.objtxt
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests handling an absolute symbol with no name
|
||||
# RUN: lld -flavor gnu -target x86_64 -r %s \
|
||||
# RUN: --output-filetype=yaml | FileCheck %s
|
||||
|
||||
absolute-atoms:
|
||||
- name: abs
|
||||
scope: static
|
||||
value: 0x10
|
||||
- name: ''
|
||||
scope: static
|
||||
value: 0x15
|
||||
|
||||
# CHECK: absolute-atoms:
|
||||
# CHECK: - name: abs
|
||||
# CHECK: scope: static
|
||||
# CHECK: value: 0x0000000000000010
|
||||
# CHECK: - name: ''
|
||||
# CHECK: scope: static
|
||||
# CHECK: value: 0x0000000000000015
|
||||
Reference in New Issue
Block a user