From: kub Date: Fri, 16 Aug 2019 15:25:23 +0000 (+0200) Subject: fix for mkoffsets without multiarch binutils X-Git-Tag: v2.00~841 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f06c0df56fceac974afef55abac34bbe2b478af;p=picodrive.git fix for mkoffsets without multiarch binutils --- 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=""