From 4f06c0df56fceac974afef55abac34bbe2b478af Mon Sep 17 00:00:00 2001 From: kub Date: Fri, 16 Aug 2019 17:25:23 +0200 Subject: [PATCH] fix for mkoffsets without multiarch binutils --- tools/mkoffsets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkoffsets.sh b/tools/mkoffsets.sh index e7632593..3b4c076d 100755 --- a/tools/mkoffsets.sh +++ b/tools/mkoffsets.sh @@ -16,8 +16,8 @@ compile_rodata () rosect=$(readelf -S /tmp/getoffs.o | grep '\.rodata' | sed 's/^[^.]*././;s/ .*//') # read out .rodata section as hex string (should be only 4 or 8 bytes) - objcopy --dump-section $rosect=/tmp/getoffs.ro /tmp/getoffs.o || exit 1 - ro=$(xxd -ps /tmp/getoffs.ro) + ro=$(readelf -x $rosect /tmp/getoffs.o | grep '0x' | cut -c14-48 | + tr -d ' \n') if [ "$ENDIAN" = "le" ]; then # swap needed for le target hex="" -- 2.39.5