mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
24 lines
458 B
Bash
Executable File
24 lines
458 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ROMELF=~/esp8266/esp32/rom_image/eagle.pro.rom.out
|
|
|
|
rm -rf extracted
|
|
mkdir extracted
|
|
cd extracted
|
|
mkdir inrom
|
|
ar x ../libc.a
|
|
cp ../libc.a ../libc-minusrom.a
|
|
|
|
nm $ROMELF | grep -e ' [TB] ' | cut -d ' ' -f 3- > romsyms
|
|
|
|
for x in *.o; do
|
|
nm $x | grep -e ' [TB] ' | cut -d ' ' -f 3- | while read a; do
|
|
if [ -e "$x" ] && cat romsyms | grep -q '^'$a'$'; then
|
|
echo "$a found in rom"
|
|
mv $x inrom
|
|
ar -d ../libc-minusrom.a $x
|
|
fi
|
|
done
|
|
done
|
|
|