[PATCH] D69709: [yaml2obj][WIP] - Add a way to describe the custom data that is not part of an output section.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 06:35:36 PDT 2019


jhenderson added a comment.

My initial thought on this was that these padding blocks should be kept separate to sections, so that they don't get confused with sections. However, I realise that unless you started allowing for them (and sections) to be placed at arbitrary offsets, which I expect would be complicated to implement, it would be difficult to place them at the right locations. As such, I think this is the right approach.

I assume the optional Name is to allow them to be referenced by program headers? I wonder if we need to have some way of controlling their offset. For sections, you can use tricks involving AddressAlign and Address, but these don't really make sense for padding blocks. I also don't think an Offset field is a good idea unless we only allow them to be increasing (i.e. if a section appears later in the list with an Offset lower than the end of the previous section, it's an error).

I do think the overall goal of this patch is good. I've had to write a few tests in the past using custom python to write blobs at appropriate places/use llvm-objcopy to remove sections etc, to create the exact object I want. Having this native to yaml2obj would make this easier.


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

https://reviews.llvm.org/D69709





More information about the llvm-commits mailing list