From 194be5e0b7275a17ca51187cf3115a4baf11589c Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 15 Aug 2006 09:21:39 +0200 Subject: [PATCH 1/2] Moved o2bin.pl to UNUSED. --- src/stub/scripts/{ => UNUSED}/o2bin.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/stub/scripts/{ => UNUSED}/o2bin.pl (100%) diff --git a/src/stub/scripts/o2bin.pl b/src/stub/scripts/UNUSED/o2bin.pl similarity index 100% rename from src/stub/scripts/o2bin.pl rename to src/stub/scripts/UNUSED/o2bin.pl From 8f225431fe740c7d6786becff02bfa733f35a9b0 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 15 Aug 2006 10:23:45 +0200 Subject: [PATCH 2/2] Minor updates to Makefile and stubs. --- src/stub/Makefile | 23 +++++++++++++---------- src/stub/src/amd64-linux.elf-entry.S | 1 + src/stub/src/amd64-linux.elf-fold.S | 2 ++ src/stub/src/arch/i086/macros.ash | 1 + src/stub/src/arch/i386/macros2.ash | 1 + 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/stub/Makefile b/src/stub/Makefile index 60b69121..d1f65a5b 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -141,9 +141,9 @@ tc.default.pp-nasm = $(tc.default.gpp_inc) --mode=nasm -I$(srcdir)/ -I$(srcdi tc.default.sstrip = sstrip # some common settings for $(tc_list) -tc.arch-i086.app-nasm = perl -w $(srcdir)/src/arch/i086/app-nasm.pl +##tc.arch-i086.app-nasm = perl -w $(srcdir)/src/arch/i086/app-nasm.pl tc.arch-i086.gcc = i386-linux-gcc-3.4.6 -m32 -march=i386 -nostdinc -MMD -tc.arch-i386.app-nasm = perl -w $(srcdir)/src/arch/i386/app-nasm.pl +##tc.arch-i386.app-nasm = perl -w $(srcdir)/src/arch/i386/app-nasm.pl tc.arch-i386.gcc = i386-linux-gcc-3.4.6 -m32 -march=i386 -nostdinc -MMD @@ -620,18 +620,19 @@ i386-win32.pe.h : $(srcdir)/src/$$T.asm # ************************************************************************/ m68k-atari.tos-%.h : tc_list = m68k-atari.tos default +m68k-atari.tos-%.h : tc_bfdname = elf32-m68k -tc.m68k-atari.tos.app-a68k = perl -w $(srcdir)/src/arch/m68k/app-a68k.pl -#tc.m68k-atari.tos.asm-a68k = a68k +##tc.m68k-atari.tos.app-a68k = perl -w $(srcdir)/src/arch/m68k/app-a68k.pl +##tc.m68k-atari.tos.asm-a68k = a68k tc.m68k-atari.tos.pp-asm = gcc -E -nostdinc -x assembler-with-cpp -Wall -tc.m68k-atari.tos.asm-a68k = m68k-unknown-linux-gnu-as --register-prefix-optional +tc.m68k-atari.tos.asm-gas = m68k-unknown-linux-gnu-as --register-prefix-optional m68k-atari.tos-nrv%.h : $(srcdir)/src/m68k-atari.tos.asm # call gpp_inc to generate .d file $(call tc,gpp_inc) --mode=c --MMD=$@ --MF=tmp/$T.i.d $< -o /dev/null $(call tc,pp-asm) -D__GAS__ $(PP_FLAGS) $< -o tmp/$T.i ## $(call tc,asm-a68k) -q -ltmp/$T.o.lst tmp/$T.i -otmp/$T.o - $(call tc,asm-a68k) tmp/$T.i -o tmp/$T.bin + $(call tc,asm-gas) tmp/$T.i -o tmp/$T.bin ## $(call tc,o2bin) tmp/$T.o tmp/$T.bin 'UPX1' 'UPX9' $(call tc,m-objcopy) --strip-unneeded tmp/$T.bin $(call tc,m-objcopy) -R .text -R .data -R .bss tmp/$T.bin @@ -654,6 +655,7 @@ m68k-atari.tos-nrv2%.small.h : IDENT_SUFFIX = _small # ************************************************************************/ mipsel.r3000-ps1.h : tc_list = mipsel.r3000-ps1 default +mipsel.r3000-ps1.h : tc_bfdname = elf32-littlemips tc.mipsel.r3000-ps1.as = mipsel-elf-as -O2 -mno-pdr tc.mipsel.r3000-ps1.pp-asm = gcc -E -nostdinc -x assembler-with-cpp -Wall @@ -664,10 +666,11 @@ mipsel.r3000-ps1.h : $(srcdir)/src/mipsel.r3000-ps1.asm $(call tc,gpp_inc) --mode=c --MMD=$@ --MF=tmp/$T.tmp1.d $< -o /dev/null $(call tc,pp-asm) $(PP_FLAGS) $< -o tmp/$T.tmp1 $(call tc,as) tmp/$T.tmp1 -o tmp/$T.bin - $(call tc,m-objcopy) -F elf32-littlemips --strip-unneeded tmp/$T.bin - $(call tc,m-objcopy) -F elf32-littlemips -R .text -R .data -R .bss tmp/$T.bin - $(call tc,m-objcopy) -F elf32-littlemips -R .note -R .comment -R .reginfo tmp/$T.bin - $(call tc,m-objdump) -b elf32-littlemips -trwh tmp/$T.bin >> tmp/$T.bin + $(call tc,m-objcopy) --strip-unneeded tmp/$T.bin + $(call tc,m-objcopy) -R .text -R .data -R .bss tmp/$T.bin + $(call tc,m-objcopy) -R .note -R .comment tmp/$T.bin + $(call tc,m-objcopy) -R .reginfo tmp/$T.bin + $(call tc,m-objdump) -trwh tmp/$T.bin >> tmp/$T.bin $(call tc,bin2h) --ident=$(IDENT_NAME) tmp/$T.bin $@ mipsel.r3000-ps1.h: PP_FLAGS += -DPS1 diff --git a/src/stub/src/amd64-linux.elf-entry.S b/src/stub/src/amd64-linux.elf-entry.S index 352e1393..63fb1018 100644 --- a/src/stub/src/amd64-linux.elf-entry.S +++ b/src/stub/src/amd64-linux.elf-entry.S @@ -29,6 +29,7 @@ * */ + .code64 #include "arch/amd64/regs.h" sz_l_info= 12 diff --git a/src/stub/src/amd64-linux.elf-fold.S b/src/stub/src/amd64-linux.elf-fold.S index fce6e303..34ca0e78 100644 --- a/src/stub/src/amd64-linux.elf-fold.S +++ b/src/stub/src/amd64-linux.elf-fold.S @@ -26,6 +26,8 @@ * John F. Reiser * */ + + .code64 #include "arch/amd64/regs.h" PAGE_SHIFT= 12 diff --git a/src/stub/src/arch/i086/macros.ash b/src/stub/src/arch/i086/macros.ash index ac588ae5..02b88fb3 100644 --- a/src/stub/src/arch/i086/macros.ash +++ b/src/stub/src/arch/i086/macros.ash @@ -27,6 +27,7 @@ ; */ + .code16 .intel_syntax noprefix .macro section name diff --git a/src/stub/src/arch/i386/macros2.ash b/src/stub/src/arch/i386/macros2.ash index 96d9540a..6a38258d 100644 --- a/src/stub/src/arch/i386/macros2.ash +++ b/src/stub/src/arch/i386/macros2.ash @@ -27,6 +27,7 @@ ; */ + .code32 .intel_syntax noprefix .macro section name