mirror of
https://github.com/openwrt/packages.git
synced 2026-12-01 20:25:32 +04:00
libcurl-gnutls: strip with binutils strip
patchelf --set-soname puts the new dynamic string table at the end of the file. With CONFIG_USE_SSTRIP and CONFIG_SSTRIP_DISCARD_TRAILING_ZEROES, sstrip -z then cuts its trailing zero bytes, so the table ends past the end of the file. The dynamic loader fills these bytes with zeros and the library works, but readelf fails with "extends past end of file" and reads no SONAME or a wrong one. The package test in CI fails on this for aarch64_generic, and the 8.9.1 package in openwrt-24.10 has the same problem. Strip the library with binutils strip instead, as libcamera does. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
1 parent
944cc4f155
commit
bd72d9b45f
1 file changed
+6
@@ -96,6 +96,12 @@ define Build/Compile
|
||||
patchelf --set-soname 'libcurl-gnutls.so.$(PKG_ABI_VERSION)' $(PKG_BUILD_DIR)/lib/.libs/libcurl.so.$(PKG_ABI_VERSION).*
|
||||
endef
|
||||
|
||||
# patchelf puts the new string table at the end of the file, sstrip -z cuts
|
||||
# its trailing zero bytes and readelf can no longer read the SONAME
|
||||
ifeq ($(CONFIG_NO_STRIP),)
|
||||
STRIP:=$(TARGET_CROSS)strip --strip-all
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.$(PKG_ABI_VERSION).* $(1)/usr/lib/libcurl-gnutls.so.$(PKG_ABI_VERSION)
|
||||
|
||||
Reference in new issue
Block a user