feat(asm): encode the arm64 local-exec TLS load

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 21:34:30 +02:00
1 parent 5f6be4584d
commit c27ba30862
6 files changed
+114 -2

No files matched your search

+3
View File
@@ -50,6 +50,8 @@ func (img *Image) GOObjectAARCH64(pkgPath, srcPath string) ([]byte, error) {
return relocArm64Branch, 4
case RelArm64LDST64:
return relocArm64LDST64, 8
case RelArm64TLSLE:
return relocArm64TLSLE, 4
default:
return relocArm64Addr, 8
}
@@ -60,6 +62,7 @@ func (img *Image) GOObjectAARCH64(pkgPath, srcPath string) ([]byte, error) {
const (
relocArm64Addr = 3 // R_ADDRARM64, ADRP+ADD pair
relocArm64Branch = 9 // R_CALLARM64, BL instruction
relocArm64TLSLE = 32 // R_ARM64_TLS_LE, MOVZ local-exec TLS load
relocArm64LDST64 = 40 // R_ARM64_PCREL_LDST64, ADRP+LDR/STR pair
)