LDFLAGS 是什么意思:-Wl,-segalign,4000
What's the meaning of LDFLAGS: -Wl,-segalign,4000
所以我偶然发现了一个cydia更新说明:
0.9.6010 fixes the 32-bit armv7 slice, which was keeping extensions from loading into Cydia. (Note that, additionally, all 32-bit binaries, in particular extensions, must be recompiled using -WI,-segalign,4000 for iOS 9 due to a change made by Apple. Extensions that have not been recompiled might “get lucky” and work, but they will usually either fail or even crash.)
这里想问一下-WI
、-segalign
、4000
各个flag是什么意思,尤其是-WI还是-Wl?如果仅用于 arm64 设备,我们还需要它吗?
这是分成几个部分的旗帜:
-Wl
来自clang docs,这是一个命令行标志,允许您将参数直接传递给链接器(clang
是调用链接器的驱动程序,-Wl
表示以下逗号分隔的参数被转发到链接器而不是被编译器使用)
segalign
来自 Mach linker docs, this specifies the segment alignment (segment as in binary file segment, see Wikipedia)。在这种情况下,每个段都必须对齐到 16384 字节(或者,十六进制的 0x4000
)。
4000
是对齐值(它是 -segalign
标志的一部分。
Do we still need it if only for arm64 devices?
您指的是 Armv7
特定的 fix/notes。除非注释中也提到 arm64
,否则我认为可以安全地假设 arm64
不需要该标志。不过这只是一个猜测。
所以我偶然发现了一个cydia更新说明:
0.9.6010 fixes the 32-bit armv7 slice, which was keeping extensions from loading into Cydia. (Note that, additionally, all 32-bit binaries, in particular extensions, must be recompiled using -WI,-segalign,4000 for iOS 9 due to a change made by Apple. Extensions that have not been recompiled might “get lucky” and work, but they will usually either fail or even crash.)
这里想问一下-WI
、-segalign
、4000
各个flag是什么意思,尤其是-WI还是-Wl?如果仅用于 arm64 设备,我们还需要它吗?
这是分成几个部分的旗帜:
-Wl
来自clang docs,这是一个命令行标志,允许您将参数直接传递给链接器(clang
是调用链接器的驱动程序,-Wl
表示以下逗号分隔的参数被转发到链接器而不是被编译器使用)segalign
来自 Mach linker docs, this specifies the segment alignment (segment as in binary file segment, see Wikipedia)。在这种情况下,每个段都必须对齐到 16384 字节(或者,十六进制的0x4000
)。4000
是对齐值(它是-segalign
标志的一部分。
Do we still need it if only for arm64 devices?
您指的是 Armv7
特定的 fix/notes。除非注释中也提到 arm64
,否则我认为可以安全地假设 arm64
不需要该标志。不过这只是一个猜测。