Skip to content

Commit

Permalink
reduce empty.o file
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Sep 26, 2023
1 parent 81f84c4 commit f14dc16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/obj.s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.text
2 changes: 1 addition & 1 deletion tool/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ touch "$1"/ymp-cli-static
touch "$1"/ymp-shell-static
touch "$1"/libymp.so
touch "$1"/libymp-static.a
echo -n | gcc -c -x c - -o "$1"/obj.o
as -o "$1"/obj.o data/obj.s
for sec in $(readelf -WS "$1"/obj.o | grep "\[.*\] \."| cut -f 2 -d "]" | tr -s " " | cut -f2 -d" ") ; do
objcopy -R$sec "$1"/obj.o &>/dev/null || true
done

0 comments on commit f14dc16

Please sign in to comment.