HomePhabricator

[AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12

Description

[AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12

Summary:
An AArch64 LE relocation is a positive ("variant 1") offset. This
relocation is used to write the upper 12 bits of a 24-bit offset into an
add instruction:

add x0, x0, :tprel_hi12:v1

The comment in the ARM docs for R_AARCH64_TLSLE_ADD_TPREL_HI12 is:

"Set an ADD immediate field to bits [23:12] of X; check 0 <= X < 2^24."

Reviewers: javed.absar, espindola, ruiu, peter.smith, zatrazz

Reviewed By: ruiu

Subscribers: emaste, arichardson, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D52525

Details

Committed
rprichardSep 26 2018, 1:50 PM
Reviewer
ruiu
Differential Revision
D52525: [AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12
Parents
rL343143: [OpenMP] Add missing __kmpc_critical_with_hint to dllexports
Branches
Unknown
Tags
Unknown