OSDN Git Service

2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
authorjjohnstn <jjohnstn>
Thu, 7 Nov 2002 00:25:56 +0000 (00:25 +0000)
committerjjohnstn <jjohnstn>
Thu, 7 Nov 2002 00:25:56 +0000 (00:25 +0000)
        * arm/Makefile.in: Add support for new pid specs.
        * arm/coff-iq80310.specs: Change to allow future support.
        * arm/elf-iq80310.specs: Ditto.
        * arm/elf-redboot.specs: Ditto.
        * arm/coff-redboot.ld: Add EH frame support.
        * arm/redboot-crt0.S: Add optional code to clear bss without
        memset.
        * arm/coff-pid.specs: New file.
        * arm/elf-pid.specs: New file.

libgloss/ChangeLog
libgloss/arm/Makefile.in
libgloss/arm/coff-iq80310.specs
libgloss/arm/coff-pid.specs [new file with mode: 0644]
libgloss/arm/coff-redboot.ld
libgloss/arm/elf-iq80310.specs
libgloss/arm/elf-pid.specs [new file with mode: 0644]
libgloss/arm/elf-redboot.specs
libgloss/arm/redboot-crt0.S

index b7826ae..2820a0b 100644 (file)
@@ -1,4 +1,16 @@
 2002-11-08 Jeff Johnston  <jjohnstn@redhat.com> 
+
+       * arm/Makefile.in: Add support for new pid specs.
+       * arm/coff-iq80310.specs: Change to allow future support.
+       * arm/elf-iq80310.specs: Ditto.
+       * arm/elf-redboot.specs: Ditto.
+       * arm/coff-redboot.ld: Add EH frame support.
+       * arm/redboot-crt0.S: Add optional code to clear bss without
+       memset.
+       * arm/coff-pid.specs: New file.
+       * arm/elf-pid.specs: New file.
+
+2002-11-08 Jeff Johnston  <jjohnstn@redhat.com> 
           Catherine Moore  <clm@redhat.com>
 
         * m32r/configure.in:  Do not require gcc to be able to link an
index 9e3024f..97e3ad4 100644 (file)
@@ -47,15 +47,19 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
        then echo ${objroot}/../binutils/objcopy ; \
        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
 
-REDBOOT_OBJS   = redboot-crt0.o redboot-syscalls.o
+REDBOOT_OBJS   = redboot-crt0.o  redboot-syscalls.o
 REDBOOT_SCRIPTS        = redboot.ld redboot.specs
 REDBOOT_INSTALL        = install-redboot
 CFLAGS         = -g
 
-# Here is specific eval board stuff
+# Here is all of the eval board stuff
+PID_SCRIPTS    = pid.specs
+PID_INSTALL    = install-pid
+
 IQ80310_SCRIPTS        = iq80310.specs
 IQ80310_INSTALL        = install-iq80310
 
+
 # Host specific makefile fragment comes in here.
 @host_makefile_frag@
 
@@ -82,13 +86,16 @@ distclean maintainer-clean realclean: clean
        rm -f Makefile config.status *~
 
 .PHONY: install info install-info clean-info
-install: ${REDBOOT_INSTALL} ${IQ80310_INSTALL}
+install: ${REDBOOT_INSTALL} ${IQ80310_INSTALL}  ${PID_INSTALL}
 
 
 install-redboot:
        set -e; for x in ${REDBOOT_OBJS}; do ${INSTALL_DATA} $$x ${tooldir}/lib${MULTISUBDIR}/$$x; done
        set -e; for x in ${REDBOOT_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x ${tooldir}/lib${MULTISUBDIR}/$$x; done
 
+install-pid:
+       set -e; for x in ${PID_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x ${tooldir}/lib${MULTISUBDIR}/$$x; done
+
 install-iq80310:
        set -e; for x in ${IQ80310_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x ${tooldir}/lib${MULTISUBDIR}/$$x; done
 
index 30b43a6..2cd2d87 100644 (file)
@@ -4,5 +4,5 @@
 -T redboot.ld%s -Ttext 0xA0020000 %(old_link)
 
 *startfile:
-redboot-crt0%O%s redboot-syscalls%O%s
+%{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
 
diff --git a/libgloss/arm/coff-pid.specs b/libgloss/arm/coff-pid.specs
new file mode 100644 (file)
index 0000000..61bec3e
--- /dev/null
@@ -0,0 +1,8 @@
+%rename link                old_link
+
+*link:
+-T redboot.ld%s -Ttext 0x10000 %(old_link)
+
+*startfile:
+redboot-crt0%O%s redboot-syscalls%O%s
+
index 7223ed2..0c33c3b 100644 (file)
@@ -9,7 +9,7 @@ SECTIONS
      present): */
   .text  0x8000 : {
     *(.init)
-    *(.text)
+    *(.text*)
     *(.glue_7t)
     *(.glue_7)
     *(.rdata)
@@ -23,7 +23,12 @@ SECTIONS
   }
   .data 0x40000 + (. & 0xfffc0fff) : {
       __data_start__ = . ;
-    *(.data)
+    *(.data*)
+    *(.gcc_exc*)
+    ___EH_FRAME_BEGIN__ = . ;
+    *(.eh_fram*)
+    ___EH_FRAME_END__ = . ;
+    LONG(0);
      __data_end__ = . ;
      edata  =  .;
      _edata  =  .;
index abb4f3a..a016e88 100644 (file)
@@ -4,5 +4,5 @@
 -T redboot.ld%s -Ttext 0xA0020000 %(old_link)
 
 *startfile:
-crti%O%s crtbegin%O%s redboot-crt0%O%s redboot-syscalls%O%s
+crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
 
diff --git a/libgloss/arm/elf-pid.specs b/libgloss/arm/elf-pid.specs
new file mode 100644 (file)
index 0000000..c8a9f14
--- /dev/null
@@ -0,0 +1,8 @@
+%rename link                old_link
+
+*link:
+-T redboot.ld%s -Ttext 0x10000 %(old_link)
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
+
index 7d6061d..8a00c3b 100644 (file)
@@ -4,5 +4,5 @@
 -T redboot.ld%s -Ttext 0x20000 %(old_link)
 
 *startfile:
-crti%O%s crtbegin%O%s redboot-crt0%O%s redboot-syscalls%O%s
+crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
 
index e14559a..f2963ee 100644 (file)
@@ -1,4 +1,3 @@
-
        
     .file   "crt0.S"
        
 #endif
 
     .text
-     /*
-      * Setup the assembly entry point.
-      */
+     /* Setup the assembly entry point.  */
     .code 32
     .globl SYM_NAME(start)
     .globl SYM_NAME(_start)
 SYM_NAME(start):
 SYM_NAME(_start):
-       mov     fp, #0  /* Null frame pointer */
-       mov     r7, #0  /* Null frame pointer for Thumb */
+       mov     fp, #0  /* Null frame pointer */
+       mov     r7, #0  /* Null frame pointer for Thumb */
 
-       /* enable interrupts for gdb debugging */
+       /* Enable interrupts for gdb debugging.  */
        mrs    r0, cpsr
        bic    r0, r0, #0xC0
        msr    cpsr, r0
        
-       mov     a2, #0                  /* Second arg: fill value */
-       ldr     a1, .LC1                /* First arg: start of memory block */
+       mov     a2, #0                  /* Second arg: fill value */
+       ldr     a1, .LC1                /* First arg: start of memory block */
        ldr     a3, .LC2        
-       sub     a3, a3, a1              /* Third arg: length of block */
+       sub     a3, a3, a1              /* Third arg: length of block.  */
+
+#ifdef GCRT0
+       /* Zero out the bss without using memset. 
+          Using memset is bad because it may be instrumented for
+          profiling, but at this point, the profiling data structures
+          have not been set up. 
+          FIXME: This loop could be a lot more efficient.  */
+       subs    a3, a3, #0
+       beq     2f
+1:     strb    a2, [a1]
+       subs    a3, a3, #1
+       add     a1, a1, #1
+       bne     1b
+2:     
+       /* Nothing to left to clear.  */
+#endif
 
-#ifdef __thumb__               /* Enter Thumb mode.... */
-       add     a4, pc, #1      /* Get the address of the Thumb block */
-       bx      a4              /* Go there and start Thumb decoding  */
+#ifdef __thumb__               /* Enter Thumb mode. */
+       add     a4, pc, #1      /* Get the address of the Thumb block */
+       bx      a4              /* Go there and start Thumb decoding  */
 
        .code 16
        .global __change_mode
@@ -43,8 +56,9 @@ SYM_NAME(_start):
 __change_mode: 
 #endif
 
+#ifndef        GCRT0
        bl      SYM_NAME(memset)
-       
+#endif
        bl      SYM_NAME(__get_memtop)
        sub     r0, r0, #32
        mov     sp, r0
@@ -76,7 +90,6 @@ __change_mode:
 .Lfini:
        .word   SYM_NAME(_fini)
 #endif
-       
 #if 0
 #ifdef __thumb__
        .code 16