Sky Flyer via llvm-dev
2015-Nov-18 14:09 UTC
[llvm-dev] Adding a custom section to ELF file
Hi all, how can I add my own section to the ELF file to write some target-specific parameters? Is there any sample in the LLVM examples? Cheers, ES -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151118/12099967/attachment.html>
John Leidel (jleidel) via llvm-dev
2015-Nov-18 14:39 UTC
[llvm-dev] Adding a custom section to ELF file
ES, what are you interested in doing with your ELF extensions? Are these extensions to existing, supported section types? EG, adding “.EStext” as a text section. Take a look at ~/llvm/lib/MC/MCParser/ELFAsmParser.cpp. This is where you add the logic to the parsers. If what you’re adding is a relatively standard section, you can copy what is there and change the section parser text. cheers john John D. Leidel On Nov 18, 2015, at 8:09 AM, Sky Flyer via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hi all, > > how can I add my own section to the ELF file to write some target-specific parameters? > Is there any sample in the LLVM examples? > > Cheers, > ES > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Tom Stellard via llvm-dev
2015-Nov-18 14:56 UTC
[llvm-dev] Adding a custom section to ELF file
On Wed, Nov 18, 2015 at 03:09:44PM +0100, Sky Flyer via llvm-dev wrote:> Hi all, > > how can I add my own section to the ELF file to write some target-specific > parameters? > Is there any sample in the LLVM examples? >AMDGPU backend does this. grep the code for 'SwitchSection' and take a look at AMDGPUHSATargetObjectFile.cpp -Tom> Cheers, > ES> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev