HomeFreeBSD

lld: Fix weak symbols on arm and aarch64

Description

lld: Fix weak symbols on arm and aarch64

MFC r319955: lld: sort relocations

No functional change; applied to facilitate merge of later LLD commit.

MFC r319956: lld: Fix weak symbols on arm and aarch64

Given

.weak target
.global _start
_start:
b target

The intention is that the branch goes to the instruction after the
branch, effectively turning it on a nop. The branch adds the runtime
PC, but we were adding it statically too.

I noticed the oddity by inspection, but llvm-objdump seems to agree,
since it now prints things like:

b #-4 <_start+0x4>

Obtained from: LLD r298797, r305212
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS320059: Revert r319989 "bnxt(4) Enable LRO support"
Branches
Unknown
Tags
Unknown