-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Milestone
Description
cat > jal1.t << \!
SECTIONS {
.baz : { *(.baz) }
. = . + 0x100000 - 0x100;
.foo : { *(.foo) }
}
!
cat > a.s << \!
.section .baz,"ax",@progbits
.global baz1
baz1:
call foo
.global baz2
baz2:
.align 16
call foo
.global baz3
baz3:
call foo
!
cat > b.s << \!
.section .foo,"ax",@progbits
.global foo
.p2align 12
foo:
nop
!
clang -c -target riscv64 b.s a.s
ld.eld a.o b.o -T jal1.t -Map x
Error: a.o:(.baz+0x10000): relocation R_RISCV_JAL out of range: 1048576 is not in [-1048576, 1048575]; references 'foo'
Linker produces a relocation overflow error by relaxing foo to jal and later realizes that it does not fit because the distance increases after align relocations get handled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels