HomeFreeBSD

EFI loaders: parse rela relocations on amd64

Description

EFI loaders: parse rela relocations on amd64

Prior to this change the loader self relocation code interpreted amd64's
rela relocations as if they were rel relocations, discarding the addend.
This "works" because GNU ld 2.17.50 stores the addend value in both the
r_addend field of the relocation (as expected) and at the target of the
relocation.

Other linkers, and possibly other versions of GNU ld, won't have this
behaviour, so interpret the relocations correctly.

Reported by: George Rimar
Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8681

Details

Provenance
emasteAuthored on
Reviewer
andrew
Differential Revision
D8681: EFI loaders: amd64 uses rela relocations
Parents
rS309359: Add key_allocsa_tcpmd5() to do lookup for SA used to store password
Branches
Unknown
Tags
Unknown