Jason Kim
2011-Jan-10 23:54 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
-llvmcommits On Mon, Jan 10, 2011 at 3:21 PM, Renato Golin <renato.golin at arm.com> wrote:> Btw, I know this is for ELF printing, but can the same infrastructure > you're using to print the hi/lo be used to print relocation in Asm > output? Or is this a completely separate subject?Hi Renato, If I am understanding you correctly, then the answer is no, because .s output doesn't care about relocations per se... BUT.. its also yes because sometimes, the asmwriter will sometimes need to generate sequences like below foo: movw r0, :lower16:bar-foo movt r0, :upper16:bar-foo The subtraction implies that the value bar-foo is implicitly pc-relative (at least according to GNU as). Thanks! -jason
Renato Golin
2011-Jan-11 09:06 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
On 10 January 2011 23:54, Jason Kim <jasonwkim at google.com> wrote:> If I am understanding you correctly, then the answer is no, because .s > output doesn't care about relocations per se...Hi Jason, That's not entirely true. ;) If you only use the GNU toolchain, that is correct. However, CodeSourcery's GCC changed a bit on how it works for ARM because the ARM toolchain is a bit more strict in build attributes and relocation information. The static constructor symbol relocation (target1) and exception handling table symbols (prel31) are clearly disregarded by gas and subsequently discarded by armlink.> its also yes because sometimes, the asmwriter will sometimes need to > generate sequences like below > > foo: > movw r0, :lower16:bar-foo > movt r0, :upper16:bar-foo > > The subtraction implies that the value bar-foo is implicitly > pc-relative (at least according to GNU as).That was the other part of my question: will your new MC-relocationator also print the current ASM relocations? ;) cheers, --renato
Jason Kim
2011-Jan-11 21:47 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
On Tue, Jan 11, 2011 at 1:06 AM, Renato Golin <renato.golin at arm.com> wrote:> That was the other part of my question: will your new > MC-relocationator also print the current ASM relocations? ;)Doesn't look like AsmParser understands RELOC command yet. Sorry:-(> > cheers, > --renato >
Possibly Parallel Threads
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] [llvm-commits] [patch] ARM/MC/ELF add new stub for movt/movw in ARMFixupKinds
- [LLVMdev] Thumb-2 code generation error in Apple LLVM at all optimization levels