1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-21 15:46:17 +04:00

Fix fill_symbols aarch64 on macOS

This commit is contained in:
Jiajie Chen 2019-06-16 00:11:25 +08:00
parent 164e94a146
commit 07b75b0a74
2 changed files with 4 additions and 4 deletions

View File

@ -304,7 +304,7 @@ $(bootloader): $(kernel)
ifeq ($(need_bootloader), true)
ifeq ($(arch), aarch64)
@echo "Patching symbols into kernel."
../tools/fill_symbols/aarch64.sh target/aarch64/$(mode)/rcore
@../tools/fill_symbols/aarch64.sh target/aarch64/$(mode)/rcore $(prefix)
endif
@echo Building $(arch) bootloader
@$(strip) $(kernel) -o $(kernel)_stripped

View File

@ -3,11 +3,11 @@ echo "Filling kernel symbols."
rcore=$1
tmpfile=$(mktemp /tmp/rcore-symbols.txt.XXXXXX)
echo "Writing symbol table."
aarch64-elf-nm $1 >$tmpfile
$2nm $1 >$tmpfile
gzip $tmpfile
tmpfile=$tmpfile.gz
symbol_table_loc=$((16#$(aarch64-elf-objdump -D $rcore -j .data -F |grep "<rcore_symbol_table>" |grep -oEi "0x[0-9a-f]+" |grep -oEi "[0-9a-f][0-9a-f]+")))
symbol_table_size_loc=$((16#$(aarch64-elf-objdump -D $rcore -j .data -F |grep "<rcore_symbol_table_size>" |grep -oEi "0x[0-9a-f]+" |grep -oEi "[0-9a-f][0-9a-f]+")))
symbol_table_loc=$((16#$($2objdump -D $rcore -j .data -F |grep "<rcore_symbol_table>" |grep -oEi "0x[0-9a-f]+" |grep -oEi "[0-9a-f][0-9a-f]+")))
symbol_table_size_loc=$((16#$($2objdump -D $rcore -j .data -F |grep "<rcore_symbol_table_size>" |grep -oEi "0x[0-9a-f]+" |grep -oEi "[0-9a-f][0-9a-f]+")))
echo $symbol_table_loc
echo $symbol_table_size_loc
FILESIZE=$(stat -c%s "$tmpfile")