Skip to content

Commit e8ac801

Browse files
authored
Merge pull request #1068 from elezar/resolve-ldcache-libs-on-arm64
Fix resolution of libs in LDCache on ARM
2 parents dc0dee1 + 8012e4f commit e8ac801

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/ldcache/ldcache.go

+9
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ const (
4747
flagArchX8664 = 0x0300
4848
flagArchX32 = 0x0800
4949
flagArchPpc64le = 0x0500
50+
51+
// flagArch_ARM_LIBHF is the flag value for 32-bit ARM libs using hard-float.
52+
flagArch_ARM_LIBHF = 0x0900
53+
// flagArch_AARCH64_LIB64 is the flag value for 64-bit ARM libs.
54+
flagArch_AARCH64_LIB64 = 0x0a00
5055
)
5156

5257
var errInvalidCache = errors.New("invalid ld.so.cache file")
@@ -195,10 +200,14 @@ func (c *ldcache) getEntries() []entry {
195200
switch e.Flags & flagArchMask {
196201
case flagArchX8664:
197202
fallthrough
203+
case flagArch_AARCH64_LIB64:
204+
fallthrough
198205
case flagArchPpc64le:
199206
bits = 64
200207
case flagArchX32:
201208
fallthrough
209+
case flagArch_ARM_LIBHF:
210+
fallthrough
202211
case flagArchI386:
203212
bits = 32
204213
default:

0 commit comments

Comments
 (0)