mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Introduce $(tc_bfdarch) and generate disassemblies to verify code quality.
This commit is contained in:
parent
9f20ddc800
commit
348a40201b
|
@ -141,7 +141,7 @@ tc.default.sstrip = sstrip
|
|||
tc.default.m-ld = multiarch-ld-2.17 $(if $(tc_bfdname),-b $(tc_bfdname))
|
||||
tc.default.m-nm = multiarch-nm-2.17 $(if $(tc_bfdname),--target=$(tc_bfdname))
|
||||
tc.default.m-objcopy = multiarch-objcopy-2.17 $(if $(tc_bfdname),-F $(tc_bfdname))
|
||||
tc.default.m-objdump = multiarch-objdump-2.17 $(if $(tc_bfdname),-b $(tc_bfdname))
|
||||
tc.default.m-objdump = multiarch-objdump-2.17 $(if $(tc_bfdname),-b $(tc_bfdname)) $(if $(tc_bfdarch),-m $(tc_bfdarch))
|
||||
tc.default.m-readelf = multiarch-readelf-2.17
|
||||
|
||||
# default binutils
|
||||
|
@ -152,6 +152,7 @@ tc.default.objdump = $(call tc,m-objdump)
|
|||
tc.default.objstrip = $(call tc,objcopy) -R .comment -R .note -R .reginfo
|
||||
|
||||
define tc.default.embed_objinfo
|
||||
$(call tc,m-objdump) -D $2 | $(RTRIM) > $2.disasm
|
||||
$(call tc,m-objcopy) --strip-unneeded $2
|
||||
$(call tc,m-objcopy) -R .text -R .data -R .bss $2
|
||||
$(call tc,m-objcopy) -R .comment -R .note -R .reginfo $2
|
||||
|
@ -183,6 +184,7 @@ PP_FLAGS =
|
|||
IDENT_NAME =
|
||||
IDENT_PREFIX =
|
||||
IDENT_SUFFIX =
|
||||
tc_bfdarch =
|
||||
tc_bfdname =
|
||||
tc_list =
|
||||
|
||||
|
@ -281,6 +283,7 @@ arm.v4t-wince.pe.h : $(srcdir)/src/$$T.S
|
|||
# ************************************************************************/
|
||||
|
||||
i086-dos16.com% : tc_list = arch-i086 default
|
||||
i086-dos16.com% : tc_bfdarch = i8086
|
||||
|
||||
i086-dos16.com.h : $(srcdir)/src/$$T.S
|
||||
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
|
||||
|
@ -293,6 +296,7 @@ i086-dos16.com.h : $(srcdir)/src/$$T.S
|
|||
# ************************************************************************/
|
||||
|
||||
i086-dos16.exe% : tc_list = arch-i086 default
|
||||
i086-dos16.exe% : tc_bfdarch = i8086
|
||||
|
||||
i086-dos16.exe.h : $(srcdir)/src/$$T.S
|
||||
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
|
||||
|
@ -305,6 +309,7 @@ i086-dos16.exe.h : $(srcdir)/src/$$T.S
|
|||
# ************************************************************************/
|
||||
|
||||
i086-dos16.sys% : tc_list = arch-i086 default
|
||||
i086-dos16.sys% : tc_bfdarch = i8086
|
||||
|
||||
i086-dos16.sys.h : $(srcdir)/src/$$T.S
|
||||
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
|
||||
|
|
|
@ -37,7 +37,7 @@ lzma_d_c%.S : lzma_d_c.c
|
|||
$(call tc,objstrip) tmp/$T.o
|
||||
$(call tc,objcopy) -O binary --only-section .text.LzmaDecode tmp/$T.o tmp/$T.bin
|
||||
head -c-1 tmp/$T.bin > tmp/$T.out
|
||||
$(call tc,objdump) -b binary -m i386:x86-64 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.lst
|
||||
$(call tc,objdump) -b binary -m i386:x86-64 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.disasm
|
||||
$(call tc,bin2h) --mode=gas tmp/$T.out $@
|
||||
|
||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||
|
|
|
@ -36,7 +36,7 @@ lzma_d_c%.S : lzma_d_c.c
|
|||
$(call tc,objstrip) tmp/$T.o
|
||||
$(call tc,objcopy) -O binary --only-section .text.LzmaDecode tmp/$T.o tmp/$T.bin
|
||||
head -c-1 tmp/$T.bin > tmp/$T.out
|
||||
$(call tc,objdump) -b binary -m i386 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.lst
|
||||
$(call tc,objdump) -b binary -m i386 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.disasm
|
||||
$(call tc,bin2h) --mode=gas tmp/$T.out $@
|
||||
|
||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||
|
|
|
@ -38,7 +38,7 @@ lzma_d_c%.S : lzma_d_c.c
|
|||
$(call tc,objstrip) tmp/$T.o
|
||||
$(call tc,m-objcopy) -O binary --only-section .text.LzmaDecode tmp/$T.o tmp/$T.bin
|
||||
head -c-0 tmp/$T.bin > tmp/$T.out
|
||||
$(call tc,m-objdump) -b binary -m mips:3000 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.lst
|
||||
$(call tc,m-objdump) -b binary -m mips:3000 -D tmp/$T.out | $(RTRIM) > tmp/$T.out.disasm
|
||||
$(call tc,bin2h) --mode=gas tmp/$T.out $@
|
||||
|
||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||
|
|
|
@ -38,7 +38,7 @@ lzma_d_c%.S : lzma_d_c.c
|
|||
$(call tc,objstrip) tmp/$T.o
|
||||
$(call tc,objcopy) -O binary --only-section .text.LzmaDecode tmp/$T.o tmp/$T.bin
|
||||
head -c-4 tmp/$T.bin > tmp/$T.out
|
||||
$(call tc,objdump) -b binary -m powerpc -D tmp/$T.out | $(RTRIM) > tmp/$T.out.lst
|
||||
$(call tc,objdump) -b binary -m powerpc -D tmp/$T.out | $(RTRIM) > tmp/$T.out.disasm
|
||||
$(call tc,bin2h) --mode=gas tmp/$T.out $@
|
||||
|
||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||
|
|
Loading…
Reference in New Issue
Block a user