[ELF] Emit zeroFill as STT_OBJECT in the final executable. ld does this.

llvm-svn: 171704
This commit is contained in:
Michael J. Spencer 2013-01-07 07:05:52 +00:00
parent cdb892488e
commit 28c6594c71
2 changed files with 5 additions and 1 deletions

View File

@ -1069,7 +1069,7 @@ public:
type = ELF::STT_OBJECT;
break;
case DefinedAtom::typeZeroFill:
type = ELF::STT_COMMON;
type = ELF::STT_OBJECT;
symbol->st_value = addr;
break;
default:

4
lld/test/elf/common.test Normal file
View File

@ -0,0 +1,4 @@
RUN: lld -flavor ld -target x86_64-linux -o %t %p/Inputs/relocs.x86-64 \
RUN: && llvm-readobj %t | FileCheck %s
CHECK: i DATA