Make cc assemble with listing (temporary), truncate __cleanup to __cleanu
authorNick Downing <nick@ndcode.org>
Fri, 12 Aug 2022 07:06:38 +0000 (17:06 +1000)
committerNick Downing <nick@ndcode.org>
Fri, 12 Aug 2022 07:06:38 +0000 (17:06 +1000)
usr/src/cmd/a.sh
usr/src/cmd/cc.c
usr/src/libc/csu/fmcrt0.s
usr/src/libc/csu/mcrt0.s
usr/src/libc/gen/cuexit.s
usr/src/libc/gen/fakcu.s

index 37945c6..75d92f9 100755 (executable)
@@ -14,7 +14,9 @@ as -l -o dump.o dump.s
 #ld -bD=0x2800 -L/lib /lib/crt0.o -o dump -n -s -m1 -u -w dump.o -lc
 
 # use link order determined by l.sh
-ld -bD=0x2800 -L/lib /lib/crt0.o -o dump -n -s -m1 -u -w dump.o \
+ld -bD=0x2000 -o dump -m1 -u -w \
+../libc/crt0.o \
+dump.o \
 ../libc/printf.o \
 ../libc/doprnt.o \
 ../libc/ffltpr.o \
index 73da020..541ff09 100644 (file)
@@ -281,13 +281,17 @@ passa:
                        continue;
 assemble:
                av[0] = "as";
-#if 1 /* Nick */
+#if 0 /* Nick */
                av[1] = "-o";
                av[2] = setsuf(clist[i], 'o');
                av[3] = assource;
                av[4] = 0;
+#else
+#if 1 /* Nick */
+               av[1] = "-l";
 #else
                av[1] = "-u";
+#endif
                av[2] = "-o";
                av[3] = setsuf(clist[i], 'o');
                av[4] = assource;
index c44f25a..6348265 100644 (file)
@@ -16,7 +16,7 @@ signal        = 48
 .globl _exit
 .globl _environ
 .globl _etext
-.globl __cleanup
+.globl __cleanu
 .globl countbase
 .globl fptrap
 
@@ -83,7 +83,7 @@ start:
 _exit:
        mov     r5,-(sp)
        mov     sp,r5
-       jsr     pc,__cleanup
+       jsr     pc,__cleanu
        clr     -(sp)
        jsr     pc,_monitor
        tst     (sp)+
index 7eddb08..2ed6c76 100644 (file)
@@ -15,7 +15,7 @@ write = 4
 .globl _exit
 .globl _environ
 .globl _etext
-.globl __cleanup
+.globl __cleanu
 .globl countbase
 
 .area  text
@@ -78,7 +78,7 @@ start:
 _exit:
        mov     r5,-(sp)
        mov     sp,r5
-       jsr     pc,__cleanup
+       jsr     pc,__cleanu
        clr     -(sp)
        jsr     pc,_monitor
        tst     (sp)+
index e285508..3680ae0 100644 (file)
@@ -5,13 +5,13 @@
 ; code is return in r0 to system
 
 .globl _exit
-.globl __cleanup
+.globl __cleanu
 exit = 1
 
 _exit:
        mov     r5,-(sp)
        mov     sp,r5
-       jsr     pc,__cleanup
+       jsr     pc,__cleanu
        mov     4(r5),r0
        sys     exit
 
index dcf834f..a9a35bc 100644 (file)
@@ -2,7 +2,7 @@
 ;
 ; dummy cleanup routine if none supplied by user.
 
-.globl __cleanup
+.globl __cleanu
 
-__cleanup:
+__cleanu:
        rts     pc