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.
This commit is contained in:
Jeff Johnston 2002-11-07 00:25:57 +00:00
parent c27382bdbe
commit 5b30331167
9 changed files with 76 additions and 23 deletions

View File

@ -1,3 +1,15 @@
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>

View 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

View 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

View File

@ -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

View 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 = .;

View 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

View File

@ -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

View 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

View File

@ -1,4 +1,3 @@
.file "crt0.S"
@ -12,30 +11,44 @@
#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 __thumb__ /* Enter Thumb mode.... */
add a4, pc, #1 /* Get the address of the Thumb block */
bx a4 /* Go there and start Thumb decoding */
#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. */
.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