[bpf] Symbol sizes and types in object file
authorYonghong Song <yhs@fb.com>
Wed, 19 Sep 2018 16:04:13 +0000 (16:04 +0000)
committerYonghong Song <yhs@fb.com>
Wed, 19 Sep 2018 16:04:13 +0000 (16:04 +0000)
Clang-compiled object files currently don't include the symbol sizes and
types.  Some tools however need that information.  For example, ctfconvert
uses that information to generate FreeBSD's CTF representation from ELF
files.
With this patch, symbol sizes and types are included in object files.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
Reported-by: Yutaro Hayakawa <yhayakawa3720@gmail.com>
llvm-svn: 342556

llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h

index 171f7f6..af3ad53 100644 (file)
@@ -30,8 +30,8 @@ public:
     WeakRefDirective = "\t.weak\t";
 
     UsesELFSectionDirectiveForBSS = true;
-    HasSingleParameterDotFile = false;
-    HasDotTypeDotSizeDirective = false;
+    HasSingleParameterDotFile = true;
+    HasDotTypeDotSizeDirective = true;
 
     SupportsDebugInformation = true;
     ExceptionsType = ExceptionHandling::DwarfCFI;