[PATCH] D13883: [ELF2] Correctly set bits when -z now is specified
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 22:00:52 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250799: [ELF2] Correctly set bits when -z now is specified. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D13883?vs=37821&id=37826#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13883
Files:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/test/elf2/dt_flags.s
Index: lld/trunk/ELF/OutputSections.cpp
===================================================================
--- lld/trunk/ELF/OutputSections.cpp
+++ lld/trunk/ELF/OutputSections.cpp
@@ -294,7 +294,7 @@
++NumEntries; // DT_INIT
if (FiniSym)
++NumEntries; // DT_FINI
- if (Config->Bsymbolic)
+ if (Config->Bsymbolic || Config->ZNow)
++NumEntries; // DT_FLAGS
if (Config->ZNodelete || Config->ZNow)
++NumEntries; // DT_FLAGS_1
@@ -371,6 +371,8 @@
uint32_t Flags = 0;
if (Config->Bsymbolic)
Flags |= DF_SYMBOLIC;
+ if (Config->ZNow)
+ Flags |= DF_BIND_NOW;
if (Flags)
WriteVal(DT_FLAGS, Flags);
Flags = 0;
Index: lld/trunk/test/elf2/dt_flags.s
===================================================================
--- lld/trunk/test/elf2/dt_flags.s
+++ lld/trunk/test/elf2/dt_flags.s
@@ -8,12 +8,12 @@
# RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s
# FLAGS: DynamicSection [
-# FLAGS: 0x000000000000001E FLAGS SYMBOLIC
+# FLAGS: 0x000000000000001E FLAGS SYMBOLIC BIND_NOW
# FLAGS: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE
# FLAGS: ]
# CHECK: DynamicSection [
-# CHECK-NOT: 0x000000000000001E FLAGS SYMBOLIC
+# CHECK-NOT: 0x000000000000001E FLAGS SYMBOLIC BIND_NOW
# CHECK-NOT: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE
# CHECK: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13883.37826.patch
Type: text/x-patch
Size: 1307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151020/fee92644/attachment.bin>
More information about the llvm-commits
mailing list