Displaying 20 results from an estimated 31 matches for "mcsectionelf".
2012 Mar 15
3
[LLVMdev] How to set constant pool section?
Hi,
Thanks for pointing direction. As far, as I understand by reversing,
logic, that I want to overwrite is digged into:
lib/MC/MCSectionELF.cpp
MCSectionELF::PrintSwitchToSection
if (ShouldOmitSectionDirective(SectionName, MAI)) {
OS << '\t' << getSectionName() << '\n';
return;
}
// otherwise print ".section" directive and then section name
So I need to overwrite ShouldOmitSec...
2012 Mar 15
0
[LLVMdev] How to set constant pool section?
On Thu, Mar 15, 2012 at 11:00:54AM +0400, Konstantin Vladimirov wrote:
> Hi,
>
> Thanks for pointing direction. As far, as I understand by reversing,
> logic, that I want to overwrite is digged into:
>
> lib/MC/MCSectionELF.cpp
>
> MCSectionELF::PrintSwitchToSection
>
> if (ShouldOmitSectionDirective(SectionName, MAI)) {
> OS << '\t' << getSectionName() << '\n';
> return;
> }
>
> // otherwise print ".section" directive and then secti...
2011 Nov 17
1
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
I have a case where I the expression (MCSymbolRefExpr) is the offset from the beginning of the section.
The need is to combine that offset to the virtual address of the section it belongs, in this case .text, but it could be any section.
I can get a MCSectionELF class object from MCSymbol that I get from MCSymbolRefExpr:
int Kind = Value->getKind();
if (Kind == MCExpr::SymbolRef) {
const MCSymbol &Sym = SRE->getSymbol();
const MCSectionELF = dyn_cast_or_null<MCSectionELF>(Sym.getSection());
}
But can't see how to get the...
2013 Apr 19
3
[LLVMdev] funny llvm bug
This is a feature (or bug) of MCSectionELF::PrintSwitchToSection. For
ELF target this function tries to escape string if it founds
'suspicious' character, see implementation in MCSectionELF.cpp:
StringRef name = getSectionName();
if (name.find_first_not_of("0123456789_."
"abcdefghijkl...
2012 Mar 14
2
[LLVMdev] How to set constant pool section?
Hi,
In the document: http://llvm.org/docs/WritingAnLLVMBackend.html
described example like:
SparcTargetAsmInfo::SparcTargetAsmInfo(const SparcTargetMachine &TM) {
Data16bitsDirective = "\t.half\t";
Data32bitsDirective = "\t.word\t";
Data64bitsDirective = 0; // .xword is only supported by V9.
ZeroDirective = "\t.skip\t";
CommentString = "!";
2012 Mar 14
0
[LLVMdev] How to set constant pool section?
Hello
> I really need in my backend value for this section, distinct from
> default. Where can I set it?
It was renamed to ReadOnlySection. You might want to check the logic
inside CodeGen/TargetLoweringObjectFileImp.cpp (in particular -
TargetLoweringObjectFile::SelectionSectionForGlobal) to see how it's
used.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and
2013 Apr 19
0
[LLVMdev] funny llvm bug
On Fri, Apr 19, 2013 at 04:38:20PM +0700, Serge Pavlov wrote:
> This is a feature (or bug) of MCSectionELF::PrintSwitchToSection. For
> ELF target this function tries to escape string if it founds
> 'suspicious' character, see implementation in MCSectionELF.cpp:
>
> StringRef name = getSectionName();
> if (name.find_first_not_of("0123456789_."
>...
2010 Jun 16
0
[LLVMdev] [PATCH] ARM MC relocations
Is there a way to handle this entirely in the ARM AsmPrinter bits? Adding pieces to the generic MC stuff feels a bit like overkill at first impression.
On a minor note:
You probably want dyn_cast<> instead of cast<> so you can do something like:
if (const MCSectionELF* SectionELF = dyn_cast<MCSectionELF>(Section)) {
// ...
}
-Jim
On Jun 16, 2010, at 3:44 PM, Evan Cheng wrote:
> Sorry, I have been very behind on patch reviews. Bob and Jim, do you have any opinions about this?
>
> Evan
>
> On Jun 2, 2010, at 5:18 AM, Renato Golin wrote:...
2010 Jun 16
2
[LLVMdev] [PATCH] ARM MC relocations
Sorry, I have been very behind on patch reviews. Bob and Jim, do you have any opinions about this?
Evan
On Jun 2, 2010, at 5:18 AM, Renato Golin wrote:
> Hi,
>
> Is there any interest in this patch? Is there any better way of doing this (that will be accepted mainstream)?
>
> I noticed my cast check was wrong (LLVM cast asserts, rather than return a null pointer). Also,
2010 Jul 27
3
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
...arget/X86/X86AsmBackend.cpp
>> @@ -14,6 +14,7 @@
>> #include "llvm/MC/MCAssembler.h"
>> #include "llvm/MC/MCExpr.h"
>> #include "llvm/MC/MCObjectWriter.h"
>> +#include "llvm/MC/MCSectionCOFF.h"
>> #include "llvm/MC/MCSectionELF.h"
>> #include "llvm/MC/MCSectionMachO.h"
>> #include "llvm/MC/MachObjectWriter.h"
>> @@ -212,6 +213,24 @@ public:
>> : ELFX86AsmBackend(T) {}
>> };
>>
>> +class WindowsX86AsmBackend : public X86AsmBackend {
>> +public...
2010 Jun 17
1
[LLVMdev] [PATCH] ARM MC relocations
...with clang to IR, llc to
asm, gcc to object and armlink to executable. Most of the examples I
tested worked fine, but the missing relocation information made it
difficult to interoperate.
> You probably want dyn_cast<> instead of cast<> so you can do something like:
> if (const MCSectionELF* SectionELF = dyn_cast<MCSectionELF>(Section)) {
> // ...
> }
Precisely. I didn't want to use c++ dynamic_cast directly, but I only
found out about dyn_cast after I sent the patch. Apologies.
cheers,
--renato
2013 Apr 19
3
[LLVMdev] funny llvm bug
I'm going to file this bug but it's kind of a blocker for me so maybe
someone has time
to look at it. Should be nearly trivial to fix.
It's a bug in the way the "section" attribute of functions is processed.
Consider the following code:
void x(int i) __attribute((section(".mySection,\"aw\", at progbits#")));
void x(int i) {
}
If you compile this
2013 Apr 19
0
[LLVMdev] funny llvm bug
On Thu, Apr 18, 2013 at 06:57:29PM -0700, reed kotler wrote:
> I'm going to file this bug but it's kind of a blocker for me so
> maybe someone has time
> to look at it. Should be nearly trivial to fix.
I don't think this is a bug, but a misfeature in GCC due to the way it
does (non-)escaping.
Joerg
2011 Nov 30
1
[LLVMdev] elf direct object emission
With the MIPS compiler, when we have static constants, in the .s file we
get something like:
.type $.str33, at object # @.str33
.section .rodata.str1.1,"aMS", at progbits,1
$.str33:
.asciz "//"
.size $.str33, 3
Currently when we create direct object code we are referencing the
symbol as an offset in .rodata and not directly using
2010 Jul 30
0
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
...cpp
>>> @@ -14,6 +14,7 @@
>>> #include "llvm/MC/MCAssembler.h"
>>> #include "llvm/MC/MCExpr.h"
>>> #include "llvm/MC/MCObjectWriter.h"
>>> +#include "llvm/MC/MCSectionCOFF.h"
>>> #include "llvm/MC/MCSectionELF.h"
>>> #include "llvm/MC/MCSectionMachO.h"
>>> #include "llvm/MC/MachObjectWriter.h"
>>> @@ -212,6 +213,24 @@ public:
>>> : ELFX86AsmBackend(T) {}
>>> };
>>>
>>> +class WindowsX86AsmBackend : public X86A...
2010 May 12
0
[LLVMdev] MC ELF support
...ers, but that is me.
- LLVM style is to use assert(... && "Message to include in the assert").
- Please use array_pod_sort (from ADT/STLExtras.h) instead of std::sort.
- WriteSecHdrEntry would be easier to read if it just used WriteWord
instead of Is64Bit.
- The changes to MCSectionELF shouldn't be needed. These should go
in MCSectionData instead, or in private maps if possible. I can give
you extra target dependent fields if need be. This enforces layering
between the parts CodeGen can access and the parts that are private to
the assembler backend.
On 0003:
- Might as well...
2013 Oct 10
0
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
...e()) {
> -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> - MF.dump();
> -#endif
> - }
> SetupMachineFunction(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.confi...
2010 Jul 30
2
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
...-14,6 +14,7 @@
>>>> #include "llvm/MC/MCAssembler.h"
>>>> #include "llvm/MC/MCExpr.h"
>>>> #include "llvm/MC/MCObjectWriter.h"
>>>> +#include "llvm/MC/MCSectionCOFF.h"
>>>> #include "llvm/MC/MCSectionELF.h"
>>>> #include "llvm/MC/MCSectionMachO.h"
>>>> #include "llvm/MC/MachObjectWriter.h"
>>>> @@ -212,6 +213,24 @@ public:
>>>> : ELFX86AsmBackend(T) {}
>>>> };
>>>>
>>>> +class Window...
2010 May 11
2
[LLVMdev] MC ELF support
Hi guys,
attached are a couple of work in progress patches for ELF support in the
MC module. I'm sending this email to gather some general feedback on the
code. Applying these patches doesn't get you a fully working llvm-mc
that understands ELF; it's just the ground work. I've got a couple more
small patches that fixup some places that assume Mach-O object format
which I'll
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