diff --git a/src/stub/Makefile b/src/stub/Makefile index b6c2180d..1bd607d3 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -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 diff --git a/src/stub/src/arch/amd64/Makefile.extra b/src/stub/src/arch/amd64/Makefile.extra index 78fbf8bb..2515b48c 100644 --- a/src/stub/src/arch/amd64/Makefile.extra +++ b/src/stub/src/arch/amd64/Makefile.extra @@ -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 diff --git a/src/stub/src/arch/i386/Makefile.extra b/src/stub/src/arch/i386/Makefile.extra index d63cb232..a7480eb0 100644 --- a/src/stub/src/arch/i386/Makefile.extra +++ b/src/stub/src/arch/i386/Makefile.extra @@ -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 diff --git a/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra b/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra index 20e90f7f..c73c255d 100644 --- a/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra +++ b/src/stub/src/arch/mips/mipsel.r3000/Makefile.extra @@ -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 diff --git a/src/stub/src/arch/powerpc/32/Makefile.extra b/src/stub/src/arch/powerpc/32/Makefile.extra index 947505a1..6bbb8c44 100644 --- a/src/stub/src/arch/powerpc/32/Makefile.extra +++ b/src/stub/src/arch/powerpc/32/Makefile.extra @@ -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