[PATCH] [bpf] Symbol sizes and types in object file

Paul Chaignon via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 08:23:30 PDT 2018


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 at orange.com>
Reported-by: Yutaro Hayakawa <yhayakawa3720 at gmail.com>
---
 lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h b/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
index 171f7f607ff..af3ad531525 100644
--- a/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
+++ b/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
@@ -30,8 +30,8 @@ public:
     WeakRefDirective = "\t.weak\t";
 
     UsesELFSectionDirectiveForBSS = true;
-    HasSingleParameterDotFile = false;
-    HasDotTypeDotSizeDirective = false;
+    HasSingleParameterDotFile = true;
+    HasDotTypeDotSizeDirective = true;
 
     SupportsDebugInformation = true;
     ExceptionsType = ExceptionHandling::DwarfCFI;
-- 
2.17.1



More information about the llvm-commits mailing list