Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22032

when make elf, link is fail. post R_AARCH64_ADR_PREL_PG_HI21 error

$
0
0

in my asm code, i use _bss_begin

adr x0, _bss_beginadr 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 ?


Viewing all articles
Browse latest Browse all 22032

Trending Articles