Skip to content

Commit 7c670ca

Browse files
authored
Merge pull request #1 from harrychin/harrychin-patch-1
Make link-wrap.sh Linux/macOS cross-platform
2 parents bc52315 + 30022aa commit 7c670ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ledger_device_sdk/link_wrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ llvm-objcopy --dump-section .rel.nvm_data=$OUT-nvm-reloc $OUT /dev/null || true
2828
cat $OUT-rodata-reloc $OUT-nvm-reloc $OUT-data-reloc > $OUT-relocs || true
2929

3030
reloc_allocated_size="$((0x$(llvm-nm $OUT | grep _reloc_size | cut -d' ' -f1)))"
31-
reloc_real_size="$(stat -c %s $OUT-relocs)"
31+
reloc_real_size="$(wc -c < "$OUT-relocs")"
3232
# Check that our relocations _actually_ fit.
3333
if [ "$reloc_real_size" -gt "$reloc_allocated_size" ]
3434
then

0 commit comments

Comments
 (0)