[llvm] r342556 - [bpf] Symbol sizes and types in object file

Yonghong Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 09:10:58 PDT 2018


> Test?

I have tested locally with llvm-objdump to observe the correct
func type and size. I will ask Paul to write a small test
at llvm/test/CodeGen/BPF directory for this.

> 
> On Wed, Sep 19, 2018 at 7:04 PM, Yonghong Song via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: yhs
>> Date: Wed Sep 19 09:04:13 2018
>> New Revision: 342556
>>
>> URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D342556-26view-3Drev&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=Bh6KtrGPcBsG5vwn9lcL-B6haVh27AdrqhjiGpV3nZk&s=kveAY9Mt5OqgxjfbuYOm7tb-b4RpbYJEKQF66tp8S4k&e=
>> Log:
>> [bpf] Symbol sizes and types in object file
>>
>> 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>
>>
>> Modified:
>>      llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
>>
>> Modified: llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
>> URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_BPF_MCTargetDesc_BPFMCAsmInfo.h-3Frev-3D342556-26r1-3D342555-26r2-3D342556-26view-3Ddiff&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=Bh6KtrGPcBsG5vwn9lcL-B6haVh27AdrqhjiGpV3nZk&s=T_co4LLgChyghFjOQ1ePpUn8lfdnCZlcCSqq4KCedwU&e=
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h (original)
>> +++ llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h Wed Sep 19 09:04:13 2018
>> @@ -30,8 +30,8 @@ public:
>>       WeakRefDirective = "\t.weak\t";
>>
>>       UsesELFSectionDirectiveForBSS = true;
>> -    HasSingleParameterDotFile = false;
>> -    HasDotTypeDotSizeDirective = false;
>> +    HasSingleParameterDotFile = true;
>> +    HasDotTypeDotSizeDirective = true;
>>
>>       SupportsDebugInformation = true;
>>       ExceptionsType = ExceptionHandling::DwarfCFI;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=Bh6KtrGPcBsG5vwn9lcL-B6haVh27AdrqhjiGpV3nZk&s=QKTZ5HZtwGNuFjDLtyca9IOzhMkhEdl6OgQM9goOLyk&e=


More information about the llvm-commits mailing list