1#!/bin/bash 2# This script generats readelf output file for compatibility-common-util-tests. 3# A typical flow is as follows: 4# 1. add the file name in targetFile if to add a new object test file in ./assets 5# 2. run: ./gen_elf_golden_files.sh 6# 3. update ReadElfTest to use the new files 7# 4. build: m release-parser compatibility-common-util-tests -j8 8# 5. test: ./run_tests.sh 9echo Generating ELF golden sample file for test via readelf 10targetFile="arm32_libdl.so arm64_libdl.so x86app_process32 x86app_process64" 11for file in $targetFile; do 12 echo Processing $file 13 readelf -a -p .rodata ./assets/$file > ./assets/${file/.so/}.txt 14done