[enco] Emit Portable ASM code (#1743)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 4 Oct 2018 10:24:25 +0000 (19:24 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 4 Oct 2018 10:24:25 +0000 (19:24 +0900)
GNU "an" interprtes '@' symbol as a comment symbole for some architecture,
such as ARM.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/AsmCode.cpp

index 221cb34..70d6f30 100644 (file)
@@ -23,7 +23,8 @@ void AsmCode::dump(std::ostream &os) const
 {
   os << ".section .rodata" << std::endl;
   os << ".global " << _varname << std::endl;
-  os << ".type " << _varname << ", @object" << std::endl;
+  // Please refer to https://www.sourceware.org/binutils/docs/as/Type.html#Type for details
+  os << ".type " << _varname << ", STT_OBJECT" << std::endl;
   os << ".align " << 4 << std::endl;
   os << _varname << ":" << std::endl;
   os << ".incbin " << '"' << _filename << '"' << std::endl;