Displaying 18 results from an estimated 18 matches for "mipselfobjectwrit".
Did you mean:
mipselfobjectwriter
2012 Dec 17
0
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
...eaders e_flags extensively. The most pressing issue is the need to post the relocation model such as PIC, CPIC or non-shared. The object method that allows me to update the e_flags at the target level, <target>ELFObjectWriter::getEFlags(), had no access to any target specific information .
MipsELFObjectWriter is created during MipsAsmBackend construction which is create during an invocation of createMipsAsmBackend().
create<target>AsmBackend is called by:
the codegen (integrated assembler)
llvm-mc (standalone assembler)
clang (cc1as_main.cpp)
My solution for getting access of target spec...
2012 Dec 15
2
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
On Fri, Dec 14, 2012 at 1:03 PM, Carter, Jack <jcarter at mips.com> wrote:
> Eli,
>
> This is the kind of feedback I want. I believe I have to add to the base class so it should be generally useful. I can see string being better for the value. I still am enamoured with an enumeration for the tab though: int->string. How would that be a limitation?
>
I guess that's fine,
2012 Dec 06
2
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
Older targets like Mips had/have assemblers and ABIs that carry a lot of baggage.
The small bit of baggage that is giving me fits is that MipsELFObjectWriter needs to know the relocation model (static,pic,cpic), whether we are using xgot (-mgot), which abi (old,new), which architecture (32r[123],64[123]), which if any coprocessor or extention instructions are used (mips16,micromips,etc.).
I shouldn't have to muck with base classes to handle esote...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...el_2, ///< A two-byte pc relative fixup.
FK_GPRel_4, ///< A four-byte pc relative fixup.
FK_GPRel_8, ///< A eight-byte pc relative fixup.
In MC/MCStreamer.cpp MCStreamer::EmitGpRel32Value()
Figure out how to mark it with the imprint of FK_GPRel_4
In MC/ELFObjectWriter.cpp MipsELFObjectWriter::GetRelocType()
Add a switch case for FK_GPRel_4 to put out the correct target specific relocation.
Is that correct? Did I miss anything?
Thanks,
Jack
2012 Dec 07
0
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
On 6 December 2012 17:49, Carter, Jack <jcarter at mips.com> wrote:
> Older targets like Mips had/have assemblers and ABIs that carry a lot of
> baggage.
>
> The small bit of baggage that is giving me fits is that MipsELFObjectWriter
> needs to know the relocation model (static,pic,cpic), whether we are using
> xgot (-mgot), which abi (old,new), which architecture (32r[123],64[123]),
> which if any coprocessor or extention instructions are used
> (mips16,micromips,etc.).
So the mips assembler has command line opt...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
...ific problem, I suspect what needs to happen is something like:
>>
>> 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and
>> 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()).
>>
>> Regards,
>>
>> -Jim
>>
>> On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote:
>>
>>> Well Jim, that may just be my problem.
>>>
>>> As background I am working on the outer reaches of llvm for the direct obj...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...cific bits.
For your specific problem, I suspect what needs to happen is something like:
1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and
2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()).
Regards,
-Jim
On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote:
> Well Jim, that may just be my problem.
>
> As background I am working on the outer reaches of llvm for the direct object output for Mips. Part of what I am to do is instruct the folks working closer...
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...ions in the correct order:
1. Add a target hook MCELFObjectTargetWriter::ReorderRelocs. The
default behavior sorts the relocations by the r_offset.
2. Move struct ELFRelocationEntry from ELFObjectWriter to
MCELFObjectTargetWriter and add member fixup to it. The overridden
version of ReorderRelocs (MipsELFObjectWriter::ReorderRelocs) needs
access to ELFRelocationEntry::Type and MCFixup::Value to reorder the
relocations.
Do you think these changes are acceptable?
On Wed, Mar 21, 2012 at 3:50 PM, Jim Grosbach <grosbach at apple.com> wrote:
> Hi Akira,
>
> If I follow correctly, the relocation en...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
...cific bits.
For your specific problem, I suspect what needs to happen is something like:
1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and
2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()).
Regards,
-Jim
On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote:
> Well Jim, that may just be my problem.
>
> As background I am working on the outer reaches of llvm for the direct object output for Mips. Part of what I am to do is instruct the folks working closer t...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
Well Jim, that may just be my problem.
As background I am working on the outer reaches of llvm for the direct object output for Mips. Part of what I am to do is instruct the folks working closer to the backend what I am getting that is incorrect. My first reaction is to assume that I am being fed things the correct way and that I am not handling it correctly.
I feed the compiler a source file
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...r your specific problem, I suspect what needs to happen is something like:
>
> 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and
> 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()).
>
> Regards,
>
> -Jim
>
> On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote:
>
>> Well Jim, that may just be my problem.
>>
>> As background I am working on the outer reaches of llvm for the direct object output for Mips. Part of what I...
2012 Mar 22
0
[LLVMdev] Sorting relocation entries
...t;
> 1. Add a target hook MCELFObjectTargetWriter::ReorderRelocs. The
> default behavior sorts the relocations by the r_offset.
> 2. Move struct ELFRelocationEntry from ELFObjectWriter to
> MCELFObjectTargetWriter and add member fixup to it. The overridden
> version of ReorderRelocs (MipsELFObjectWriter::ReorderRelocs) needs
> access to ELFRelocationEntry::Type and MCFixup::Value to reorder the
> relocations.
>
> Do you think these changes are acceptable?
>
> On Wed, Mar 21, 2012 at 3:50 PM, Jim Grosbach <grosbach at apple.com> wrote:
>> Hi Akira,
>>
>>...
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...target hook MCELFObjectTargetWriter::ReorderRelocs. The
>> default behavior sorts the relocations by the r_offset.
>> 2. Move struct ELFRelocationEntry from ELFObjectWriter to
>> MCELFObjectTargetWriter and add member fixup to it. The overridden
>> version of ReorderRelocs (MipsELFObjectWriter::ReorderRelocs) needs
>> access to ELFRelocationEntry::Type and MCFixup::Value to reorder the
>> relocations.
>>
>> Do you think these changes are acceptable?
>>
>> On Wed, Mar 21, 2012 at 3:50 PM, Jim Grosbach <grosbach at apple.com> wrote:
>>>...
2012 Mar 21
0
[LLVMdev] Sorting relocation entries
Hi Akira,
If I follow correctly, the relocation entries can thus be in a different order than the instructions that they're for? That seems a bit odd, but I suppose there's nothing inherently wrong with that. It's just not something, AFAIK, that llvm has had to deal with before. This should definitely be a target-specific thing, not a general ELFObjectWriter thing, as other targets
2012 Mar 19
2
[LLVMdev] Sorting relocation entries
What would be the best way to sort relocation entries before they are
written out in ELFObjectWriter::WriteRelocationsFragment?
According to the Mips ABI documents I have, there are certain
restrictions on the order relocations appear in the table (e.g.
R_MIPS_HI16 and R_MIPS_GOT16 must be followed immediately by a
R_MIPS_LO16). When I enable post RA scheduling, some of the
restrictions are
2012 Mar 23
0
[LLVMdev] Sorting relocation entries
...LFObjectTargetWriter::ReorderRelocs. The
>>> default behavior sorts the relocations by the r_offset.
>>> 2. Move struct ELFRelocationEntry from ELFObjectWriter to
>>> MCELFObjectTargetWriter and add member fixup to it. The overridden
>>> version of ReorderRelocs (MipsELFObjectWriter::ReorderRelocs) needs
>>> access to ELFRelocationEntry::Type and MCFixup::Value to reorder the
>>> relocations.
>>>
>>> Do you think these changes are acceptable?
>>>
>>> On Wed, Mar 21, 2012 at 3:50 PM, Jim Grosbach <grosbach at apple.com&...
2012 Mar 23
1
[LLVMdev] Sorting relocation entries
...iter::ReorderRelocs. The
>>>> default behavior sorts the relocations by the r_offset.
>>>> 2. Move struct ELFRelocationEntry from ELFObjectWriter to
>>>> MCELFObjectTargetWriter and add member fixup to it. The overridden
>>>> version of ReorderRelocs (MipsELFObjectWriter::ReorderRelocs) needs
>>>> access to ELFRelocationEntry::Type and MCFixup::Value to reorder the
>>>> relocations.
>>>>
>>>> Do you think these changes are acceptable?
>>>>
>>>> On Wed, Mar 21, 2012 at 3:50 PM, Jim Grosbach...
2012 Dec 07
2
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
...tting target specific information to <target>ELFObjectWriter
On 6 December 2012 17:49, Carter, Jack <jcarter at mips.com> wrote:
> Older targets like Mips had/have assemblers and ABIs that carry a lot of
> baggage.
>
> The small bit of baggage that is giving me fits is that MipsELFObjectWriter
> needs to know the relocation model (static,pic,cpic), whether we are using
> xgot (-mgot), which abi (old,new), which architecture (32r[123],64[123]),
> which if any coprocessor or extention instructions are used
> (mips16,micromips,etc.).
So the mips assembler has command line opt...