plotfi added a comment.

In D60974#1485552 <https://reviews.llvm.org/D60974#1485552>, @jakehehrlich 
wrote:

> Well I think it should be a seperate tool but because the code inside 
> llvm-elfabi isn't a library yet (though it is written to be used like one) we 
> can do that by adding a symlink and changing the behavior of the underlying 
> binary to present as a different tool. Many different tools around llvm do 
> this for similar reasons.


So, I think we could do something like:

  --- !ifo-elf-v1
  Arch: X86_64
  Endian: little
  Sections:
    - Name:            .text
      Type:            SHT_PROGBITS
      Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    - Name:            .data
      Type:            SHT_PROGBITS
      Flags:           [ SHF_WRITE, SHF_ALLOC ]
  Symbols:
    - Name:            _dataA
      Type:            Object
      Section:         .data
      Alignment: 32
    - Name:            __ZN3qux3barEii
      Type:            Function
      Section:         .text
      Weak: true
  ...

Notice the "ifo" and not the "ifso"; I think that could be a good way to denote 
that this is the unmerged format.

I could also drop the section parts:

  --- !ifo-elf-v1
  Arch: X86_64
  Endian: little
  Symbols:
    - Name:            _dataA
      Type:            Object
      Alignment: 32
    - Name:            __ZN3qux3barEii
      Type:            Function
      Weak: true
  ...

as soon as we discuss the section flags.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60974/new/

https://reviews.llvm.org/D60974



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to