search for: elfrelocationentry

Displaying 7 results from an estimated 7 matches for "elfrelocationentry".

2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...#include <vector> > > namespace llvm { > class MCELFObjectTargetWriter { > @@ -27,6 +28,33 @@ protected: > uint16_t EMachine_, bool HasRelocationAddend_); > > public: > + /// @name Relocation Data > + /// @{ > + > + struct ELFRelocationEntry { > + // Make these big enough for both 32-bit and 64-bit > + uint64_t r_offset; > + int Index; > + unsigned Type; > + const MCSymbol *Symbol; > + uint64_t r_addend; > + const MCFixup *fixup; > + > + ELFRelocationEntry() > + : r_offset(0),...
2012 Mar 23
0
[LLVMdev] Sorting relocation entries
...;  namespace llvm { >>  class MCELFObjectTargetWriter { >> @@ -27,6 +28,33 @@ protected: >>                            uint16_t EMachine_,  bool HasRelocationAddend_); >> >>  public: >> +  /// @name Relocation Data >> +  /// @{ >> + >> +  struct ELFRelocationEntry { >> +    // Make these big enough for both 32-bit and 64-bit >> +    uint64_t r_offset; >> +    int Index; >> +    unsigned Type; >> +    const MCSymbol *Symbol; >> +    uint64_t r_addend; >> +    const MCFixup *fixup; >> + >> +    ELFRelocatio...
2012 Mar 23
1
[LLVMdev] Sorting relocation entries
...ss MCELFObjectTargetWriter { >>> @@ -27,6 +28,33 @@ protected: >>> uint16_t EMachine_, bool HasRelocationAddend_); >>> >>> public: >>> + /// @name Relocation Data >>> + /// @{ >>> + >>> + struct ELFRelocationEntry { >>> + // Make these big enough for both 32-bit and 64-bit >>> + uint64_t r_offset; >>> + int Index; >>> + unsigned Type; >>> + const MCSymbol *Symbol; >>> + uint64_t r_addend; >>> + const MCFixup *fixup; >>&...
2012 Mar 22
0
[LLVMdev] Sorting relocation entries
...k) > > > 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 MCFixup::Value to reorder the > relocations. > > Do you think these changes a...
2012 Mar 22
2
[LLVMdev] Sorting relocation entries
...6 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 MCFixup::Value to reorder the relocations. Do you think these changes are acceptable? On Wed, Mar 2...
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