[cfe-dev] AArch64 ASM / Custom Sections and Common Variables
Joel Winarske via cfe-dev
cfe-dev at lists.llvm.org
Sun Nov 10 13:55:50 PST 2019
This is with lld-lnk -target aarch64-unknown-windows.
On Sat, Nov 9, 2019 at 10:25 AM Joel Winarske <joel.winarske at gmail.com>
wrote:
> What is the proper way to have a variable common between two
> custom-defined sections?
>
> Example:
>
> .global foo1
> .section .text.foo1, "ax"
> foo1:
> ldr w0, FooValue
> ret
>
> .global foo2
> .section .text.foo2, "ax"
> foo2:
> ldr w0, FooValue
> ret
>
> FooValue: .word 0x00
>
> This generates "unsupported relocation type:
> fixup_aarch64_ldr_pcrel_imm19". If I comment out the first ldr line, it
> builds, as FooValue is part of .text.foo2.
>
> If I define FooValue twice, once for each section it complains it's
> already defined.
>
>
> Joel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191110/fbc42a79/attachment.html>
More information about the cfe-dev
mailing list