On Mon, Sep 17, 2018 at 3:46 PM Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
>
> On Mon, Sep 17, 2018 at 11:29:13PM +0200, Paul Chaignon wrote:
> > I am sending here as an RFC instead of LLVM's mailing list as I'm not sure
> > this is the intended behavior, and the "fix" may therefore not be needed.
> >
> > 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, that information is included in object files.
> >
> > Signed-off-by: Paul Chaignon <paul.chaig...@orange.com>
> > Reported-by: Yutaro Hayakawa <yhayakawa3...@gmail.com>
> > ---
> > Index: lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
> > ===================================================================
> > --- lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h        (revision 341679)
> > +++ lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h        (working copy)
> > @@ -30,8 +30,8 @@
> >      WeakRefDirective = "\t.weak\t";
> >
> >      UsesELFSectionDirectiveForBSS = true;
> > -    HasSingleParameterDotFile = false;
> > -    HasDotTypeDotSizeDirective = false;
> > +    HasSingleParameterDotFile = true;
> > +    HasDotTypeDotSizeDirective = true;
> >
> >      SupportsDebugInformation = true;
> >      ExceptionsType = ExceptionHandling::DwarfCFI;
>
> make sense to me, but I wonder why pahole's dwarf->btf converter
> doesn't have this issue.
> Could you describe what exactly are you trying to do with llvm generated elf 
> file?

Currently, BTF does not deal with symbols, so that is why it is okay.
llvm-objdump does not need symbol size either. It only needs symbol offset.
that is why we did not have issues so far.

In my future proposed func support in BTF, I also need offset only.

In your use case, the size is merely to satisfy conversion to CTF or there
are some other needs? What did you do with CTF?

>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1480): https://lists.iovisor.org/g/iovisor-dev/message/1480
Mute This Topic: https://lists.iovisor.org/mt/25729284/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to