Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv28873 Modified Files: ChangeLog Added Files: dcload-ip-unabi.diff dcload-serial-unabi.diff mno-fpu-patch.diff sh-binutils-rel+arch.diff sh-gcc-vis+pic+arch.diff sh-glibc-2.2.2-misc.diff Log Message: Patches for binutils, gcc, dcload (IP and serial), and glibc --- NEW FILE --- diff -urN dcload-ip-1.0.0.orig/Makefile.cfg dcload-ip-1.0.0/Makefile.cfg --- dcload-ip-1.0.0.orig/Makefile.cfg Mon Feb 19 01:49:32 2001 +++ dcload-ip-1.0.0/Makefile.cfg Tue Mar 13 20:13:24 2001 @@ -13,10 +13,10 @@ #BFDINCLUDE = /include # sh-elf-stuff -TARGETCC = sh-elf-gcc +TARGETCC = sh4-linux-gcc TARGETCFLAGS = -O2 -ml -m4 # -Wall -TARGETOBJCOPY = sh-elf-objcopy -TARGETLD = sh-elf-ld +TARGETOBJCOPY = sh4-linux-objcopy +TARGETLD = sh4-linux-ld # the ip of your dreamcast - set to 0.0.0.0 if you want to use arp on pc DREAMCAST_IP = 0.0.0.0 @@ -27,4 +27,4 @@ #TOOLINSTALLDIR = /usr/local/dc/bin # uncomment this for cygwin -#EXECUTABLEEXTENSION = .exe \ No newline at end of file +#EXECUTABLEEXTENSION = .exe diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/1st_read.c dcload-ip-1.0.0/target-src/1st_read/1st_read.c --- dcload-ip-1.0.0.orig/target-src/1st_read/1st_read.c Mon Feb 19 00:51:07 2001 +++ dcload-ip-1.0.0/target-src/1st_read/1st_read.c Mon Feb 19 19:20:28 2001 @@ -32,12 +32,12 @@ #define TARGET1 (unsigned int *)0x8c004000 #define TARGET2 (unsigned int *)0x8c00f400 -extern unsigned int binary_dcload_bin_start; -extern unsigned int binary_dcload_bin_size; -extern unsigned int binary_exception_bin_start; -extern unsigned int binary_exception_bin_size; -extern unsigned int binary_title_bin_start; -extern unsigned int binary_title_bin_size; +extern unsigned int _binary_dcload_bin_start; +extern unsigned int _binary_dcload_bin_size; +extern unsigned int _binary_exception_bin_start; +extern unsigned int _binary_exception_bin_size; +extern unsigned int _binary_title_bin_start; +extern unsigned int _binary_title_bin_size; #define DISPMODE (volatile unsigned int *)0xa05f8044 #define DISPADDR1 (volatile unsigned int *)0xa05f8050 @@ -82,7 +82,7 @@ page[0] = (volatile unsigned int *)0xa5000000 + *DISPADDR1/4; page[1] = (volatile unsigned int *)0xa5000000 + *DISPADDR1/4 + 640*480; - memcpy(buffer, &binary_title_bin_start, &binary_title_bin_size); + memcpy(buffer, &_binary_title_bin_start, &_binary_title_bin_size); /* display */ @@ -108,8 +108,8 @@ } memset((volatile unsigned int *)0xa5000000, 0, 8*1024*1024); - memcpy(TARGET1, &binary_dcload_bin_start, &binary_dcload_bin_size); - memcpy(TARGET2, &binary_exception_bin_start, &binary_exception_bin_size); + memcpy(TARGET1, &_binary_dcload_bin_start, &_binary_dcload_bin_size); + memcpy(TARGET2, &_binary_exception_bin_start, &_binary_exception_bin_size); disable_cache(); (*(void (*)()) 0x8c004000) (); diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/Makefile dcload-ip-1.0.0/target-src/1st_read/Makefile --- dcload-ip-1.0.0.orig/target-src/1st_read/Makefile Mon Feb 19 00:56:00 2001 +++ dcload-ip-1.0.0/target-src/1st_read/Makefile Tue Mar 13 19:58:30 2001 @@ -26,10 +26,10 @@ cp $< $@ dcload.o: dcload.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch exception.o: exception.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch 1st_read.bin: 1st_read $(OBJCOPY) -O binary $<$(EXECUTABLEEXTENSION) $@ @@ -40,7 +40,7 @@ 1st_read.o: 1st_read.c title.o: title.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch .PHONY : clean clean: @@ -48,4 +48,4 @@ .PHONY : distclean distclean: clean - rm -f 1st_read.bin \ No newline at end of file + rm -f 1st_read.bin diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/asm.h dcload-ip-1.0.0/target-src/1st_read/asm.h --- dcload-ip-1.0.0.orig/target-src/1st_read/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/1st_read/asm.h Mon Feb 19 19:15:30 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/crt0.S dcload-ip-1.0.0/target-src/1st_read/crt0.S --- dcload-ip-1.0.0.orig/target-src/1st_read/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-ip-1.0.0/target-src/1st_read/crt0.S Mon Feb 19 19:16:14 2001 @@ -61,7 +61,7 @@ .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,14 +69,14 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: - .long _old_stack + .long old_stack old_pr_k: - .long _old_pr -_old_stack: + .long old_pr +old_stack: .long 0 -_old_pr: +old_pr: .long 0 setup_cache_k: .long setup_cache diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/dc.x dcload-ip-1.0.0/target-src/1st_read/dc.x --- dcload-ip-1.0.0.orig/target-src/1st_read/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-ip-1.0.0/target-src/1st_read/dc.x Tue Mar 13 19:56:01 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/disable.s dcload-ip-1.0.0/target-src/1st_read/disable.s --- dcload-ip-1.0.0.orig/target-src/1st_read/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/1st_read/disable.s Mon Feb 19 19:16:30 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/video.s dcload-ip-1.0.0/target-src/1st_read/video.s --- dcload-ip-1.0.0.orig/target-src/1st_read/video.s Sun Sep 17 19:04:33 2000 +++ dcload-ip-1.0.0/target-src/1st_read/video.s Mon Feb 19 19:15:17 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-ip-1.0.0.orig/target-src/dcload/Makefile dcload-ip-1.0.0/target-src/dcload/Makefile --- dcload-ip-1.0.0.orig/target-src/dcload/Makefile Mon Feb 19 01:00:59 2001 +++ dcload-ip-1.0.0/target-src/dcload/Makefile Tue Mar 13 19:57:30 2001 @@ -2,7 +2,7 @@ CC = $(TARGETCC) CFLAGS = $(TARGETCFLAGS) -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -INCLUDE = -I$(LZOPATH) -I../../target-inc +INCLUDE = -I. -I../../target-inc OBJCOPY = $(TARGETOBJCOPY) @@ -33,4 +33,4 @@ .PHONY : distclean distclean: clean - rm -f dcload.bin exception.bin \ No newline at end of file + rm -f dcload.bin exception.bin diff -urN dcload-ip-1.0.0.orig/target-src/dcload/asm.h dcload-ip-1.0.0/target-src/dcload/asm.h --- dcload-ip-1.0.0.orig/target-src/dcload/asm.h Fri Sep 15 04:19:03 2000 +++ dcload-ip-1.0.0/target-src/dcload/asm.h Mon Feb 19 19:07:46 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/dcload/bswap.s dcload-ip-1.0.0/target-src/dcload/bswap.s --- dcload-ip-1.0.0.orig/target-src/dcload/bswap.s Sun Feb 11 20:01:35 2001 +++ dcload-ip-1.0.0/target-src/dcload/bswap.s Mon Feb 19 19:09:34 2001 @@ -1,14 +1,14 @@ - .globl _bswap16, _bswap32 + .globl bswap16, bswap32 .text ! r4 = dest -_bswap16: +bswap16: rts swap.b r4,r0 -_bswap32: +bswap32: swap.b r4,r0 swap.w r0,r4 rts diff -urN dcload-ip-1.0.0.orig/target-src/dcload/cdfs_redir.s dcload-ip-1.0.0/target-src/dcload/cdfs_redir.s --- dcload-ip-1.0.0.orig/target-src/dcload/cdfs_redir.s Fri Sep 22 04:04:19 2000 +++ dcload-ip-1.0.0/target-src/dcload/cdfs_redir.s Mon Feb 19 19:11:26 2001 @@ -1,10 +1,10 @@ .section .text - .global _cdfs_redir_enable - .global _cdfs_redir_disable - .global _cdfs_redir_save + .global cdfs_redir_enable + .global cdfs_redir_disable + .global cdfs_redir_save .align 2 -_cdfs_redir_save: +cdfs_redir_save: mov.l cdfs_saved_k, r0 mov.l @r0, r0 tst r0,r0 @@ -17,7 +17,7 @@ rts nop -_cdfs_redir_disable: +cdfs_redir_disable: mov.l cdfs_saved_k, r0 mov.l @r0, r0 mov.l cdfs_entry_k, r1 @@ -25,7 +25,7 @@ rts nop -_cdfs_redir_enable: +cdfs_redir_enable: mov.l cdfs_entry_k, r0 mov.l cdfs_redir_k, r1 mov.l r1, @r0 @@ -58,17 +58,17 @@ nop gd_first_k: - .long gdGdcReqCmd -gdGdcReqCmd: .long _gdGdcReqCmd +_gdGdcReqCmd: + .long gdGdcReqCmd gdGdcGetCmdStat: - .long _gdGdcGetCmdStat + .long gdGdcGetCmdStat gdGdcExecServer: - .long _gdGdcExecServer + .long gdGdcExecServer gdGdcInitSystem: - .long _gdGdcInitSystem + .long gdGdcInitSystem gdGdcGetDrvStat: - .long _gdGdcGetDrvStat + .long gdGdcGetDrvStat gdGdcG1DmaEnd: .long badsyscall gdGdcReqDmaTrans: @@ -80,4 +80,4 @@ gdGdcReset: .long badsyscall gdGdcChangeDataType: - .long _gdGdcChangeDataType + .long gdGdcChangeDataType diff -urN dcload-ip-1.0.0.orig/target-src/dcload/dcload-crt0.s dcload-ip-1.0.0/target-src/dcload/dcload-crt0.s --- dcload-ip-1.0.0.orig/target-src/dcload/dcload-crt0.s Sun Feb 11 20:38:37 2001 +++ dcload-ip-1.0.0/target-src/dcload/dcload-crt0.s Mon Feb 19 19:14:57 2001 @@ -2,8 +2,8 @@ .section .text .global start - .global _atexit - .global _dcloadsyscall + .global atexit + .global dcloadsyscall start: bra realstart nop @@ -16,20 +16,20 @@ ! normal programs use this call dcloadsyscall_k: - .long _dcloadsyscall + .long dcloadsyscall ! exception handler uses these calls setup_video_k: - .long _setup_video + .long setup_video clrscr_k: - .long _clrscr + .long clrscr draw_string_k: - .long _draw_string + .long draw_string uint_to_string_k: - .long _uint_to_string + .long uint_to_string exc_to_string_k: - .long _exception_code_to_string + .long exception_code_to_string realstart: stc sr,r0 @@ -84,7 +84,7 @@ bra realstart nop -_atexit: +atexit: rts nop @@ -93,15 +93,15 @@ sr_mask: .long 0xefff7fff set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: - .long _edata + .long edata end_k: - .long _end + .long end main_k: - .long _main + .long main setup_cache_k: .long setup_cache start_2_k: @@ -113,7 +113,7 @@ ccr_data: .word 0x090b -_dcloadsyscall: +dcloadsyscall: mov.l dcloadmagic_k,r1 mov.l @r1,r1 mov.l correctmagic,r0 @@ -148,41 +148,41 @@ first_syscall: .long read_k read_k: - .long _read + .long read write_k: - .long _write + .long write open_k: - .long _open + .long open close_k: - .long _close + .long close creat_k: - .long _creat + .long creat link_k: - .long _link + .long link unlink_k: - .long _unlink + .long unlink chdir_k: - .long _chdir + .long chdir chmod_k: - .long _chmod + .long chmod lseek_k: - .long _lseek + .long lseek fstat_k: - .long _fstat + .long fstat time_k: - .long _time + .long time stat_k: - .long _stat + .long stat utime_k: - .long _utime + .long utime assign_wrkmem_k: .long badsyscall exit_k: - .long _dcexit + .long dcexit opendir_k: - .long _opendir + .long opendir closedir_k: - .long _closedir + .long closedir readdir_k: - .long _readdir - \ No newline at end of file + .long readdir + diff -urN dcload-ip-1.0.0.orig/target-src/dcload/dcload.x dcload-ip-1.0.0/target-src/dcload/dcload.x --- dcload-ip-1.0.0.orig/target-src/dcload/dcload.x Sun Feb 11 21:33:39 2001 +++ dcload-ip-1.0.0/target-src/dcload/dcload.x Tue Mar 13 19:55:35 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/dcload/disable.s dcload-ip-1.0.0/target-src/dcload/disable.s --- dcload-ip-1.0.0.orig/target-src/dcload/disable.s Fri Sep 15 04:19:03 2000 +++ dcload-ip-1.0.0/target-src/dcload/disable.s Mon Feb 19 19:08:43 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-ip-1.0.0.orig/target-src/dcload/go.s dcload-ip-1.0.0/target-src/dcload/go.s --- dcload-ip-1.0.0.orig/target-src/dcload/go.s Wed Aug 23 05:41:47 2000 +++ dcload-ip-1.0.0/target-src/dcload/go.s Mon Feb 19 19:07:29 2001 @@ -1,7 +1,7 @@ .section .text - .global _go + .global go -_go: +go: mov.l stack_addr_k,r0 mov.l @r0,r15 mov.l entry_addr_k,r0 @@ -54,4 +54,4 @@ .long fpscr_data fpscr_data: .long 0x40001 - \ No newline at end of file + diff -urN dcload-ip-1.0.0.orig/target-src/dcload/video.s dcload-ip-1.0.0/target-src/dcload/video.s --- dcload-ip-1.0.0.orig/target-src/dcload/video.s Sat Aug 26 05:52:53 2000 +++ dcload-ip-1.0.0/target-src/dcload/video.s Mon Feb 19 19:07:11 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-ip-1.0.0.orig/target-src/quick/1st_read.c dcload-ip-1.0.0/target-src/quick/1st_read.c --- dcload-ip-1.0.0.orig/target-src/quick/1st_read.c Sun Feb 11 20:57:59 2001 +++ dcload-ip-1.0.0/target-src/quick/1st_read.c Tue Mar 13 20:05:16 2001 @@ -24,15 +24,15 @@ extern void disable_cache(void); -extern unsigned int binary_dcload_bin_start; -extern unsigned int binary_dcload_bin_size; -extern unsigned int binary_exception_bin_start; -extern unsigned int binary_exception_bin_size; +extern unsigned int _binary_dcload_bin_start; +extern unsigned int _binary_dcload_bin_size; +extern unsigned int _binary_exception_bin_start; +extern unsigned int _binary_exception_bin_size; int main(void) { - memcpy(TARGET1, &binary_dcload_bin_start, &binary_dcload_bin_size); - memcpy(TARGET2, &binary_exception_bin_start, &binary_exception_bin_size); + memcpy(TARGET1, &_binary_dcload_bin_start, &_binary_dcload_bin_size); + memcpy(TARGET2, &_binary_exception_bin_start, &_binary_exception_bin_size); disable_cache(); (*(void (*)()) 0x8c004000) (); diff -urN dcload-ip-1.0.0.orig/target-src/quick/Makefile dcload-ip-1.0.0/target-src/quick/Makefile --- dcload-ip-1.0.0.orig/target-src/quick/Makefile Mon Feb 19 00:57:30 2001 +++ dcload-ip-1.0.0/target-src/quick/Makefile Tue Mar 13 20:03:02 2001 @@ -3,6 +3,7 @@ CC = $(TARGETCC) CFLAGS = $(TARGETCFLAGS) INCLUDE = -I../../target-inc +LD = $(TARGETLD) OBJCOPY = $(TARGETOBJCOPY) OBJECTS = crt0.o 1st_read.o disable.o memcpy.o dcload.o exception.o @@ -25,10 +26,10 @@ cp $< $@ dcload.o: dcload.bin - sh-elf-ld -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch exception.o: exception.bin - sh-elf-ld -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch 1st_read.bin: 1st_read $(OBJCOPY) -O binary $<$(EXECUTABLEEXTENSION) $@ @@ -45,4 +46,4 @@ .PHONY : distclean distclean: clean - rm -f 1st_read.bin 1st_read.srec \ No newline at end of file + rm -f 1st_read.bin 1st_read.srec diff -urN dcload-ip-1.0.0.orig/target-src/quick/asm.h dcload-ip-1.0.0/target-src/quick/asm.h --- dcload-ip-1.0.0.orig/target-src/quick/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/quick/asm.h Tue Mar 13 19:48:55 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/quick/crt0.S dcload-ip-1.0.0/target-src/quick/crt0.S --- dcload-ip-1.0.0.orig/target-src/quick/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-ip-1.0.0/target-src/quick/crt0.S Tue Mar 13 20:04:17 2001 @@ -61,7 +61,7 @@ .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,14 +69,14 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: - .long _old_stack + .long old_stack old_pr_k: - .long _old_pr -_old_stack: + .long old_pr +old_stack: .long 0 -_old_pr: +old_pr: .long 0 setup_cache_k: .long setup_cache diff -urN dcload-ip-1.0.0.orig/target-src/quick/dc.x dcload-ip-1.0.0/target-src/quick/dc.x --- dcload-ip-1.0.0.orig/target-src/quick/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-ip-1.0.0/target-src/quick/dc.x Tue Mar 13 19:56:24 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/quick/disable.s dcload-ip-1.0.0/target-src/quick/disable.s --- dcload-ip-1.0.0.orig/target-src/quick/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/quick/disable.s Tue Mar 13 19:49:18 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: --- NEW FILE --- diff -urN dcload-1.0.2c.orig/Makefile.cfg dcload-1.0.2c/Makefile.cfg --- dcload-1.0.2c.orig/Makefile.cfg Tue Mar 13 20:48:40 2001 +++ dcload-1.0.2c/Makefile.cfg Tue Mar 13 21:09:25 2001 @@ -11,9 +11,9 @@ #BFDINCLUDE = ???? # sh-elf-stuff -TARGETCC = sh-elf-gcc +TARGETCC = sh4-linux-gcc TARGETCFLAGS = -O2 -ml -m4 # -Wall -TARGETOBJCOPY = sh-elf-objcopy +TARGETOBJCOPY = sh4-linux-objcopy # WARNING: 115200 apparently does NOT work for most people #SERIALSPEED = 115200 @@ -27,4 +27,4 @@ #TOOLINSTALLDIR = /usr/local/dc/bin # uncomment this for cygwin -#EXECUTABLEEXTENSION = .exe \ No newline at end of file +#EXECUTABLEEXTENSION = .exe diff -urN dcload-1.0.2c.orig/example-src/crt0.S dcload-1.0.2c/example-src/crt0.S --- dcload-1.0.2c.orig/example-src/crt0.S Sun Sep 17 22:20:05 2000 +++ dcload-1.0.2c/example-src/crt0.S Tue Mar 13 21:07:42 2001 @@ -1,7 +1,7 @@ .section .text .global start - .global ___exit - .global _atexit + .global __exit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -58,7 +58,7 @@ jsr @r0 or r0,r0 -___exit: +__exit: mov.l old_pr_k,r14 mov.l @r14,r15 lds r15,pr @@ -67,14 +67,14 @@ rts nop -_atexit: +atexit: rts nop .align 4 #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr #endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */ stack_k: .long _stack @@ -83,9 +83,9 @@ end_k: .long _end main_k: - .long _main + .long main exit_k: - .long _exit + .long exit old_stack_k: .long _old_stack diff -urN dcload-1.0.2c.orig/example-src/dc.x dcload-1.0.2c/example-src/dc.x --- dcload-1.0.2c.orig/example-src/dc.x Sun Sep 17 22:21:16 2000 +++ dcload-1.0.2c/example-src/dc.x Tue Mar 13 21:06:49 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/example-src/dcload-syscall.s dcload-1.0.2c/example-src/dcload-syscall.s --- dcload-1.0.2c.orig/example-src/dcload-syscall.s Sun Sep 17 21:58:16 2000 +++ dcload-1.0.2c/example-src/dcload-syscall.s Tue Mar 13 21:08:07 2001 @@ -1,6 +1,6 @@ .section .text - .global _dcloadsyscall -_dcloadsyscall: + .global dcloadsyscall +dcloadsyscall: mov.l dcloadsyscall_k,r0 mov.l @r0,r0 jmp @r0 Binary files dcload-1.0.2c.orig/host-src/misc/bin2inc and dcload-1.0.2c/host-src/misc/bin2inc differ Binary files dcload-1.0.2c.orig/host-src/misc/lzo and dcload-1.0.2c/host-src/misc/lzo differ Binary files dcload-1.0.2c.orig/host-src/tool/dc-tool and dcload-1.0.2c/host-src/tool/dc-tool differ diff -urN dcload-1.0.2c.orig/target-src/1st_read/asm.h dcload-1.0.2c/target-src/1st_read/asm.h --- dcload-1.0.2c.orig/target-src/1st_read/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/1st_read/asm.h Tue Mar 13 21:04:38 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/1st_read/crt0.S dcload-1.0.2c/target-src/1st_read/crt0.S --- dcload-1.0.2c.orig/target-src/1st_read/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-1.0.2c/target-src/1st_read/crt0.S Tue Mar 13 21:05:14 2001 @@ -1,6 +1,6 @@ .section .text .global start - .global _atexit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -55,13 +55,13 @@ mov.l old_stack_k,r14 mov.l @r14,r15 -_atexit: +atexit: rts nop .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,7 +69,7 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: .long _old_stack old_pr_k: diff -urN dcload-1.0.2c.orig/target-src/1st_read/dc.x dcload-1.0.2c/target-src/1st_read/dc.x --- dcload-1.0.2c.orig/target-src/1st_read/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-1.0.2c/target-src/1st_read/dc.x Tue Mar 13 20:51:59 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/1st_read/disable.s dcload-1.0.2c/target-src/1st_read/disable.s --- dcload-1.0.2c.orig/target-src/1st_read/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/1st_read/disable.s Tue Mar 13 21:04:38 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-1.0.2c.orig/target-src/1st_read/video.s dcload-1.0.2c/target-src/1st_read/video.s --- dcload-1.0.2c.orig/target-src/1st_read/video.s Sun Sep 17 19:04:33 2000 +++ dcload-1.0.2c/target-src/1st_read/video.s Tue Mar 13 21:04:44 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-1.0.2c.orig/target-src/dcload/asm.h dcload-1.0.2c/target-src/dcload/asm.h --- dcload-1.0.2c.orig/target-src/dcload/asm.h Fri Sep 15 04:19:03 2000 +++ dcload-1.0.2c/target-src/dcload/asm.h Tue Mar 13 20:56:22 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/dcload/cdfs_redir.s dcload-1.0.2c/target-src/dcload/cdfs_redir.s --- dcload-1.0.2c.orig/target-src/dcload/cdfs_redir.s Fri Sep 22 04:04:19 2000 +++ dcload-1.0.2c/target-src/dcload/cdfs_redir.s Tue Mar 13 20:56:01 2001 @@ -1,10 +1,10 @@ .section .text - .global _cdfs_redir_enable - .global _cdfs_redir_disable - .global _cdfs_redir_save + .global cdfs_redir_enable + .global cdfs_redir_disable + .global cdfs_redir_save .align 2 -_cdfs_redir_save: +cdfs_redir_save: mov.l cdfs_saved_k, r0 mov.l @r0, r0 tst r0,r0 @@ -17,7 +17,7 @@ rts nop -_cdfs_redir_disable: +cdfs_redir_disable: mov.l cdfs_saved_k, r0 mov.l @r0, r0 mov.l cdfs_entry_k, r1 @@ -25,7 +25,7 @@ rts nop -_cdfs_redir_enable: +cdfs_redir_enable: mov.l cdfs_entry_k, r0 mov.l cdfs_redir_k, r1 mov.l r1, @r0 @@ -58,26 +58,26 @@ nop gd_first_k: + .long gdGdcReqCmd_k +gdGdcReqCmd_k: .long gdGdcReqCmd -gdGdcReqCmd: - .long _gdGdcReqCmd -gdGdcGetCmdStat: - .long _gdGdcGetCmdStat -gdGdcExecServer: - .long _gdGdcExecServer -gdGdcInitSystem: - .long _gdGdcInitSystem -gdGdcGetDrvStat: - .long _gdGdcGetDrvStat -gdGdcG1DmaEnd: +gdGdcGetCmdStat_k: + .long gdGdcGetCmdStat +gdGdcExecServer_k: + .long gdGdcExecServer +gdGdcInitSystem_k: + .long gdGdcInitSystem +gdGdcGetDrvStat_k: + .long gdGdcGetDrvStat +gdGdcG1DmaEnd_k: .long badsyscall -gdGdcReqDmaTrans: +gdGdcReqDmaTrans_k: .long badsyscall -gdGdcCheckDmaTrans: +gdGdcCheckDmaTrans_k: .long badsyscall -gdGdcReadAbort: +gdGdcReadAbort_k: .long badsyscall -gdGdcReset: +gdGdcReset_k: .long badsyscall -gdGdcChangeDataType: - .long _gdGdcChangeDataType +gdGdcChangeDataType_k: + .long gdGdcChangeDataType diff -urN dcload-1.0.2c.orig/target-src/dcload/dcload-crt0.s dcload-1.0.2c/target-src/dcload/dcload-crt0.s --- dcload-1.0.2c.orig/target-src/dcload/dcload-crt0.s Sun Sep 24 23:39:11 2000 +++ dcload-1.0.2c/target-src/dcload/dcload-crt0.s Tue Mar 13 21:03:59 2001 @@ -2,8 +2,8 @@ .section .text .global start - .global _atexit - .global _dcloadsyscall + .global atexit + .global dcloadsyscall start: bra realstart nop @@ -16,20 +16,20 @@ ! normal programs use this call dcloadsyscall_k: - .long _dcloadsyscall + .long dcloadsyscall ! exception handler uses these calls setup_video_k: - .long _setup_video + .long setup_video clrscr_k: - .long _clrscr + .long clrscr draw_string_k: - .long _draw_string + .long draw_string uint_to_string_k: - .long _uint_to_string + .long uint_to_string exc_to_string_k: - .long _exception_code_to_string + .long exception_code_to_string realstart: stc sr,r0 @@ -84,7 +84,7 @@ bra realstart nop -_atexit: +atexit: rts nop @@ -93,7 +93,7 @@ sr_mask: .long 0xefff7fff set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -101,7 +101,7 @@ end_k: .long _end main_k: - .long _main + .long main setup_cache_k: .long setup_cache start_2_k: @@ -113,7 +113,7 @@ ccr_data: .word 0x090b -_dcloadsyscall: +dcloadsyscall: mov.l dcloadmagic_k,r1 mov.l @r1,r1 mov.l correctmagic,r0 @@ -148,41 +148,41 @@ first_syscall: .long read_k read_k: - .long _read + .long read write_k: - .long _write + .long write open_k: - .long _open + .long open close_k: - .long _close + .long close creat_k: - .long _creat + .long creat link_k: - .long _link + .long link unlink_k: - .long _unlink + .long unlink chdir_k: - .long _chdir + .long chdir chmod_k: - .long _chmod + .long chmod lseek_k: - .long _lseek + .long lseek fstat_k: - .long _fstat + .long fstat time_k: - .long _time + .long time stat_k: - .long _stat + .long stat utime_k: - .long _utime + .long utime assign_wrkmem_k: - .long _assign_wrkmem + .long assign_wrkmem exit_k: - .long _dcexit + .long dcexit opendir_k: - .long _opendir + .long opendir closedir_k: - .long _closedir + .long closedir readdir_k: - .long _readdir - \ No newline at end of file + .long readdir + diff -urN dcload-1.0.2c.orig/target-src/dcload/dcload.x dcload-1.0.2c/target-src/dcload/dcload.x --- dcload-1.0.2c.orig/target-src/dcload/dcload.x Mon Aug 28 04:37:55 2000 +++ dcload-1.0.2c/target-src/dcload/dcload.x Tue Mar 13 20:49:34 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/dcload/disable.s dcload-1.0.2c/target-src/dcload/disable.s --- dcload-1.0.2c.orig/target-src/dcload/disable.s Fri Sep 15 04:19:03 2000 +++ dcload-1.0.2c/target-src/dcload/disable.s Tue Mar 13 20:58:51 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-1.0.2c.orig/target-src/dcload/go.s dcload-1.0.2c/target-src/dcload/go.s --- dcload-1.0.2c.orig/target-src/dcload/go.s Wed Aug 23 05:41:47 2000 +++ dcload-1.0.2c/target-src/dcload/go.s Tue Mar 13 21:01:31 2001 @@ -1,7 +1,7 @@ .section .text - .global _go + .global go -_go: +go: mov.l stack_addr_k,r0 mov.l @r0,r15 mov.l entry_addr_k,r0 @@ -54,4 +54,4 @@ .long fpscr_data fpscr_data: .long 0x40001 - \ No newline at end of file + diff -urN dcload-1.0.2c.orig/target-src/dcload/video.s dcload-1.0.2c/target-src/dcload/video.s --- dcload-1.0.2c.orig/target-src/dcload/video.s Sat Aug 26 05:52:53 2000 +++ dcload-1.0.2c/target-src/dcload/video.s Tue Mar 13 20:57:56 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-1.0.2c.orig/target-src/quick/asm.h dcload-1.0.2c/target-src/quick/asm.h --- dcload-1.0.2c.orig/target-src/quick/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/quick/asm.h Tue Mar 13 21:05:59 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/quick/crt0.S dcload-1.0.2c/target-src/quick/crt0.S --- dcload-1.0.2c.orig/target-src/quick/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-1.0.2c/target-src/quick/crt0.S Tue Mar 13 21:05:52 2001 @@ -1,6 +1,6 @@ .section .text .global start - .global _atexit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -55,13 +55,13 @@ mov.l old_stack_k,r14 mov.l @r14,r15 -_atexit: +atexit: rts nop .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,7 +69,7 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: .long _old_stack old_pr_k: diff -urN dcload-1.0.2c.orig/target-src/quick/dc.x dcload-1.0.2c/target-src/quick/dc.x --- dcload-1.0.2c.orig/target-src/quick/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-1.0.2c/target-src/quick/dc.x Tue Mar 13 20:52:18 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/quick/disable.s dcload-1.0.2c/target-src/quick/disable.s --- dcload-1.0.2c.orig/target-src/quick/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/quick/disable.s Tue Mar 13 21:06:06 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: --- NEW FILE --- diff -urN -x CVS gcc.orig/gcc/config/sh/linux.h gcc/gcc/config/sh/linux.h --- gcc.orig/gcc/config/sh/linux.h Thu Nov 2 17:29:13 2000 +++ gcc/gcc/config/sh/linux.h Tue Feb 20 15:00:58 2001 @@ -45,7 +45,8 @@ %{!mb:-D__LITTLE_ENDIAN__} \ %{m3e:-D__SH3E__} \ %{m4:-D__SH4__} \ - %{!m3e:%{!m4:-D__SH3__ -D__sh3__}} \ + %{m4-nofpu:-D__SH4__ -D__SH4_NOFPU__} \ + %{!m3e:%{!m4:%{!m4-nofpu:-D__SH3__ -D__sh3__}}} \ %{fPIC:-D__PIC__ -D__pic__} \ %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE} \ @@ -59,11 +60,11 @@ #undef CC1_SPEC #define CC1_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m3e:%{!m4:%{!m4-nofpu:-m3}}}" #undef CC1PLUS_SPEC #define CC1PLUS_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m3e:%{!m4:%{!m4-nofpu:-m3}}}" #undef LINK_SPEC #define LINK_SPEC \ @@ -71,7 +72,7 @@ %{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ %{!rpath:-rpath /lib}} \ %{static:-static}" --- NEW FILE --- diff -urN -x CVS binutils.orig/bfd/config.bfd binutils/bfd/config.bfd --- binutils.orig/bfd/config.bfd Thu Feb 22 10:38:45 2001 +++ binutils/bfd/config.bfd Wed Mar 7 00:21:09 2001 @@ -49,6 +49,7 @@ powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; s390*) targ_archs=bfd_s390_arch ;; rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +sh*) targ_archs=bfd_sh_arch ;; sparc*) targ_archs=bfd_sparc_arch ;; v850*) targ_archs=bfd_v850_arch ;; z8k*) targ_archs=bfd_z8k_arch ;; @@ -742,9 +743,14 @@ ;; #endif - sh-*-linux*) + sh*eb-*-linux*) targ_defvec=bfd_elf32_shblin_vec targ_selvecs=bfd_elf32_shlin_vec + ;; + + sh*-*-linux*) + targ_defvec=bfd_elf32_shlin_vec + targ_selvecs=bfd_elf32_shblin_vec ;; sh-*-elf* | sh-*-rtemself*) diff -urN -x CVS binutils.orig/bfd/elf32-sh.c binutils/bfd/elf32-sh.c --- binutils.orig/bfd/elf32-sh.c Tue Jan 23 05:45:53 2001 +++ binutils/bfd/elf32-sh.c Tue Mar 6 14:01:45 2001 @@ -120,8 +120,8 @@ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_REL32", /* name */ - false, /* partial_inplace */ - 0, /* src_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ @@ -2937,7 +2937,11 @@ section symbol winds up in the output section. */ sym = local_syms + r_symndx; if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - goto final_link_relocate; + { + r = _bfd_relocate_contents (howto, input_bfd, relocation, + contents + rel->r_offset); + goto relocation_done; + } continue; } @@ -3108,9 +3112,11 @@ else if (r_type == R_SH_REL32) { BFD_ASSERT (h != NULL && h->dynindx != -1); + addend = bfd_get_32 (input_bfd, + (bfd_byte *) contents + rel->r_offset); relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_REL32); - outrel.r_addend = rel->r_addend; + outrel.r_addend = addend; } else { @@ -3123,14 +3129,17 @@ { relocate = true; outrel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = 0; } else { BFD_ASSERT (h->dynindx != -1); + addend = bfd_get_32 (input_bfd, + ((bfd_byte *) contents + + rel->r_offset)); relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_DIR32); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = relocation + addend; } } @@ -3228,7 +3237,7 @@ + sgot->output_offset + off); outrel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - outrel.r_addend = relocation; + outrel.r_addend = 0; bfd_elf32_swap_reloca_out (output_bfd, &outrel, (((Elf32_External_Rela *) srelgot->contents) @@ -3328,6 +3337,7 @@ } } + relocation_done: if (r != bfd_reloc_ok) { switch (r) @@ -4094,9 +4104,7 @@ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) { rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - rel.r_addend = (h->root.u.def.value - + h->root.u.def.section->output_section->vma - + h->root.u.def.section->output_offset); + rel.r_addend = 0; } else { diff -urN -x CVS binutils.orig/config.sub binutils/config.sub --- binutils.orig/config.sub Fri Feb 9 18:55:46 2001 +++ binutils/config.sub Wed Mar 7 00:08:00 2001 @@ -224,7 +224,7 @@ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] | sh[34]eb \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ diff -urN -x CVS binutils.orig/gas/config/tc-sh.c binutils/gas/config/tc-sh.c --- binutils.orig/gas/config/tc-sh.c Fri Feb 9 12:21:42 2001 +++ binutils/gas/config/tc-sh.c Tue Mar 6 23:09:26 2001 @@ -57,7 +57,11 @@ symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ #endif +#ifdef TARGET_BYTES_BIG_ENDIAN +int shl = !TARGET_BYTES_BIG_ENDIAN; +#else int shl = 0; +#endif static void little (ignore) @@ -462,7 +466,7 @@ /* Try to parse a reg name. Return the number of chars consumed. */ static int -parse_reg (src, mode, reg) +parse_reg_without_prefix (src, mode, reg) char *src; int *mode; int *reg; @@ -814,6 +818,26 @@ return 0; } +static int +parse_reg (src, mode, reg) + char *src; + int *mode; + int *reg; +{ + int prefix; + + if (src[0] == '$') + { + src++; + prefix = 1; + } + else + prefix = 0; + + return prefix + parse_reg_without_prefix (src, mode, reg); +} + + static symbolS * dot () { @@ -2122,11 +2146,13 @@ { #define OPTION_RELAX (OPTION_MD_BASE) #define OPTION_LITTLE (OPTION_MD_BASE + 1) -#define OPTION_SMALL (OPTION_LITTLE + 1) +#define OPTION_BIG (OPTION_LITTLE + 1) +#define OPTION_SMALL (OPTION_BIG + 1) #define OPTION_DSP (OPTION_SMALL + 1) {"relax", no_argument, NULL, OPTION_RELAX}, {"little", no_argument, NULL, OPTION_LITTLE}, + {"big", no_argument, NULL, OPTION_BIG}, {"small", no_argument, NULL, OPTION_SMALL}, {"dsp", no_argument, NULL, OPTION_DSP}, {NULL, no_argument, NULL, 0} @@ -2149,6 +2175,11 @@ target_big_endian = 0; break; + case OPTION_BIG: + shl = 0; + target_big_endian = 1; + break; + case OPTION_SMALL: sh_small = 1; break; @@ -2171,6 +2202,7 @@ fprintf (stream, _("\ SH options:\n\ -little generate little endian code\n\ +-big generate big endian code\n\ -relax alter jump instructions for long displacements\n\ -small align sections to 4 byte boundaries, not 16\n\ -dsp enable sh-dsp insns, and disable sh3e / sh4 insns.\n")); @@ -2825,6 +2857,12 @@ && fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy)) val -= S_GET_VALUE (fixP->fx_addsy); +#if 1 + if (OUTPUT_FLAVOR == bfd_target_elf_flavour + && fixP->fx_r_type == BFD_RELOC_32_PCREL + && fixP->fx_addsy != NULL) + val += fixP->fx_where + fixP->fx_frag->fr_address; +#endif #endif #ifndef BFD_ASSEMBLER diff -urN -x CVS binutils.orig/gas/config/tc-sh.h binutils/gas/config/tc-sh.h --- binutils.orig/gas/config/tc-sh.h Thu Dec 28 04:07:56 2000 +++ binutils/gas/config/tc-sh.h Wed Mar 7 00:04:37 2001 @@ -20,8 +20,6 @@ #define TC_SH -#define TARGET_BYTES_BIG_ENDIAN 0 - #define TARGET_ARCH bfd_arch_sh #if ANSI_PROTOTYPES diff -urN -x CVS binutils.orig/gas/configure binutils/gas/configure --- binutils.orig/gas/configure Tue Feb 27 00:43:54 2001 +++ binutils/gas/configure Tue Mar 6 14:29:06 2001 @@ -2280,6 +2280,8 @@ powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; + sh*eb) cpu_type=sh endian=big ;; + sh*) cpu_type=sh endian=little ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; sparclite*) cpu_type=sparc arch=sparclite ;; diff -urN -x CVS binutils.orig/gas/configure.in binutils/gas/configure.in --- binutils.orig/gas/configure.in Tue Feb 27 00:43:54 2001 +++ binutils/gas/configure.in Tue Mar 6 14:28:21 2001 @@ -142,6 +142,8 @@ powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; + sh*eb) cpu_type=sh endian=big ;; + sh*) cpu_type=sh endian=little ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; sparclite*) cpu_type=sparc arch=sparclite ;; diff -urN -x CVS binutils.orig/ld/configure.tgt binutils/ld/configure.tgt --- binutils.orig/ld/configure.tgt Thu Feb 22 11:24:32 2001 +++ binutils/ld/configure.tgt Tue Mar 6 23:01:13 2001 @@ -209,9 +209,13 @@ targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" ;; -sh-*-linux*) +sh*eb-*-linux*) targ_emul=shelf_linux targ_extra_emuls=shlelf_linux + ;; +sh*-*-linux*) + targ_emul=shlelf_linux + targ_extra_emuls=shelf_linux ;; sh-*-elf* | sh-*-rtemself*) targ_emul=shelf --- NEW FILE --- diff -urN -x CVS gcc-20001120.orig/config.sub gcc-20001120/config.sub --- gcc-20001120.orig/config.sub Mon Nov 6 13:20:24 2000 +++ gcc-20001120/config.sub Wed Mar 7 00:35:08 2001 @@ -219,7 +219,7 @@ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] | sh[34]eb \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ @@ -262,7 +262,7 @@ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ [...2844 lines suppressed...] + if (! TREE_PUBLIC (decl)) + error_with_decl (decl, "Declaration with symbol visibility of `%s' must be public"); + else if (TREE_ASM_WRITTEN (decl)) + error_with_decl (decl, "Declaration with symbol visibility of `%s' must precede definition"); +#ifdef ASM_LABEL_WITH_VISIBILITY + else + { + const char *name; + + make_decl_rtl (decl, (char *) 0, 1); + name = XSTR (XEXP (DECL_RTL (decl), 0), 0); + ASM_LABEL_WITH_VISIBILITY(asm_out_file, name, + IDENTIFIER_POINTER (visibility)); + } +#endif +} + void init_varasm_once () { --- NEW FILE --- diff -urN -x CVS glibc-2.2.2.orig/linuxthreads_db/thread_dbP.h glibc-2.2.2/linuxthreads_db/thread_dbP.h --- glibc-2.2.2.orig/linuxthreads_db/thread_dbP.h Mon Nov 22 14:52:54 1999 +++ glibc-2.2.2/linuxthreads_db/thread_dbP.h Wed Mar 7 01:47:28 2001 @@ -2,6 +2,7 @@ #ifndef _THREAD_DBP_H #define _THREAD_DBP_H 1 +#include <netinet/in.h> #include <string.h> #include "proc_service.h" #include "thread_db.h" diff -urN -x CVS glibc-2.2.2.orig/scripts/config.sub glibc-2.2.2/scripts/config.sub --- glibc-2.2.2.orig/scripts/config.sub Wed Nov 22 12:59:52 2000 +++ glibc-2.2.2/scripts/config.sub Wed Mar 7 01:48:44 2001 @@ -254,7 +254,7 @@ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp11-* | sh-* | sh[34]-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ @@ -735,6 +735,12 @@ sh) basic_machine=sh-hitachi os=-hms + ;; + sh3eb) + basic_machine=sh3-unknown + ;; + sh4eb) + basic_machine=sh4-unknown ;; sparclite-wrs) basic_machine=sparclite-wrs Index: ChangeLog =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ChangeLog 2001/03/06 00:32:16 1.1 --- ChangeLog 2001/03/14 22:29:44 1.2 *************** *** 1,2 **** --- 1,8 ---- + 2001-03-14 M. R. Brown <mr...@li...> + + * mno-fpu-patch.diff, sh-binutils-rel+arch.diff, + sh-gcc-vis+pic+arch.diff, sh-glibc-2.2.2-misc.diff: New files. + * dcload-ip-unabi.diff, dcload-serial-unabi.diff + 2001-03-05 M. R. Brown <mr...@0x...> |