Page MenuHomePhabricator

[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

Unit TestsFailed

TimeTest
60,110 msx64 debian > AddressSanitizer-x86_64-linux-dynamic.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -shared-libasan -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxDynamicConfig/TestCases/Output/scariness_score_test.cpp.tmp
60,090 msx64 debian > AddressSanitizer-x86_64-linux.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/scariness_score_test.cpp.tmp
60,140 msx64 debian > LLVM.CodeGen/NVPTX::wmma.py
Script: -- : 'RUN: at line 5'; "/usr/bin/python3.9" /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/NVPTX/wmma.py --ptx=60 --gpu-arch=70 > /var/lib/buildkite-agent/builds/llvm-project/build/test/CodeGen/NVPTX/Output/wmma.py.tmp-ptx60-sm_70.ll

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!