Author: Dharanendiran <dharanendiran@timesys.com>
Date: Thu, 17 Aug 2023 16:20:02 +0530


---
 libcap/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcap/Makefile b/libcap/Makefile
index f5dde3e..585f7da 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -112,7 +112,7 @@ empty: empty.c
 	$(CC) -o $@ $<
 
 loader.txt: empty
-	$(OBJCOPY) --dump-section .interp=$@ $< /dev/null
+	$(CROSS_COMPILE)readelf -l $< | grep interpreter | cut -f2 -d':' | cut -f1 -d']' | cut -f2 -d' ' > $@
 
 cap_magic.o: execable.h execable.c loader.txt libcap.h
 	$(CC) $(CFLAGS) $(CPPFLAGS) -DLIBRARY_VERSION=\"$(LIBTITLE)-$(VERSION).$(MINOR)\" -DSHARED_LOADER=\"$(shell cat loader.txt)\" -include ./libcap.h -c execable.c -o $@
-- 
2.25.1

