3

I want to access a linker symbol defined in the linker file in inline assembler in Rust for an ARM target. However,

asm!(".import mysymb");

leads to

error: :1:2: error: unknown directive .import mysymb

Using .extern (as suggested here) results in:

LLVM ERROR: unsupported relocation on symbol

What is the correct way to introduce this symbol?

Community
  • 1
  • 1
Matthias
  • 8,018
  • 2
  • 27
  • 53
  • It appears you are using GNU AS, you don't to do anything to import an external symbol, just use it (with the correct relocation type). – Timothy Baldwin Apr 24 '17 at 17:15

0 Answers0