https://llvm.org/bugs/show_bug.cgi?id=30267
Bug ID: 30267
Summary: Linker script orphan sections get an invalid address
on AArch64
Product: lld
Version: unspecified
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 17211
--> https://llvm.org/bugs/attachment.cgi?id=17211&action=edit
objdump -x of the linked kernel
While trying to link the FreeBSD arm64 kernel I received around 45141 of the
following error:
relocation R_AARCH64_ADR_PREL_PG_HI21 out of range
After commenting out the check I linked the kernel and found the orphaned
sections were placed at the end of the file and started with a virtual address
of 0. This caused an overflow in the relocation.
It would seem binutils has a heuristic to put these sections after a section
with similar attributes:
https://sourceware.org/binutils/docs/ld/Orphan-Sections.html
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs