[llvm-commits] [lld] r171704 - in /lld/trunk: lib/ReaderWriter/ELF/WriterELF.cpp test/elf/common.test
Michael J. Spencer
bigcheesegs at gmail.com
Sun Jan 6 23:05:52 PST 2013
Author: mspencer
Date: Mon Jan 7 01:05:52 2013
New Revision: 171704
URL: http://llvm.org/viewvc/llvm-project?rev=171704&view=rev
Log:
[ELF] Emit zeroFill as STT_OBJECT in the final executable. ld does this.
Added:
lld/trunk/test/elf/common.test
Modified:
lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp?rev=171704&r1=171703&r2=171704&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp Mon Jan 7 01:05:52 2013
@@ -1069,7 +1069,7 @@
type = ELF::STT_OBJECT;
break;
case DefinedAtom::typeZeroFill:
- type = ELF::STT_COMMON;
+ type = ELF::STT_OBJECT;
symbol->st_value = addr;
break;
default:
Added: lld/trunk/test/elf/common.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/common.test?rev=171704&view=auto
==============================================================================
--- lld/trunk/test/elf/common.test (added)
+++ lld/trunk/test/elf/common.test Mon Jan 7 01:05:52 2013
@@ -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
More information about the llvm-commits
mailing list