Carter, Jack
2012-Dec-15 03:41 UTC
[LLVMdev] Setting ELF section alignment at the Target level
How does one at the target level set/change the alignment of ELF sections? I need to create a few target specific ELF sections. I seem to be able to create the section and fill it with data that gets written out, but don't see how I can set the alignment without first having an MCAssembler object handy. I am patterning after existing code for .sbss In MipsTargetObjectFile.cpp: ReginfoSection getContext().getELFSection(".MIPS.options", ELF::SHT_MIPS_OPTIONS, ELF::SHF_ALLOC |ELF::SHF_MIPS_NOSTRIP, SectionKind::getMetadata()); ReginfoSection is defined as a MCSection *. Dumping information to the out streamer is simple: OutStreamer.SwitchSection(ReginfoSection); It should be simple. I hope I just missed the obvious. I'd also would like the ability to change the section fields of generic ELF sections at the Target level. Thanks, Jack -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121215/ba79d80e/attachment.html>
Possibly Parallel Threads
- [LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
- [PATCH] Kbuild for klibc and nfsmount: add -fcommon
- [PATCH] Kbuild for klibc and nfsmount: fix multiple definitions
- [klibc:master] mips: use -Ttext-segment when linking shared library
- XRay: Demo on x86_64/Linux almost done; some questions.