[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon

Renato Golin renato.golin at arm.com
Tue Jan 11 01:06:04 PST 2011


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




More information about the llvm-dev mailing list