This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] Add optional ProgramHeader.Content
AbandonedPublic

Authored by namhyung on Jun 30 2022, 12:12 AM.

Details

Summary

For ELF core files, it needs a way to add raw contents from the program
header directly since core files don't have sections.

Diff Detail

Event Timeline

namhyung created this revision.Jun 30 2022, 12:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2022, 12:12 AM
namhyung requested review of this revision.Jun 30 2022, 12:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2022, 12:12 AM

Do you really need this? We already have the ability to provide "filler" sections which are like regular sections except they don't have a corresponding section header. See https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/yaml2obj/ELF/custom-fill.yaml. (If you do actually need the new feature, you need to write tests for it too).

namhyung abandoned this revision.Jun 30 2022, 12:34 PM

Cool. I didn't know I can use that. With SectionHeaderTable.NoHeaders = true, it'll do all I need. Thanks for the info!