[lld] r228837 - [ELF][ARM] Fix veneer symbol names in Release build
Denis Protivensky
dprotivensky at accesssoftek.com
Wed Feb 11 07:02:43 PST 2015
Author: denis-protivensky
Date: Wed Feb 11 09:02:43 2015
New Revision: 228837
URL: http://llvm.org/viewvc/llvm-project?rev=228837&view=rev
Log:
[ELF][ARM] Fix veneer symbol names in Release build
The fix is for r228680.
This makes tests also work.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=228837&r1=228836&r2=228837&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Wed Feb 11 09:02:43 2015
@@ -74,12 +74,8 @@ public:
Alignment alignment() const override { return Alignment(2); }
-#ifndef NDEBUG
StringRef name() const override { return _name; }
std::string _name;
-#else
- StringRef name() const override { return ""; }
-#endif
};
/// \brief Atoms that hold veneer for statically relocated
@@ -275,11 +271,11 @@ public:
auto v = new (_file._alloc) Veneer_ARM_B_BL_StaticAtom(_file, secName);
v->addReferenceELF_ARM(R_ARM_ABS32, 4, da, 0);
-#ifndef NDEBUG
+
v->_name = "__";
v->_name += da->name();
v->_name += "_from_arm";
-#endif
+
_veneerMap[da] = v;
_veneerVector.push_back(v);
return v;
@@ -294,11 +290,11 @@ public:
auto v = new (_file._alloc) Veneer_THM_B_BL_StaticAtom(_file, secName);
v->addReferenceELF_ARM(R_ARM_JUMP24, 4, da, 0);
-#ifndef NDEBUG
+
v->_name = "__";
v->_name += da->name();
v->_name += "_from_thumb";
-#endif
+
_veneerMap[da] = v;
_veneerVector.push_back(v);
return v;
More information about the llvm-commits
mailing list