[llvm-bugs] [Bug 30848] New: Removal of AArch64II::MO_CONSTPOOL breaks booting the FreeBSD kernel
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 31 10:16:32 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30848
Bug ID: 30848
Summary: Removal of AArch64II::MO_CONSTPOOL breaks booting the
FreeBSD kernel
Product: libraries
Version: 3.9
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: Backend: AArch64
Assignee: unassignedbugs at nondot.org
Reporter: andrew at fubar.geek.nz
CC: dimitry at andric.com, emaste at freebsd.org,
llvm-bugs at lists.llvm.org, rafael.espindola at gmail.com
Classification: Unclassified
In r271311 AArch64II::MO_CONSTPOOL was removed as it produces the same
instruction sequence as with accessing via the got. There is a difference
between the two however within the FreeBSD kernel. This is built as a dynamic
ELF binary, but doesn't have a run time linker.
FreeBSD makes extensive use of linker set, where it may iterate over all
objects within a named section. For this it has an weak extern pointer to the
__start and __stop variables the linker generates. Moving from llvm 3.8 to 3.9
there is a change in behaviour with weak extern pointers where they now always
pass through the got, however there is no dynamic linker to perform the needed
relocation so these become a NULL pointer dereference.
I can work around this by returning AArch64II::MO_NO_FLAG from
AArch64Subtarget::ClassifyGlobalReference, however I don't know if this is a
correct fix.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161031/8b4e78cd/attachment.html>
More information about the llvm-bugs
mailing list