This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM64 Linaro toochain Link(R_AARCH64_ADR_PREL_LO21 error)

in my asm code, i use _bss_begin as blew

adr x0, _bss_begin
adr x1, _bss_end

which is defined in link.ld

SECTIONS
{
    . = 0xffff000000000000;
    .text.boot : { *(.text.boot) }
    . = ALIGN(0x00001000);
    user_begin = .;
    .text.user : { build/user* (.text) }
    .rodata.user : { build/user* (.rodata) }
    .data.user : { build/user* (.data) }
    .bss.user : { build/user* (.bss) }
    user_end = .;
    .text :  { *(.text) }
    .rodata : { *(.rodata) }
    .data : { *(.data) }
    . = ALIGN(0x8);
    _bss_begin = .;
    .bss : { *(.bss*) } 
    _bss_end = .;
    . = ALIGN(0x00001000);
    pg_dir = .;
    .data.pgd : { . += (3 * (1 << 12)); }
}

but when build , it post error msg

relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against symbol `_bss_end' defined in .bss section

any body can get some suggest about this error msg ?