HomeFreeBSD

The bootloader self relocation code was slightly wrong for the

Description

The bootloader self relocation code was slightly wrong for the
R_AARCH64_RELATIVE relocation found on arm64. It would try to add the
contents of the memory location being relocated to the base address and
the relocation addend. This worked when the contents was zero, however
this now seems to be set to the value of the addend so we add this twice.
Fix this by just setting the memory to the computed value.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8177

Details

Provenance
andrewAuthored on
Reviewer
emaste
Differential Revision
D8177: Fix bootloader relocations on arm64
Parents
rS306811: In order to allow mkimg(1) (and other tools) to become a build tool
Branches
Unknown
Tags
Unknown