[X86_64] Fix the atom that need to be exported.

llvm-svn: 193481
This commit is contained in:
Shankar Easwaran 2013-10-26 19:38:37 +00:00
parent 5afd25dcac
commit b0022c00a3
2 changed files with 3 additions and 2 deletions

View File

@ -379,7 +379,8 @@ public:
return obj->second;
auto oa = new (_file._alloc) ObjectAtom(_file);
oa->addReference(R_X86_64_COPY, 0, a, 0);
// This needs to point to the atom that we just created.
oa->addReference(R_X86_64_COPY, 0, oa, 0);
oa->_name = a->name();
oa->_size = a->size();

View File

@ -19,7 +19,7 @@ RUN: llvm-readobj -relocations -symbols %t | FileCheck %s
CHECK: Relocations [
CHECK-NEXT: Section ({{[0-9]+}}) .rela.dyn {
CHECK-NEXT: 0x{{[1-9A-F][0-9A-F]*}} R_X86_64_COPY x 0x0
CHECK-NEXT: 0x{{[1-9A-F][0-9A-F]*}} R_X86_64_COPY - 0x0
CHECK-NEXT: }
CHECK-NEXT: ]