Displaying 7 results from an estimated 7 matches for "reorderrelocs".
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...atic uint8_t getOSABI(Triple::OSType OSType) {
> switch (OSType) {
> case Triple::FreeBSD:
> @@ -52,6 +80,8 @@ public:
> virtual void adjustFixupOffset(const MCFixup &Fixup,
> uint64_t &RelocOffset);
>
> + virtual void ReorderRelocs(const MCAssembler &Asm,
s/ReorderRelocs/reorderRelocs/. Function names start w/ a lower case letter. Personally, I prefer naming the prefix "sort" rather than "reorder", as it's a bit more descriptive, but not a big deal either way.
> + std::...
2012 Mar 23
0
[LLVMdev] Sorting relocation entries
...le::OSType OSType) {
>> switch (OSType) {
>> case Triple::FreeBSD:
>> @@ -52,6 +80,8 @@ public:
>> virtual void adjustFixupOffset(const MCFixup &Fixup,
>> uint64_t &RelocOffset);
>>
>> + virtual void ReorderRelocs(const MCAssembler &Asm,
> s/ReorderRelocs/reorderRelocs/. Function names start w/ a lower case letter. Personally, I prefer naming the prefix "sort" rather than "reorder", as it's a bit more descriptive, but not a big deal either way.
>
>> + ...
2012 Mar 23
1
[LLVMdev] Sorting relocation entries
...> switch (OSType) {
>>> case Triple::FreeBSD:
>>> @@ -52,6 +80,8 @@ public:
>>> virtual void adjustFixupOffset(const MCFixup &Fixup,
>>> uint64_t &RelocOffset);
>>>
>>> + virtual void ReorderRelocs(const MCAssembler &Asm,
>> s/ReorderRelocs/reorderRelocs/. Function names start w/ a lower case letter. Personally, I prefer naming the prefix "sort" rather than "reorder", as it's a bit more descriptive, but not a big deal either way.
>>
>>> +...
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...00000409 R_MIPS_GOT16 00000000 .bss // %got(body_ok)
00000754 00000406 R_MIPS_LO16 00000000 .bss // %lo(body_ok)
The attached patch makes the following changes to make direct object
emitter write out relocations 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 MCFixu...
2012 Mar 22
0
[LLVMdev] Sorting relocation entries
...0000 .bss // %got(body_ok)
> 00000754 00000406 R_MIPS_LO16 00000000 .bss // %lo(body_ok)
>
>
> The attached patch makes the following changes to make direct object
> emitter write out relocations 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 ELFRelocat...
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