[llvm-commits] [patch] ARM/MC/ELF RecordRelocation refactoring
Jason Kim
jasonwkim at google.com
Thu Dec 2 16:02:33 PST 2010
This is a patch that attempts to refactot
ELFObjectWriter::RecordRelocation() in two parts.
The first patch
It adds a new method to X86 GetRelocType() and lifts RecordRelocation
to ELFObjectWriter
+ ARM/X86 no longer require their own versions of RecordRelocation
- MBlaze still does, because it is expecting to access RelocSymbol and
Addend when selecting the reloc type.
The first patch leaves MBlaze completely alone.
The second patch deals with MBlaze by using ERE early, and changes
GetRelocType() to SetRelocType.
The new set method takes in the ERE instance so that MBlaze has access
to RelocSymbol and Addend.
Peckw: question for you
Is the RelocSymbol variable really necessary when selecting the
relocation? or can it be done more simply?
After both patches are applied:
+ ARM/X86/MBlaze share the bulk of RecordRelocation
+ ARM/X86/MBlaze's special case is limited to SetRelocType()
- RecordRelocation now slightly more messier, but can be fixed later
to get rid of the references.
The patches apply cleanly (-p1) to -r120721
Thanks
-jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-mc-elf-s17-refactor-rr-part1.patch
Type: text/x-patch
Size: 16306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101202/88be535a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-mc-elf-s17-refactor-rr-part2.patch
Type: text/x-patch
Size: 9684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101202/88be535a/attachment-0001.bin>
More information about the llvm-commits
mailing list