Accept and handle absolute symbols with empty name.

llvm-svn: 200911
This commit is contained in:
Simon Atanasyan 2014-02-06 07:35:16 +00:00
parent 1f5d17c57d
commit 0743a72caa
2 changed files with 21 additions and 1 deletions

View File

@ -96,7 +96,8 @@ public:
buildDuplicateNameMap(*shlibAtom);
}
for (const lld::AbsoluteAtom *absAtom : file.absolute()) {
buildDuplicateNameMap(*absAtom);
if (!absAtom->name().empty())
buildDuplicateNameMap(*absAtom);
}
}

View 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