Thread (4 messages) 4 messages, 2 authors, 2018-08-30

assembly syntax

From: Ard Biesheuvel <hidden>
Date: 2018-08-27 22:41:07

On 28 August 2018 at 00:33, Nick Desaulniers [off-list ref] wrote:
Hi Ard,
Trying to file bugs for clang's integrated assembler, I'm hitting a
syntax error with clang, but I don't understand how the notation is
supposed to work.

arch/arm64/kernel/reloc_test_syms.S
39: movz x0, #:abs_g3:sym64_abs

arch/arm64/include/asm/assembler.h
504: movz \reg, :abs_g3:\val

Clang is not happy with :abs_g3:, but I'm not sure how that code is
supposed to work? Is it supposed to be a prefix for a relocation?

I *think* R_AARCH64_MOVW_UABS_G3 is somehow related, but I'm
unfamiliar with this syntax.  Your name was on the `git blame` for
those lines but I still don't understand, even while looking at
commit 214fad550772 ("arm64: relocation testing module").

Are there docs you can point me at for this?
As you have guessed, it is used to annotate the instruction with the
correct relocation. You'll have to dig into the binutils sources for
the details, I'm afraid.

But if I may ask, what is the point of using Clang's integrated
assembler? Surely, you don't need it for things like CFI and other
Clang goodies?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help