search for: getelfsection

Displaying 10 results from an estimated 10 matches for "getelfsection".

2013 Oct 10
0
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
...tupMachineFunction(MF); > if (OutStreamer.hasRawTextSupport()) { > OutStreamer.EmitRawText("@" + MF.getName() + ":"); > } > > - const MCSectionELF *ConfigSection = getObjFileLowering().getContext() > - .getELFSection(".AMDGPU.config", > + MCContext &Context = getObjFileLowering().getContext(); > + const MCSectionELF *ConfigSection = Context.getELFSection(".AMDGPU.config", > ELF::SHT_PROGBITS, 0, >...
2013 Oct 10
2
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
Hi, This patch adds R600/SI disassembly text to compiled object files, when a code dump is requested, to assist debugging in Mesa clients. Here's an example of the output in a Mesa client with a corresponding patch and RADEON_DUMP_SHADERS set: Shader Disassembly: S_WQM_B64 EXEC, EXEC ; BEFE0A7E S_MOV_B32 M0, SGPR6 ; BEFC0306
2016 Aug 05
2
XRay: Demo on x86_64/Linux almost done; some questions.
...r Kind; unsigned char AlwaysInstrument; unsigned char Padding[14]; // Need 32 bytes }; And the peer code in llvm/trunk/lib/Target/X86/X86MCInstLower.cpp : void X86AsmPrinter::EmitXRayTable() { if (Sleds.empty()) return; if (Subtarget->isTargetELF()) { auto *Section = OutContext.getELFSection( "xray_instr_map", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_GROUP | ELF::SHF_MERGE, 0, CurrentFnSym->getName()); auto PrevSection = OutStreamer->getCurrentSectionOnly(); OutStreamer->SwitchSection(Section); for (const auto &Sled : Sleds...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...work would _really_ make my week. This has been hard to debug, as I don't get any errors, just an empty output .o file... I was thinking it may be because of section issues, so I did add some initial sections, hoping that might help: Str->InitSections(false); MCSection *textsect = Ctx.getELFSection(".text", ELF::SHT_PROGBITS, ELF::SHF_EXECINSTR | ELF::SHF_ALLOC); Str->SwitchSection(textsect); This did not seem to help at all. I'm running out of ideas. Anyone know how to use an MCStreamer object directly to make and object file? Thanks so much for your time, ~Aaron Vos...
2012 Dec 15
0
[LLVMdev] Setting ELF section alignment at the Target level
...ctions. 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...
2013 Jul 16
1
[LLVMdev] Instantiating Target-Specifc ASM Parser
Hello, I am working on backend development and would like to utilize my target's MCAsmParser inside of an MCInst-level class implementation. I noticed that the AsmParser is registered with the target registry however I am having no luck grepping for a "template" of how to instantiate it and have yet to find specific documentation on how it is done. Any ideas or help is greatly
2017 Jun 15
7
[RFC] Profile guided section layout
...deGen/TargetLoweringObjectFileImpl.cpp @@ -97,16 +97,48 @@ void TargetLoweringObjectFileELF::emitModuleMetadata( StringRef Section; GetObjCImageInfo(M, Version, Flags, Section); - if (Section.empty()) - return; + if (!Section.empty()) { + auto &C = getContext(); + auto *S = C.getELFSection(Section, ELF::SHT_PROGBITS, ELF::SHF_ALLOC); + Streamer.SwitchSection(S); + Streamer.EmitLabel(C.getOrCreateSymbol(StringRef("OBJC_IMAGE_INFO"))); + Streamer.EmitIntValue(Version, 4); + Streamer.EmitIntValue(Flags, 4); + Streamer.AddBlankLine(); + } - auto &C = getC...
2016 Aug 04
2
XRay: Demo on x86_64/Linux almost done; some questions.
> On 4 Aug 2016, at 06:27, Serge Rogatch <serge.rogatch at gmail.com> wrote: > > Hi Dean, > > I have a question about the following piece of code in compiler-rt/trunk/lib/xray/xray_trampoline_x86.S : > movq _ZN6__xray19XRayPatchedFunctionE(%rip), %rax > testq %rax, %rax > je .Ltmp0 > > // assume that %r10d has the function id. > movl %r10d,
2016 May 23
0
Using an MCStreamer Directly to produce an object file?
2016 Aug 08
2
XRay: Demo on x86_64/Linux almost done; some questions.
...> > }; > > > > And the peer code in llvm/trunk/lib/Target/X86/X86MCInstLower.cpp : > > > > void X86AsmPrinter::EmitXRayTable() { > > if (Sleds.empty()) > > return; > > if (Subtarget->isTargetELF()) { > > auto *Section = OutContext.getELFSection( > > "xray_instr_map", ELF::SHT_PROGBITS, > > ELF::SHF_ALLOC | ELF::SHF_GROUP | ELF::SHF_MERGE, 0, > > CurrentFnSym->getName()); > > auto PrevSection = OutStreamer->getCurrentSectionOnly(); > > OutStreamer->SwitchSecti...