HomeFreeBSD

Fix booting the arm64 kernel when built with clang 3.9.0

Description

Fix booting the arm64 kernel when built with clang 3.9.0

Clang 3.9.0 changes how weak extern is handled. They now use the got to
handle them. This is a problem as ld.bfd doesn't fill out any default value
in the got so pointers become NULL. This caused the kernel to fail to boot
as we use this in linker sets.

This fixes the issue by setting a default value in the got. The kernel
still loads data through it, but because we always load it at a fixed
virtual address the address it finds is valid.

Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D8622

Details

Provenance
andrewAuthored on
Differential Revision
D8622: Fix booting the arm64 kernel when built with clang 3.9.0
Parents
rP427377: - Update to 1.7.0.2
Branches
Unknown
Tags
Unknown