This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi Kai and everyone, Kai writes: > You can easily see what it REALLY does by substituting the '-v' with > '-verbose'. Thank you for pointing out the usefulness of the -verbose flag. It definitely helped me find a 'duh' error - I had neglected to put a reference to hello.o on the ld line - which explains why it was having trouble with 'main'. I have rectified that and have produced an S-record file on the unix side where I have referenced the windows libraries. I am enclosing the resulting ld maps (using the -verbose flag) from the windows compile (hell1.map) and the unix compile (hello.map). I will try downloading the resulting file to the board to see if it works. However, something that Joel pointed out yesterday is still a problem. (There also may be other problems, but I am just now starting to learn how to read and use a .map file!) Here are some snippets from the .map files that show a problem with the definition of the vector*defaults. Here is a snippet from the map file produced under windows: ----------------------------- clip ------------------------------ .text 0x00090000 0x5580 0x00090000 0x4 LONG 0xbeefbeef 0x00090004 0x4 LONG 0x7ffc __stack 0x00090008 0x4 LONG 0x90010 __prog_start 0x0009000c 0x4 LONG 0x0 *(.text) .text 0x00090010 0x15c rm_crt0.o 0x00090146 __vector_buserror_default 0x00090154 __vector_addrerror_default 0x00090162 __vector_default 0x00090010 start .text 0x0009016c 0x28 hell1.o 0x0009017a main .text 0x00090194 0x62 c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o) 0x00090194 atexit ----------------------------- clip ------------------------------ And here is the same snippet from the unix compilation: ----------------------------- clip ------------------------------ .text 0x00090000 0x5574 0x00090000 0x4 LONG 0xbeefbeef 0x00090004 0x4 LONG 0x7ffc __stack 0x00090008 0x4 LONG 0x90010 __prog_start 0x0009000c 0x4 LONG 0x0 *(.text) .text 0x00090010 0x14e rm_crt0.o 0x00090146 __vector_buserror_default 0x00090146 __vector_addrerror_default 0x00090146 __vector_default 0x00090010 start ----------------------------- clip ------------------------------ Does anyone know why there is a difference between the two links for these vector*defaults? What controls the definition of these? I am including the rm_crt0.S and rm_rom.ld files if they are useful in figuring this out. BTW, the rm_crt0.o file that I have used for this compile is the one that was used under windows - does this suggest that something else is controlling the definition of these defaults? Any thoughts?
GNU ld version 2.9.1 (with BFD 2.9.1) Supported emulations: m68kcoff opened script file rm_rom.ld attempt to open rm_crt0.o succeeded rm_crt0.o attempt to open hell1.o succeeded hell1.o attempt to open c:/xgcc/68k/2_8_1/mcpu32/libbcc.a succeeded attempt to open c:/xgcc/68k/2_8_1/mcpu32/libc.a succeeded Archive member included because of file (symbol) c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o) rm_crt0.o (atexit) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)atexit.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(exit.o) rm_crt0.o (exit) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)exit.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(printf.o) hell1.o (printf) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)printf.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(impure.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o) (_impure_ptr) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)impure.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(malloc.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o) (malloc) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)malloc.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(printf.o) (vfprintf) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)vfprintf.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(mallocr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(malloc.o) (_malloc_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)mallocr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(fvwrite.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__sfvwrite) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)fvwrite.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(fflush.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (fflush) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)fflush.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(locale.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (localeconv) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)locale.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(findfp.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__sinit) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)findfp.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(wsetup.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__swsetup) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)wsetup.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(mbtowc.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (mbtowc) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)mbtowc.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(s_isinf.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (isinf) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)s_isinf.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(s_isnan.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (isnan) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)s_isnan.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(memchr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (memchr) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)memchr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(strlen.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (strlen) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)strlen.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (_dtoa_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)dtoa.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(sbrkr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(mallocr.o) (_sbrk_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)sbrkr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(memcpy.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(mallocr.o) (memcpy) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)memcpy.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(memmove.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(fvwrite.o) (memmove) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)memmove.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(fwalk.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(fflush.o) (_fwalk) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)fwalk.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(strcmp.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(locale.o) (strcmp) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)strcmp.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(findfp.o) (__sread) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)stdio.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(memset.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(findfp.o) (memset) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)memset.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(makebuf.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(wsetup.o) (__smakebuf) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)makebuf.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(mprec.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) (_Balloc) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)mprec.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(readr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) (_read_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)readr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(lseekr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) (_lseek_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)lseekr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(writer.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) (_write_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)writer.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(closer.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) (_close_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)closer.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(fstatr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(makebuf.o) (_fstat_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)fstatr.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(callocr.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(mprec.o) (_calloc_r) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)callocr.o attempt to open c:/xgcc/68k/2_8_1/mcpu32/libgcc.a succeeded c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(__main.o) hell1.o (__main) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)__main.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(xfgnulib.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__truncxfdf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)xfgnulib.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ltdf2.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__ltdf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_ltdf2.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_eqdf2.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__eqdf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_eqdf2.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_nedf2.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) (__nedf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_nedf2.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(fpgnulib.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) (__floatsidf) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)fpgnulib.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_double.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) (__adddf3) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_double.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_gtdf2.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) (__gtdf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_gtdf2.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ledf2.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) (__ledf2) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_ledf2.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ctors.o) c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(__main.o) (__CTOR_LIST__) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_ctors.o c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_floatex.o) c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_double.o) (_fpCCR) (c:/xgcc/68k/2_8_1/mcpu32/libgcc.a)_floatex.o attempt to open c:/xgcc/68k/2_8_1/mcpu32/libm.a succeeded c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(cpu32bug.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(exit.o) (_exit) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)cpu32bug.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(sbrk.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(sbrkr.o) (sbrk) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)sbrk.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(isatty.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(makebuf.o) (isatty) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)isatty.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(read.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(readr.o) (read) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)read.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(lseek.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(lseekr.o) (lseek) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)lseek.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(write.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(writer.o) (write) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)write.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(close.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(closer.o) (close) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)close.o c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(fstat.o) c:/xgcc/68k/2_8_1/mcpu32/libc.a(fstatr.o) (fstat) (c:/xgcc/68k/2_8_1/mcpu32/libbcc.a)fstat.o c:/xgcc/68k/2_8_1/mcpu32/libc.a(errno.o) c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(lseek.o) (__errno) (c:/xgcc/68k/2_8_1/mcpu32/libc.a)errno.o Allocating common symbols Common symbol size file errno 0x4 c:/xgcc/68k/2_8_1/mcpu32/libc.a(sbrkr.o) heap_ptr 0x4 c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(sbrk.o) __CTOR_LIST__ 0x8 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ctors.o) __DTOR_LIST__ 0x8 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ctors.o) Memory Configuration Name Origin Length Attributes *default* 0x00000000 0xffffffff Linker script and memory map LOAD rm_crt0.o LOAD hell1.o START GROUP LOAD c:/xgcc/68k/2_8_1/mcpu32/libbcc.a LOAD c:/xgcc/68k/2_8_1/mcpu32/libc.a LOAD c:/xgcc/68k/2_8_1/mcpu32/libgcc.a LOAD c:/xgcc/68k/2_8_1/mcpu32/libm.a END GROUP 0x00000000 __DYNAMIC=0x0 0x00003000 __ram_start=0x3000 0x00005000 __ram_size=0x5000 0x00090000 __rom_start=0x90000 0x00070000 __rom_size=0x70000 0x00007ffc __stack=((__ram_start+__ram_size)-0x4) 0x00090010 __prog_start=(__rom_start+0x10) 0x00008000 PROVIDE (__stack, (__ram_start+__ram_size)) 0x00008000 PROVIDE (__boot_stack, (__ram_start+__ram_size)) 0x00000000 PROVIDE (crt0_flags, 0x0) 0x00000000 PROVIDE (_crt0_flags, 0x0) 0x00000000 PROVIDE (hardware_init_hook, 0x0) 0x00000000 PROVIDE (_hardware_init_hook, 0x0) 0x00000000 PROVIDE (software_init_hook, 0x0) 0x00000000 PROVIDE (_software_init_hook, 0x0) .text 0x00090000 0x5580 0x00090000 0x4 LONG 0xbeefbeef 0x00090004 0x4 LONG 0x7ffc __stack 0x00090008 0x4 LONG 0x90010 __prog_start 0x0009000c 0x4 LONG 0x0 *(.text) .text 0x00090010 0x15c rm_crt0.o 0x00090146 __vector_buserror_default 0x00090154 __vector_addrerror_default 0x00090162 __vector_default 0x00090010 start .text 0x0009016c 0x28 hell1.o 0x0009017a main .text 0x00090194 0x62 c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o) 0x00090194 atexit *fill* 0x000901f6 0x2 .text 0x000901f8 0x58 c:/xgcc/68k/2_8_1/mcpu32/libc.a(exit.o) 0x000901f8 exit .text 0x00090250 0x48 c:/xgcc/68k/2_8_1/mcpu32/libc.a(printf.o) 0x00090270 printf 0x00090250 _printf_r .text 0x00090298 0x4c c:/xgcc/68k/2_8_1/mcpu32/libc.a(malloc.o) 0x00090298 malloc 0x000902c8 realloc 0x000902b0 free .text 0x000902e4 0x1208 c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) 0x00090420 _vfprintf_r 0x000903b0 vfprintf .text 0x000914ec 0x19c c:/xgcc/68k/2_8_1/mcpu32/libc.a(mallocr.o) 0x0009161c _realloc_r 0x000915ea _free_r 0x00091588 _malloc_r .text 0x00091688 0x23a c:/xgcc/68k/2_8_1/mcpu32/libc.a(fvwrite.o) 0x00091688 __sfvwrite *fill* 0x000918c2 0x2 .text 0x000918c4 0xa6 c:/xgcc/68k/2_8_1/mcpu32/libc.a(fflush.o) 0x000918c4 fflush *fill* 0x0009196a 0x2 .text 0x0009196c 0xc0 c:/xgcc/68k/2_8_1/mcpu32/libc.a(locale.o) 0x000919a2 _setlocale_r 0x000919f2 _localeconv_r 0x00091a00 setlocale 0x00091a1a localeconv .text 0x00091a2c 0x1ea c:/xgcc/68k/2_8_1/mcpu32/libc.a(findfp.o) 0x00091ba8 __sinit 0x00091a80 __sfmoreglue 0x00091b96 _cleanup 0x00091b7e _cleanup_r 0x00091ada __sfp *fill* 0x00091c16 0x2 .text 0x00091c18 0xcc c:/xgcc/68k/2_8_1/mcpu32/libc.a(wsetup.o) 0x00091c18 __swsetup .text 0x00091ce4 0x34 c:/xgcc/68k/2_8_1/mcpu32/libc.a(mbtowc.o) 0x00091ce4 mbtowc .text 0x00091d18 0x46 c:/xgcc/68k/2_8_1/mcpu32/libc.a(s_isinf.o) 0x00091d18 isinf *fill* 0x00091d5e 0x2 .text 0x00091d60 0x3c c:/xgcc/68k/2_8_1/mcpu32/libc.a(s_isnan.o) 0x00091d60 isnan .text 0x00091d9c 0x3a c:/xgcc/68k/2_8_1/mcpu32/libc.a(memchr.o) 0x00091d9c memchr *fill* 0x00091dd6 0x2 .text 0x00091dd8 0x1c c:/xgcc/68k/2_8_1/mcpu32/libc.a(strlen.o) 0x00091dd8 strlen .text 0x00091df4 0x1208 c:/xgcc/68k/2_8_1/mcpu32/libc.a(dtoa.o) 0x00091f8c _dtoa_r .text 0x00092ffc 0x32 c:/xgcc/68k/2_8_1/mcpu32/libc.a(sbrkr.o) 0x00092ffc _sbrk_r *fill* 0x0009302e 0x2 .text 0x00093030 0x2e c:/xgcc/68k/2_8_1/mcpu32/libc.a(memcpy.o) 0x00093030 memcpy *fill* 0x0009305e 0x2 .text 0x00093060 0x58 c:/xgcc/68k/2_8_1/mcpu32/libc.a(memmove.o) 0x00093060 memmove .text 0x000930b8 0x54 c:/xgcc/68k/2_8_1/mcpu32/libc.a(fwalk.o) 0x000930b8 _fwalk .text 0x0009310c 0x28 c:/xgcc/68k/2_8_1/mcpu32/libc.a(strcmp.o) 0x0009310c strcmp .text 0x00093134 0xea c:/xgcc/68k/2_8_1/mcpu32/libc.a(stdio.o) 0x000931c0 __sseek 0x00093134 __sread 0x00093202 __sclose 0x0009316e __swrite *fill* 0x0009321e 0x2 .text 0x00093220 0x60 c:/xgcc/68k/2_8_1/mcpu32/libc.a(memset.o) 0x00093220 memset .text 0x00093280 0xf4 c:/xgcc/68k/2_8_1/mcpu32/libc.a(makebuf.o) 0x00093280 __smakebuf .text 0x00093374 0xb50 c:/xgcc/68k/2_8_1/mcpu32/libc.a(mprec.o) 0x00093e74 _mprec_log10 0x00093e4c __mprec_tinytens 0x0009358e _hi0bits 0x00093374 _Balloc 0x00093be8 _d2b 0x00093cd6 _ratio 0x000934d2 _s2b 0x00093662 _i2b 0x00093d5c __mprec_tens 0x000935e6 _lo0bits 0x00093e24 __mprec_bigtens 0x00093972 __mcmp 0x0009382a _pow5mult 0x0009368c _mult 0x00093ac0 _ulp 0x00093b34 _b2d 0x00093422 _multadd 0x000939c0 __mdiff 0x000938cc _lshift 0x000933f6 _Bfree .text 0x00093ec4 0x3a c:/xgcc/68k/2_8_1/mcpu32/libc.a(readr.o) 0x00093ec4 _read_r *fill* 0x00093efe 0x2 .text 0x00093f00 0x3a c:/xgcc/68k/2_8_1/mcpu32/libc.a(lseekr.o) 0x00093f00 _lseek_r *fill* 0x00093f3a 0x2 .text 0x00093f3c 0x3a c:/xgcc/68k/2_8_1/mcpu32/libc.a(writer.o) 0x00093f3c _write_r *fill* 0x00093f76 0x2 .text 0x00093f78 0x32 c:/xgcc/68k/2_8_1/mcpu32/libc.a(closer.o) 0x00093f78 _close_r *fill* 0x00093faa 0x2 .text 0x00093fac 0x36 c:/xgcc/68k/2_8_1/mcpu32/libc.a(fstatr.o) 0x00093fac _fstat_r *fill* 0x00093fe2 0x2 .text 0x00093fe4 0x42 c:/xgcc/68k/2_8_1/mcpu32/libc.a(callocr.o) 0x00093fe4 _calloc_r *fill* 0x00094026 0x2 .text 0x00094028 0x94 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(__main.o) 0x000940a0 __main 0x00094028 __do_global_dtors 0x00094054 __do_global_ctors .text 0x000940bc 0x638 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(xfgnulib.o) 0x0009456e __nexf2 0x000945bc __ltxf2 0x00094482 __negxf2 0x00094520 __eqxf2 0x0009460a __lexf2 0x000946a6 __gexf2 0x000940c8 __extenddfxf2 0x00094284 __fixxfsi 0x00094150 __truncxfdf2 0x00094396 __mulxf3 0x00094242 __floatsixf 0x00094320 __subxf3 0x000944d2 __cmpxf2 0x00094220 __truncxfsf2 0x0009440c __divxf3 0x000941de __extendsfxf2 0x000942aa __addxf3 0x00094658 __gtxf2 .text 0x000946f4 0x1e c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ltdf2.o) 0x000946f4 __ltdf2 *fill* 0x00094712 0x2 .text 0x00094714 0x1e c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_eqdf2.o) 0x00094714 __eqdf2 *fill* 0x00094732 0x2 .text 0x00094734 0x1e c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_nedf2.o) 0x00094734 __nedf2 *fill* 0x00094752 0x2 .text 0x00094754 0x1f4 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(fpgnulib.o) 0x0009492e __fixsfsi 0x00094754 __floatsidf 0x000947ea __extendsfdf2 0x000948b0 __fixdfsi 0x000947d0 __floatsisf 0x0009483c __truncdfsf2 .text 0x00094948 0x9aa c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_double.o) 0x000951c8 __cmpdf2 0x000949a8 __adddf3 0x00095168 __negdf2 0x00094ee6 __divdf3 0x00094d32 __muldf3 0x000949a2 __subdf3 *fill* 0x000952f2 0x2 .text 0x000952f4 0x1e c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_gtdf2.o) 0x000952f4 __gtdf2 *fill* 0x00095312 0x2 .text 0x00095314 0x1e c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ledf2.o) 0x00095314 __ledf2 *fill* 0x00095332 0x2 .text 0x00095334 0x6c c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_floatex.o) 0x00095342 $_exception_handler 0x00095334 __clear_sticky_bit .text 0x000953a0 0x5a c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(cpu32bug.o) 0x000953cc outln 0x000953bc putDebugChar 0x000953ec havebyte 0x000953bc outbyte 0x000953a8 getDebugChar 0x000953a8 inbyte 0x000953a0 _exit *fill* 0x000953fa 0x2 .text 0x000953fc 0x2c c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(sbrk.o) 0x000953fc sbrk .text 0x00095428 0xa c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(isatty.o) 0x00095428 isatty *fill* 0x00095432 0x2 .text 0x00095434 0x90 c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(read.o) 0x00095438 read .text 0x000954c4 0x16 c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(lseek.o) 0x000954c4 lseek *fill* 0x000954da 0x2 .text 0x000954dc 0x46 c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(write.o) 0x000954dc write *fill* 0x00095522 0x2 .text 0x00095524 0xa c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(close.o) 0x00095524 close *fill* 0x0009552e 0x2 .text 0x00095530 0x1a c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(fstat.o) 0x00095530 fstat *fill* 0x0009554a 0x2 .text 0x0009554c 0xe c:/xgcc/68k/2_8_1/mcpu32/libc.a(errno.o) 0x0009554c __errno *fill* 0x0009555a 0x2 0x0009555c .=ALIGN(0x4) 0x0009555c __CTOR_LIST__=. 0x0009555c 0x4 LONG 0x0 (((__CTOR_END__-__CTOR_LIST__)/0x4)-0x2) *(.ctors) 0x00095560 0x4 LONG 0x0 0x00095564 __CTOR_END__=. 0x00095564 __DTOR_LIST__=. 0x00095564 0x4 LONG 0x0 (((__DTOR_END__-__DTOR_LIST__)/0x4)-0x2) *(.dtors) 0x00095568 0x4 LONG 0x0 0x0009556c __DTOR_END__=. *(.rodata) *(.gcc_exc) *(.gcc_except_table) 0x0009556c __INIT_SECTION__=. 0x0009556c 0x4 LONG 0x4e560000 *(.init) 0x00095570 0x2 SHORT 0x4e5e 0x00095572 0x2 SHORT 0x4e75 0x00095574 __FINI_SECTION__=. 0x00095574 0x4 LONG 0x4e560000 *(.fini) 0x00095578 0x2 SHORT 0x4e5e 0x0009557a 0x2 SHORT 0x4e75 0x0009557c .=ALIGN(0x4) 0x0009557c crt0_initialization_list=. 0x0009557c _crt0_initialization_list=. *(.crt0ini) 0x0009557c .=ALIGN(0x2) 0x0009557c 0x4 LONG 0x0 0x00095580 _etext=. *(.lit) 0x00095580 .=ALIGN(0x4) 0x00095580 __data_start_rom=. .data 0x00003000 0x33c load address 0x00095580 0x00003000 __data_start=. *(.shdata) *(.data) .data 0x00003000 0xc rm_crt0.o 0x00003008 __unhandled_exception_pc 0x00003004 __unhandled_exception .data 0x0000300c 0x2ee c:/xgcc/68k/2_8_1/mcpu32/libc.a(impure.o) 0x000032f6 _impure_ptr *fill* 0x000032fa 0x2 .data 0x000032fc 0x20 c:/xgcc/68k/2_8_1/mcpu32/libc.a(vfprintf.o) .data 0x0000331c 0x4 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(__main.o) .data 0x00003320 0x1c c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_floatex.o) 0x00003320 _fpCCR 0x0000333c _edata=. .bss 0x0000333c 0x1c 0x0000333c __bss_start=. *(.shbss) *(.bss) .bss 0x0000333c 0x4 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(__main.o) *(COMMON) COMMON 0x00003340 0x4 c:/xgcc/68k/2_8_1/mcpu32/libc.a(sbrkr.o) 0x00003340 errno COMMON 0x00003344 0x10 c:/xgcc/68k/2_8_1/mcpu32/libgcc.a(_ctors.o) COMMON 0x00003354 0x4 c:/xgcc/68k/2_8_1/mcpu32/libbcc.a(sbrk.o) 0x00003354 heap_ptr *(.eh_fram) *(.eh_frame) 0x00003358 _end=ALIGN(0x8) 0x00003358 __end=_end .stab *(.stab) .stabstr *(.stabstr) OUTPUT(hell1.cof coff-m68k)
GNU ld version 2.9.1 (with BFD 2.9.1) Supported emulations: m68kcoff opened script file rm_rom.ld attempt to open rm_crt0.o succeeded rm_crt0.o attempt to open /hfs/2_8_1/mcpu32/libbcc.a succeeded attempt to open /hfs/2_8_1/mcpu32/libc.a succeeded Archive member included because of file (symbol) /hfs/2_8_1/mcpu32/libc.a(atexit.o) rm_crt0.o (atexit) (/hfs/2_8_1/mcpu32/libc.a)atexit.o /hfs/2_8_1/mcpu32/libc.a(exit.o) rm_crt0.o (exit) (/hfs/2_8_1/mcpu32/libc.a)exit.o /hfs/2_8_1/mcpu32/libc.a(impure.o) /hfs/2_8_1/mcpu32/libc.a(atexit.o) (_impure_ptr) (/hfs/2_8_1/mcpu32/libc.a)impure.o /hfs/2_8_1/mcpu32/libc.a(malloc.o) /hfs/2_8_1/mcpu32/libc.a(atexit.o) (malloc) (/hfs/2_8_1/mcpu32/libc.a)malloc.o /hfs/2_8_1/mcpu32/libc.a(mallocr.o) /hfs/2_8_1/mcpu32/libc.a(malloc.o) (_malloc_r) (/hfs/2_8_1/mcpu32/libc.a)mallocr.o /hfs/2_8_1/mcpu32/libc.a(sbrkr.o) /hfs/2_8_1/mcpu32/libc.a(mallocr.o) (_sbrk_r) (/hfs/2_8_1/mcpu32/libc.a)sbrkr.o /hfs/2_8_1/mcpu32/libc.a(memcpy.o) /hfs/2_8_1/mcpu32/libc.a(mallocr.o) (memcpy) (/hfs/2_8_1/mcpu32/libc.a)memcpy.o attempt to open /hfs/2_8_1/mcpu32/libgcc.a succeeded attempt to open hello.o succeeded hello.o attempt to open /hfs/2_8_1/mcpu32/libbcc.a succeeded /hfs/2_8_1/mcpu32/libbcc.a(cpu32bug.o) /hfs/2_8_1/mcpu32/libc.a(exit.o) (_exit) (/hfs/2_8_1/mcpu32/libbcc.a)cpu32bug.o /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) /hfs/2_8_1/mcpu32/libc.a(sbrkr.o) (sbrk) (/hfs/2_8_1/mcpu32/libbcc.a)sbrk.o attempt to open /hfs/2_8_1/mcpu32/libc.a succeeded /hfs/2_8_1/mcpu32/libc.a(printf.o) hello.o (printf) (/hfs/2_8_1/mcpu32/libc.a)printf.o /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) /hfs/2_8_1/mcpu32/libc.a(printf.o) (vfprintf) (/hfs/2_8_1/mcpu32/libc.a)vfprintf.o /hfs/2_8_1/mcpu32/libc.a(fvwrite.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__sfvwrite) (/hfs/2_8_1/mcpu32/libc.a)fvwrite.o /hfs/2_8_1/mcpu32/libc.a(fflush.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (fflush) (/hfs/2_8_1/mcpu32/libc.a)fflush.o /hfs/2_8_1/mcpu32/libc.a(locale.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (localeconv) (/hfs/2_8_1/mcpu32/libc.a)locale.o /hfs/2_8_1/mcpu32/libc.a(findfp.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__sinit) (/hfs/2_8_1/mcpu32/libc.a)findfp.o /hfs/2_8_1/mcpu32/libc.a(wsetup.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__swsetup) (/hfs/2_8_1/mcpu32/libc.a)wsetup.o /hfs/2_8_1/mcpu32/libc.a(mbtowc.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (mbtowc) (/hfs/2_8_1/mcpu32/libc.a)mbtowc.o /hfs/2_8_1/mcpu32/libc.a(s_isinf.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (isinf) (/hfs/2_8_1/mcpu32/libc.a)s_isinf.o /hfs/2_8_1/mcpu32/libc.a(s_isnan.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (isnan) (/hfs/2_8_1/mcpu32/libc.a)s_isnan.o /hfs/2_8_1/mcpu32/libc.a(memchr.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (memchr) (/hfs/2_8_1/mcpu32/libc.a)memchr.o /hfs/2_8_1/mcpu32/libc.a(strlen.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (strlen) (/hfs/2_8_1/mcpu32/libc.a)strlen.o /hfs/2_8_1/mcpu32/libc.a(dtoa.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (_dtoa_r) (/hfs/2_8_1/mcpu32/libc.a)dtoa.o /hfs/2_8_1/mcpu32/libc.a(memmove.o) /hfs/2_8_1/mcpu32/libc.a(fvwrite.o) (memmove) (/hfs/2_8_1/mcpu32/libc.a)memmove.o /hfs/2_8_1/mcpu32/libc.a(fwalk.o) /hfs/2_8_1/mcpu32/libc.a(fflush.o) (_fwalk) (/hfs/2_8_1/mcpu32/libc.a)fwalk.o /hfs/2_8_1/mcpu32/libc.a(strcmp.o) /hfs/2_8_1/mcpu32/libc.a(locale.o) (strcmp) (/hfs/2_8_1/mcpu32/libc.a)strcmp.o /hfs/2_8_1/mcpu32/libc.a(stdio.o) /hfs/2_8_1/mcpu32/libc.a(findfp.o) (__sread) (/hfs/2_8_1/mcpu32/libc.a)stdio.o /hfs/2_8_1/mcpu32/libc.a(memset.o) /hfs/2_8_1/mcpu32/libc.a(findfp.o) (memset) (/hfs/2_8_1/mcpu32/libc.a)memset.o /hfs/2_8_1/mcpu32/libc.a(makebuf.o) /hfs/2_8_1/mcpu32/libc.a(wsetup.o) (__smakebuf) (/hfs/2_8_1/mcpu32/libc.a)makebuf.o /hfs/2_8_1/mcpu32/libc.a(mprec.o) /hfs/2_8_1/mcpu32/libc.a(dtoa.o) (_Balloc) (/hfs/2_8_1/mcpu32/libc.a)mprec.o /hfs/2_8_1/mcpu32/libc.a(readr.o) /hfs/2_8_1/mcpu32/libc.a(stdio.o) (_read_r) (/hfs/2_8_1/mcpu32/libc.a)readr.o /hfs/2_8_1/mcpu32/libc.a(lseekr.o) /hfs/2_8_1/mcpu32/libc.a(stdio.o) (_lseek_r) (/hfs/2_8_1/mcpu32/libc.a)lseekr.o /hfs/2_8_1/mcpu32/libc.a(writer.o) /hfs/2_8_1/mcpu32/libc.a(stdio.o) (_write_r) (/hfs/2_8_1/mcpu32/libc.a)writer.o /hfs/2_8_1/mcpu32/libc.a(closer.o) /hfs/2_8_1/mcpu32/libc.a(stdio.o) (_close_r) (/hfs/2_8_1/mcpu32/libc.a)closer.o /hfs/2_8_1/mcpu32/libc.a(fstatr.o) /hfs/2_8_1/mcpu32/libc.a(makebuf.o) (_fstat_r) (/hfs/2_8_1/mcpu32/libc.a)fstatr.o /hfs/2_8_1/mcpu32/libc.a(callocr.o) /hfs/2_8_1/mcpu32/libc.a(mprec.o) (_calloc_r) (/hfs/2_8_1/mcpu32/libc.a)callocr.o attempt to open /hfs/2_8_1/mcpu32/libgcc.a succeeded /hfs/2_8_1/mcpu32/libgcc.a(__main.o) hello.o (__main) (/hfs/2_8_1/mcpu32/libgcc.a)__main.o /hfs/2_8_1/mcpu32/libgcc.a(xfgnulib.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__truncxfdf2) (/hfs/2_8_1/mcpu32/libgcc.a)xfgnulib.o /hfs/2_8_1/mcpu32/libgcc.a(_ltdf2.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__ltdf2) (/hfs/2_8_1/mcpu32/libgcc.a)_ltdf2.o /hfs/2_8_1/mcpu32/libgcc.a(_eqdf2.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__eqdf2) (/hfs/2_8_1/mcpu32/libgcc.a)_eqdf2.o /hfs/2_8_1/mcpu32/libgcc.a(_nedf2.o) /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) (__nedf2) (/hfs/2_8_1/mcpu32/libgcc.a)_nedf2.o /hfs/2_8_1/mcpu32/libgcc.a(fpgnulib.o) /hfs/2_8_1/mcpu32/libc.a(dtoa.o) (__floatsidf) (/hfs/2_8_1/mcpu32/libgcc.a)fpgnulib.o /hfs/2_8_1/mcpu32/libgcc.a(_double.o) /hfs/2_8_1/mcpu32/libc.a(dtoa.o) (__adddf3) (/hfs/2_8_1/mcpu32/libgcc.a)_double.o /hfs/2_8_1/mcpu32/libgcc.a(_gtdf2.o) /hfs/2_8_1/mcpu32/libc.a(dtoa.o) (__gtdf2) (/hfs/2_8_1/mcpu32/libgcc.a)_gtdf2.o /hfs/2_8_1/mcpu32/libgcc.a(_ledf2.o) /hfs/2_8_1/mcpu32/libc.a(dtoa.o) (__ledf2) (/hfs/2_8_1/mcpu32/libgcc.a)_ledf2.o /hfs/2_8_1/mcpu32/libgcc.a(_ctors.o) /hfs/2_8_1/mcpu32/libgcc.a(__main.o) (__CTOR_LIST__) (/hfs/2_8_1/mcpu32/libgcc.a)_ctors.o /hfs/2_8_1/mcpu32/libgcc.a(_floatex.o) /hfs/2_8_1/mcpu32/libgcc.a(_double.o) (_fpCCR) (/hfs/2_8_1/mcpu32/libgcc.a)_floatex.o attempt to open /hfs/2_8_1/mcpu32/libm.a succeeded /hfs/2_8_1/mcpu32/libbcc.a(isatty.o) /hfs/2_8_1/mcpu32/libc.a(makebuf.o) (isatty) (/hfs/2_8_1/mcpu32/libbcc.a)isatty.o /hfs/2_8_1/mcpu32/libbcc.a(read.o) /hfs/2_8_1/mcpu32/libc.a(readr.o) (read) (/hfs/2_8_1/mcpu32/libbcc.a)read.o /hfs/2_8_1/mcpu32/libbcc.a(lseek.o) /hfs/2_8_1/mcpu32/libc.a(lseekr.o) (lseek) (/hfs/2_8_1/mcpu32/libbcc.a)lseek.o /hfs/2_8_1/mcpu32/libbcc.a(write.o) /hfs/2_8_1/mcpu32/libc.a(writer.o) (write) (/hfs/2_8_1/mcpu32/libbcc.a)write.o /hfs/2_8_1/mcpu32/libbcc.a(close.o) /hfs/2_8_1/mcpu32/libc.a(closer.o) (close) (/hfs/2_8_1/mcpu32/libbcc.a)close.o /hfs/2_8_1/mcpu32/libbcc.a(fstat.o) /hfs/2_8_1/mcpu32/libc.a(fstatr.o) (fstat) (/hfs/2_8_1/mcpu32/libbcc.a)fstat.o /hfs/2_8_1/mcpu32/libc.a(errno.o) /hfs/2_8_1/mcpu32/libbcc.a(lseek.o) (__errno) (/hfs/2_8_1/mcpu32/libc.a)errno.o Allocating common symbols Common symbol size file errno 0x4 /hfs/2_8_1/mcpu32/libc.a(sbrkr.o) heap_ptr 0x4 /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) __CTOR_LIST__ 0x8 /hfs/2_8_1/mcpu32/libgcc.a(_ctors.o) __DTOR_LIST__ 0x8 /hfs/2_8_1/mcpu32/libgcc.a(_ctors.o) Memory Configuration Name Origin Length Attributes *default* 0x00000000 0xffffffff Linker script and memory map LOAD rm_crt0.o LOAD /hfs/2_8_1/mcpu32/libbcc.a LOAD /hfs/2_8_1/mcpu32/libc.a LOAD /hfs/2_8_1/mcpu32/libgcc.a LOAD hello.o START GROUP LOAD /hfs/2_8_1/mcpu32/libbcc.a LOAD /hfs/2_8_1/mcpu32/libc.a LOAD /hfs/2_8_1/mcpu32/libgcc.a LOAD /hfs/2_8_1/mcpu32/libm.a END GROUP 0x00000000 __DYNAMIC=0x0 0x00003000 __ram_start=0x3000 0x00005000 __ram_size=0x5000 0x00090000 __rom_start=0x90000 0x00070000 __rom_size=0x70000 0x00007ffc __stack=((__ram_start+__ram_size)-0x4) 0x00090010 __prog_start=(__rom_start+0x10) 0x00008000 PROVIDE (__stack, (__ram_start+__ram_size)) 0x00008000 PROVIDE (__boot_stack, (__ram_start+__ram_size)) 0x00000000 PROVIDE (crt0_flags, 0x0) 0x00000000 PROVIDE (_crt0_flags, 0x0) 0x00000000 PROVIDE (hardware_init_hook, 0x0) 0x00000000 PROVIDE (_hardware_init_hook, 0x0) 0x00000000 PROVIDE (software_init_hook, 0x0) 0x00000000 PROVIDE (_software_init_hook, 0x0) .text 0x00090000 0x5574 0x00090000 0x4 LONG 0xbeefbeef 0x00090004 0x4 LONG 0x7ffc __stack 0x00090008 0x4 LONG 0x90010 __prog_start 0x0009000c 0x4 LONG 0x0 *(.text) .text 0x00090010 0x14e rm_crt0.o 0x00090146 __vector_buserror_default 0x00090146 __vector_addrerror_default 0x00090146 __vector_default 0x00090010 start *fill* 0x0009015e 0x2 .text 0x00090160 0x62 /hfs/2_8_1/mcpu32/libc.a(atexit.o) 0x00090160 atexit *fill* 0x000901c2 0x2 .text 0x000901c4 0x58 /hfs/2_8_1/mcpu32/libc.a(exit.o) 0x000901c4 exit .text 0x0009021c 0x4c /hfs/2_8_1/mcpu32/libc.a(malloc.o) 0x0009021c malloc 0x0009024c realloc 0x00090234 free .text 0x00090268 0x19c /hfs/2_8_1/mcpu32/libc.a(mallocr.o) 0x00090398 _realloc_r 0x00090366 _free_r 0x00090304 _malloc_r .text 0x00090404 0x32 /hfs/2_8_1/mcpu32/libc.a(sbrkr.o) 0x00090404 _sbrk_r *fill* 0x00090436 0x2 .text 0x00090438 0x2e /hfs/2_8_1/mcpu32/libc.a(memcpy.o) 0x00090438 memcpy *fill* 0x00090466 0x2 .text 0x00090468 0x28 hello.o 0x00090476 main .text 0x00090490 0x5a /hfs/2_8_1/mcpu32/libbcc.a(cpu32bug.o) 0x000904bc outln 0x000904ac putDebugChar 0x000904dc havebyte 0x000904ac outbyte 0x00090498 getDebugChar 0x00090498 inbyte 0x00090490 _exit *fill* 0x000904ea 0x2 .text 0x000904ec 0x2c /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) 0x000904ec sbrk .text 0x00090518 0x48 /hfs/2_8_1/mcpu32/libc.a(printf.o) 0x00090538 printf 0x00090518 _printf_r .text 0x00090560 0x1208 /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) 0x0009069c _vfprintf_r 0x0009062c vfprintf .text 0x00091768 0x23a /hfs/2_8_1/mcpu32/libc.a(fvwrite.o) 0x00091768 __sfvwrite *fill* 0x000919a2 0x2 .text 0x000919a4 0xa6 /hfs/2_8_1/mcpu32/libc.a(fflush.o) 0x000919a4 fflush *fill* 0x00091a4a 0x2 .text 0x00091a4c 0xc0 /hfs/2_8_1/mcpu32/libc.a(locale.o) 0x00091a82 _setlocale_r 0x00091ad2 _localeconv_r 0x00091ae0 setlocale 0x00091afa localeconv .text 0x00091b0c 0x1ea /hfs/2_8_1/mcpu32/libc.a(findfp.o) 0x00091c88 __sinit 0x00091b60 __sfmoreglue 0x00091c76 _cleanup 0x00091c5e _cleanup_r 0x00091bba __sfp *fill* 0x00091cf6 0x2 .text 0x00091cf8 0xcc /hfs/2_8_1/mcpu32/libc.a(wsetup.o) 0x00091cf8 __swsetup .text 0x00091dc4 0x34 /hfs/2_8_1/mcpu32/libc.a(mbtowc.o) 0x00091dc4 mbtowc .text 0x00091df8 0x46 /hfs/2_8_1/mcpu32/libc.a(s_isinf.o) 0x00091df8 isinf *fill* 0x00091e3e 0x2 .text 0x00091e40 0x3c /hfs/2_8_1/mcpu32/libc.a(s_isnan.o) 0x00091e40 isnan .text 0x00091e7c 0x3a /hfs/2_8_1/mcpu32/libc.a(memchr.o) 0x00091e7c memchr *fill* 0x00091eb6 0x2 .text 0x00091eb8 0x1c /hfs/2_8_1/mcpu32/libc.a(strlen.o) 0x00091eb8 strlen .text 0x00091ed4 0x1208 /hfs/2_8_1/mcpu32/libc.a(dtoa.o) 0x0009206c _dtoa_r .text 0x000930dc 0x58 /hfs/2_8_1/mcpu32/libc.a(memmove.o) 0x000930dc memmove .text 0x00093134 0x54 /hfs/2_8_1/mcpu32/libc.a(fwalk.o) 0x00093134 _fwalk .text 0x00093188 0x28 /hfs/2_8_1/mcpu32/libc.a(strcmp.o) 0x00093188 strcmp .text 0x000931b0 0xea /hfs/2_8_1/mcpu32/libc.a(stdio.o) 0x0009323c __sseek 0x000931b0 __sread 0x0009327e __sclose 0x000931ea __swrite *fill* 0x0009329a 0x2 .text 0x0009329c 0x60 /hfs/2_8_1/mcpu32/libc.a(memset.o) 0x0009329c memset .text 0x000932fc 0xf4 /hfs/2_8_1/mcpu32/libc.a(makebuf.o) 0x000932fc __smakebuf .text 0x000933f0 0xb50 /hfs/2_8_1/mcpu32/libc.a(mprec.o) 0x00093ef0 _mprec_log10 0x00093ec8 __mprec_tinytens 0x0009360a _hi0bits 0x000933f0 _Balloc 0x00093c64 _d2b 0x00093d52 _ratio 0x0009354e _s2b 0x000936de _i2b 0x00093dd8 __mprec_tens 0x00093662 _lo0bits 0x00093ea0 __mprec_bigtens 0x000939ee __mcmp 0x000938a6 _pow5mult 0x00093708 _mult 0x00093b3c _ulp 0x00093bb0 _b2d 0x0009349e _multadd 0x00093a3c __mdiff 0x00093948 _lshift 0x00093472 _Bfree .text 0x00093f40 0x3a /hfs/2_8_1/mcpu32/libc.a(readr.o) 0x00093f40 _read_r *fill* 0x00093f7a 0x2 .text 0x00093f7c 0x3a /hfs/2_8_1/mcpu32/libc.a(lseekr.o) 0x00093f7c _lseek_r *fill* 0x00093fb6 0x2 .text 0x00093fb8 0x3a /hfs/2_8_1/mcpu32/libc.a(writer.o) 0x00093fb8 _write_r *fill* 0x00093ff2 0x2 .text 0x00093ff4 0x32 /hfs/2_8_1/mcpu32/libc.a(closer.o) 0x00093ff4 _close_r *fill* 0x00094026 0x2 .text 0x00094028 0x36 /hfs/2_8_1/mcpu32/libc.a(fstatr.o) 0x00094028 _fstat_r *fill* 0x0009405e 0x2 .text 0x00094060 0x42 /hfs/2_8_1/mcpu32/libc.a(callocr.o) 0x00094060 _calloc_r *fill* 0x000940a2 0x2 .text 0x000940a4 0x94 /hfs/2_8_1/mcpu32/libgcc.a(__main.o) 0x0009411c __main 0x000940a4 __do_global_dtors 0x000940d0 __do_global_ctors .text 0x00094138 0x638 /hfs/2_8_1/mcpu32/libgcc.a(xfgnulib.o) 0x000945ea __nexf2 0x00094638 __ltxf2 0x000944fe __negxf2 0x0009459c __eqxf2 0x00094686 __lexf2 0x00094722 __gexf2 0x00094144 __extenddfxf2 0x00094300 __fixxfsi 0x000941cc __truncxfdf2 0x00094412 __mulxf3 0x000942be __floatsixf 0x0009439c __subxf3 0x0009454e __cmpxf2 0x0009429c __truncxfsf2 0x00094488 __divxf3 0x0009425a __extendsfxf2 0x00094326 __addxf3 0x000946d4 __gtxf2 .text 0x00094770 0x1e /hfs/2_8_1/mcpu32/libgcc.a(_ltdf2.o) 0x00094770 __ltdf2 *fill* 0x0009478e 0x2 .text 0x00094790 0x1e /hfs/2_8_1/mcpu32/libgcc.a(_eqdf2.o) 0x00094790 __eqdf2 *fill* 0x000947ae 0x2 .text 0x000947b0 0x1e /hfs/2_8_1/mcpu32/libgcc.a(_nedf2.o) 0x000947b0 __nedf2 *fill* 0x000947ce 0x2 .text 0x000947d0 0x1f4 /hfs/2_8_1/mcpu32/libgcc.a(fpgnulib.o) 0x000949aa __fixsfsi 0x000947d0 __floatsidf 0x00094866 __extendsfdf2 0x0009492c __fixdfsi 0x0009484c __floatsisf 0x000948b8 __truncdfsf2 .text 0x000949c4 0x9aa /hfs/2_8_1/mcpu32/libgcc.a(_double.o) 0x00095244 __cmpdf2 0x00094a24 __adddf3 0x000951e4 __negdf2 0x00094f62 __divdf3 0x00094dae __muldf3 0x00094a1e __subdf3 *fill* 0x0009536e 0x2 .text 0x00095370 0x1e /hfs/2_8_1/mcpu32/libgcc.a(_gtdf2.o) 0x00095370 __gtdf2 *fill* 0x0009538e 0x2 .text 0x00095390 0x1e /hfs/2_8_1/mcpu32/libgcc.a(_ledf2.o) 0x00095390 __ledf2 *fill* 0x000953ae 0x2 .text 0x000953b0 0x6c /hfs/2_8_1/mcpu32/libgcc.a(_floatex.o) 0x000953be $_exception_handler 0x000953b0 __clear_sticky_bit .text 0x0009541c 0xa /hfs/2_8_1/mcpu32/libbcc.a(isatty.o) 0x0009541c isatty *fill* 0x00095426 0x2 .text 0x00095428 0x90 /hfs/2_8_1/mcpu32/libbcc.a(read.o) 0x0009542c read .text 0x000954b8 0x16 /hfs/2_8_1/mcpu32/libbcc.a(lseek.o) 0x000954b8 lseek *fill* 0x000954ce 0x2 .text 0x000954d0 0x46 /hfs/2_8_1/mcpu32/libbcc.a(write.o) 0x000954d0 write *fill* 0x00095516 0x2 .text 0x00095518 0xa /hfs/2_8_1/mcpu32/libbcc.a(close.o) 0x00095518 close *fill* 0x00095522 0x2 .text 0x00095524 0x1a /hfs/2_8_1/mcpu32/libbcc.a(fstat.o) 0x00095524 fstat *fill* 0x0009553e 0x2 .text 0x00095540 0xe /hfs/2_8_1/mcpu32/libc.a(errno.o) 0x00095540 __errno *fill* 0x0009554e 0x2 0x00095550 .=ALIGN(0x4) 0x00095550 __CTOR_LIST__=. 0x00095550 0x4 LONG 0x0 (((__CTOR_END__-__CTOR_LIST__)/0x4)-0x2) *(.ctors) 0x00095554 0x4 LONG 0x0 0x00095558 __CTOR_END__=. 0x00095558 __DTOR_LIST__=. 0x00095558 0x4 LONG 0x0 (((__DTOR_END__-__DTOR_LIST__)/0x4)-0x2) *(.dtors) 0x0009555c 0x4 LONG 0x0 0x00095560 __DTOR_END__=. *(.rodata) *(.gcc_exc) *(.gcc_except_table) 0x00095560 __INIT_SECTION__=. 0x00095560 0x4 LONG 0x4e560000 *(.init) 0x00095564 0x2 SHORT 0x4e5e 0x00095566 0x2 SHORT 0x4e75 0x00095568 __FINI_SECTION__=. 0x00095568 0x4 LONG 0x4e560000 *(.fini) 0x0009556c 0x2 SHORT 0x4e5e 0x0009556e 0x2 SHORT 0x4e75 0x00095570 .=ALIGN(0x4) 0x00095570 crt0_initialization_list=. 0x00095570 _crt0_initialization_list=. *(.crt0ini) 0x00095570 .=ALIGN(0x2) 0x00095570 0x4 LONG 0x0 0x00095574 _etext=. *(.lit) 0x00095574 .=ALIGN(0x4) 0x00095574 __data_start_rom=. .data 0x00003000 0x33c load address 0x00095574 0x00003000 __data_start=. *(.shdata) *(.data) .data 0x00003000 0xc rm_crt0.o 0x00003008 __unhandled_exception_pc 0x00003004 __unhandled_exception .data 0x0000300c 0x2ee /hfs/2_8_1/mcpu32/libc.a(impure.o) 0x000032f6 _impure_ptr *fill* 0x000032fa 0x2 .data 0x000032fc 0x20 /hfs/2_8_1/mcpu32/libc.a(vfprintf.o) .data 0x0000331c 0x4 /hfs/2_8_1/mcpu32/libgcc.a(__main.o) .data 0x00003320 0x1c /hfs/2_8_1/mcpu32/libgcc.a(_floatex.o) 0x00003320 _fpCCR 0x0000333c _edata=. .bss 0x0000333c 0x1c 0x0000333c __bss_start=. *(.shbss) *(.bss) .bss 0x0000333c 0x4 /hfs/2_8_1/mcpu32/libgcc.a(__main.o) *(COMMON) COMMON 0x00003340 0x4 /hfs/2_8_1/mcpu32/libc.a(sbrkr.o) 0x00003340 errno COMMON 0x00003344 0x4 /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) 0x00003344 heap_ptr COMMON 0x00003348 0x10 /hfs/2_8_1/mcpu32/libgcc.a(_ctors.o) *(.eh_fram) *(.eh_frame) 0x00003358 _end=ALIGN(0x8) 0x00003358 __end=_end .stab 0x00000000 0x1e84 *(.stab) .stab 0x00000000 0x2ac /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) .stab 0x000002ac 0x3cc /hfs/2_8_1/mcpu32/libgcc.a(__main.o) 0x3d8 (size before relaxing) .stab 0x00000678 0x48c /hfs/2_8_1/mcpu32/libgcc.a(xfgnulib.o) 0x498 (size before relaxing) .stab 0x00000b04 0x210 /hfs/2_8_1/mcpu32/libgcc.a(fpgnulib.o) 0x21c (size before relaxing) .stab 0x00000d14 0x270 /hfs/2_8_1/mcpu32/libgcc.a(_ctors.o) 0x3a8 (size before relaxing) .stab 0x00000f84 0x174 /hfs/2_8_1/mcpu32/libbcc.a(isatty.o) 0x1bc (size before relaxing) .stab 0x000010f8 0x2e8 /hfs/2_8_1/mcpu32/libbcc.a(read.o) 0x330 (size before relaxing) .stab 0x000013e0 0x39c /hfs/2_8_1/mcpu32/libbcc.a(lseek.o) 0x3fc (size before relaxing) .stab 0x0000177c 0x210 /hfs/2_8_1/mcpu32/libbcc.a(write.o) 0x258 (size before relaxing) .stab 0x0000198c 0x174 /hfs/2_8_1/mcpu32/libbcc.a(close.o) 0x1bc (size before relaxing) .stab 0x00001b00 0x384 /hfs/2_8_1/mcpu32/libbcc.a(fstat.o) 0x3d8 (size before relaxing) .stabstr 0x00000000 0x2789 *(.stabstr) .stabstr 0x00000000 0x2789 /hfs/2_8_1/mcpu32/libbcc.a(sbrk.o) 0x0 (size before relaxing) OUTPUT(hello.cof coff-m68k)
/* * crt0.S -- startup file for m68k-coff * * Copyright (c) 1995, 1996 Cygnus Support * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided * that existing copyright notices are retained in all copies and that this * notice is included verbatim in any distributions. No written agreement, * license, or royalty fee is required for any of the authorized uses. * Modifications to this software may be copyrighted by their authors * and need not follow the licensing terms described here, provided that * the new terms are clearly indicated on the first page of each file where * they apply. */ /* modified by Scott Howard, scott@objsw.com * - optional initialization of peripherals via crt0_initialization_list * - copy .data section from ROM image (if there is one) to RAM * - optional clearing of bss, based on value of external long word 'crt0_flags' * - optional call of hardware_init_hook immediately after peripheral initialization * hardware_init_hook may be called via jsr or jmp, based on value of 'crt0_flags' * - Default exception handler re-starts system, saving the vector number * of the exception that caused the restart as well as the program counter where * the exception occurred. */ #include "asm.h" .title "crt0.S for m68k-coff" /* * Define an empty environment. */ .data .align 2 SYM (environ): .long 0 /* Define a variable that indicates which exception handler got us * into the startup code. For a reset, it's always set to zero; * entry through other exceptions stores the vector number here (if possible; * see comments around __vector_default at the end of this file). */ .globl SYM (__unhandled_exception) SYM (__unhandled_exception): .long 0 /* __unhandled_exception_pc saves the program counter value where the exception occurred. */ .globl SYM (__unhandled_exception_pc) SYM (__unhandled_exception_pc): .long 0 .align 2 .text /* * These symbols are defined in C code, so they need to always be * named with SYM because of the difference between object file formats. */ /* These are defined in C code. */ .extern SYM (main) .extern SYM (exit) .extern SYM (hardware_init_hook) .extern SYM (software_init_hook) .extern SYM (atexit) .extern SYM(__do_global_dtors) .extern SYM(crt0_flags) .extern SYM(crt0_initialization_list) /* * These values are set in the linker script, so they must be * explicitly named here without SYM. */ .extern __stack .extern __bss_start .extern __data_start_rom .extern __data_start .extern _end /* * set things up so the application will run. This *must* be called start. */ .global SYM (start) SYM (start): /* hardware reset puts a zero in __unhandled_exception. */ moveql #0,d7 /* if the user provided us with flags (symbol name 'crt0_flags') for the startup code, * load them now. If not, use defaults. */ 001: movel IMM(SYM(crt0_flags)),d2 /* flags defined? */ jbeq 002f /* skip if symbol not defined */ movel d2,a0 /* flags were defined - load them */ movel (a0),d2 /* if user provided an initialization list, process it now * This is typically used to set up hardware that is critical to system operation, * for example chip selects, watchdog timers, etc. */ 002: movel IMM(SYM(crt0_initialization_list)),d0 jbeq 40f /* skip if no list provided */ /* the init list is a series of records that look like this: * (4 bytes) start address * (2 bytes) write count bits 14 and 15 indicate size: 0:0 = byte, 0:1 = word, else long * (<count * size> bytes) data data to be written * if count is zero, then the start address is a function pointer * and the function is called as void (*ftn) (void) */ 005: movel d0,a0 /* get address of next list entry */ 00: movel (a0)+,d0 /* get next address to initialize */ movel d0,a1 /* point A1 at address */ jbeq 40f /* address is zero - end of list */ movew (a0)+,d0 /* get byte/word/longword count */ jbeq 04f /* count == 0 - it's a function pointer */ movew d0,d1 /* copy into d1 */ #ifdef __mcf5200__ andil IMM(0x3fff),d0 /* remove size code from count */ andil IMM(0xc000),d1 /* get size code */ jbeq 03f /* size code == 0: byte write */ cmpil IMM(0x4000),d1 /* size code == 1? */ jbeq 02f /* yes - word move */ /* long word move */ 01: movel (a0)+,(a1)+ subql IMM(1),d0 /* decrement and branch till done */ jbne 01b jbra 00b /* word move */ 02: movew (a0)+,(a1)+ subql IMM(1),d0 /* decrement and branch till done */ jbne 02b jbra 00b /* byte move */ 03: moveb (a0)+,(a1)+ subql IMM(1),d0 /* decrement and branch till done */ jbne 03b movel a0,d0 /* get pointer in D0 to word-align */ btst IMM(0),d0 /* word-align before fetching */ jbeq 00b /* it's already aligned - skip */ addl IMM(1),d0 /* misaligned, so increment to next word boundary */ jbra 005b /* next entry */ #else andiw IMM(0x3fff),d0 /* remove size code from count */ subqw IMM(1),d0 /* adjust for dbcc terminal count == 0xffff */ andiw IMM(0xc000),d1 /* get size code */ jbeq 03f /* size code == 0: byte write */ cmpiw IMM(0x4000),d1 /* size code == 1? */ jbeq 02f /* yes - word move */ /* long word move */ 01: movel (a0)+,(a1)+ dbra d0,01b /* decrement and branch till done */ jbra 00b /* word move */ 02: movew (a0)+,(a1)+ dbra d0,02b /* decrement and branch till done */ jbra 00b /* byte move */ 03: moveb (a0)+,(a1)+ dbra d0,03b /* decrement and branch till done */ movel a0,d0 /* get pointer in D0 to word-align */ btst IMM(0),d0 /* word-align before fetching */ jbeq 00b /* it's already aligned - skip */ addl IMM(1),d0 /* misaligned, so increment to next word boundary */ jbra 005b /* next entry */ #endif /* count == 0: call function through function pointer */ 04: jsr (a1) jbra 00b 40: /* See if user supplied their own stack (__stack != 0). * If not, then leave it as set by the ROM monitor/exception vector. */ movel IMM(__stack), a0 cmpl IMM(0), a0 jbeq 1f movel a0, sp 1: /* if the user provided a hardware init function, call it now. * this is done first so that hardware is all set up for the rest of crt0 */ lea SYM(hardware_init_hook), a0 cmpl IMM(0),a0 jbeq 4f /* There is an init function, so execute it. * If bit 0 of crt0_flags is set, then do a jump to the init routine * with the return address in D0; otherwise do a normal jsr. */ btst IMM(0),d2 jbeq 401f movel IMM(4f),d0 /* put ret addr in D0... */ jmp (a0) /* and jump to the routine */ 401: jsr (a0) /* flag bit is clear - normal jsr */ 4: /* * If bit 1 of crt0_flags is clear, then zero out the bss section. * we do this with a clr.l instruction, since it's a lot faster than the * clr.b instruction on most of the 68k CPUs, and we can be sure that * the bss section will always be a multiple of sizeof (long). */ btst IMM(1),d2 /* check the flag bit */ jbne 3f /* flag bit is set - don't clear bss */ movel IMM(__bss_start), d1 movel IMM(_end), d0 cmpl d0, d1 jbeq 3f movl d1, a0 subl d1, d0 asrl IMM(2),d0 /* calculate size in long words */ #ifndef __mcf5200__ subql IMM(1),d0 /* compensate for dbra terminal count = -1 */ movl d0,d1 /* make a copy in d1 */ swap d1 /* d1 tracks high word */ #endif 2: clrl (a0)+ #ifndef __mcf5200__ dbra d0, 2b subqw IMM(1), d1 jbcc 2b #else subql IMM(1), d0 jne 2b #endif 3: /* copy .data image, if there is one, from ROM to RAM. * We do this with a move.l instruction, since it's a lot faster than the * move.b instruction. * The linker script must ensure that the data section will always be * word-aligned, and its size will always be a multiple of sizeof (long). */ movel IMM(__data_start_rom), d1 /* get source address */ jbeq 31f /* skip if not defined */ movl d1, a0 /* source addr in a0 */ movl IMM(__data_start), a1 /* dest addr in a1 */ movl IMM(_edata), d0 /* end address in d0 */ movl a1, d1 /* calculate size in long words */ subl d1, d0 jbeq 31f /* skip if it's zero */ asrl IMM(2),d0 #ifndef __mcf5200__ subql IMM(1),d0 /* compensate for dbra terminal count = -1 */ movl d0,d1 /* make a copy in d1 */ swap d1 /* d1 tracks high word */ #endif 21: movl (a0)+,(a1)+ #ifndef __mcf5200__ dbra d0, 21b subqw IMM(1), d1 jbcc 21b #else subql IMM(1), d0 jne 21b #endif 31: /* Save the pc value when the exception occurred. */ movel d6,SYM(__unhandled_exception_pc) /* Save vector number of the exception that got us here. */ movel d7,SYM(__unhandled_exception) /* set up initial stack frame */ link a6, IMM(-8) /* * initialize target specific stuff. Only execute this * function if it exists. */ lea SYM (software_init_hook), a0 cmpl IMM(0),a0 jbeq 5f jsr (a0) 5: /* * call the main routine from the application to get it going. * main (argc, argv, environ) * we pass argv as a pointer to NULL. */ #ifdef ADD_DTORS /* put __do_global_dtors in the atexit list so the destructors get run */ movel IMM (SYM(__do_global_dtors)),(sp) jsr SYM (atexit) #endif movel IMM (__FINI_SECTION__),(sp) jsr SYM (atexit) jsr __INIT_SECTION__ pea 0 pea SYM (environ) pea sp@(4) #ifdef __MSHORT__ movew IMM(0),sp@- jsr SYM (main) movew d0, sp@- #else pea 0 jsr SYM (main) movel d0, sp@- #endif /* * drop down into exit incase the user doesn't. This should drop * control back to the ROM monitor, if there is one. This calls the * exit() from the C library so the C++ tables get cleaned up properly. */ jsr SYM (exit) /* Define a default handler for exceptions not otherwise handled in the application code. * We save * Three versions: * - for the original MC68000 and equivalents, we can't determine which vector got us here; * so we put -1 in __unhandled_exception * - for the Coldfire, the vector number is contained in the byte at offset 1 from the stack pointer * - for all other M68K devices, we calculate the vector number * from the vector offset value in the 4th word on the stack. * * for MC68000 & friends, we provide special handlers for bus error and address error * because we can capture the program counter address and vector no. for these exceptions. */ .globl SYM(__vector_buserror_default) SYM (__vector_buserror_default): #if !defined (__mcf5200__) && !defined (__mcpu32__) && !defined (__mc68332__) && !defined(__mc68010__) && !defined (__mc68020__) && !defined (__mc68030__) && !defined (__mc68040__) && !defined (__mc68060__) ori IMM(0x700),sr movel sp@(10),d6 moveql IMM(2),d7 bra 001b #endif .globl SYM(__vector_addrerror_default) SYM (__vector_addrerror_default): #if !defined (__mcf5200__) && !defined (__mcpu32__) && !defined (__mc68332__) && !defined(__mc68010__) && !defined (__mc68020__) && !defined (__mc68030__) && !defined (__mc68040__) && !defined (__mc68060__) ori IMM(0x700),sr movel sp@(10),d6 moveql IMM(3),d7 bra 001b #endif .globl SYM(__vector_default) SYM (__vector_default): #ifdef __mcf5200__ /* Coldfire version: * - put exception PC into __unhandled_exception_pc * - get vector number from stack into d7 * - then join the party at 'start'. */ move IMM(0x2700),sr movel sp@(4),d6 clrl d7 moveb sp@(1),d7 bra 001b #elif defined (__mcpu32__) || defined (__mc68332__) || defined(__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) /* everybody but the MC68000 and coldfire put a vector offset on the stack. */ ori IMM(0x700),sr movel sp@(2),d6 clrl d7 movew sp@(6),d7 lsrw IMM(2),d7 andiw IMM(0xff),d7 bra 001b #else /* MC68000 version */ ori IMM(0x700),sr moveq IMM(-1),d7 bra 001b #endif
/* * Linker script for typical ROM-based M68K embedded applications using COFF obj format. * Copyright © 1997-1999 by Object Software Inc., All Rights Reserved. * * The copyright holder hereby grants permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided * that existing copyright notices are retained in all copies and that this * notice is included verbatim in any distributions. No written agreement, * license, or royalty fee is required for any of the authorized uses. * * This script needs four symbols defined to set the location of RAM and ROM memory: * __rom_start The first address of read-only memory. * All read-only sections are placed here, as well as * a copy of the initialized data to be copied to RAM * by the startup code. * __rom_size the size of the read-only memory block. * __ram_start The first address of read/write memory; * all initialized and uninitialized data goes here. * __ram_size The size of the read/write memory block; * the stack pointer is set to the top of this block. * * In addition, the symbol __vector_default must be defined; this is the address of * the default interrupt/exception handler. Any interrupt vectors which do not have * a specific handler will be set to point to this location. * * These symbols may be defined on the linker command line or in an object file. * * Stack grows down from high memory. * * The memory map look like this: * * ROM * +--------------------+ <- __rom_start * | .vectors | * | .text | * | _etext | * | ctor list | the ctor and dtor lists are for * | dtor list | C++ support * +--------------------+ <- __rom_data_start * | ROM image of .data | * +--------------------+ * * RAM * +--------------------+ <- __ram_start * | .data | initialized data ends up here * | _edata | * +--------------------+ * | .bss | * | __bss_start | start of bss, cleared by crt0 * | _end | start of heap, used by sbrk() * +--------------------+ * . . * . . * . . * | __stack | top of stack (at __ram_start + __ram_size) * +--------------------+ */ STARTUP(rm_crt0.o) OUTPUT_ARCH(m68k) SEARCH_DIR(.) /* INPUT(vectors.o) */ /* GROUP(-ltrgt -lrom -lc -lgcc) */ GROUP(-lbcc -lc -lgcc -lm) __DYNAMIC = 0; __ram_start = 0x03000; __ram_size = 0x05000; __rom_start = 0x90000; __rom_size = 0x70000; __stack = __ram_start + __ram_size - 0x4; __prog_start = __rom_start + 0x10; /* * allocate the stack to be at the top of memory, since the stack * grows down. __boot_stack is the stack pointer value that is stored * in the exception vector table. */ PROVIDE (__stack = __ram_start + __ram_size); PROVIDE (__boot_stack = __ram_start + __ram_size); /* * Initalize some symbols to be zero so we can reference them in the * crt0 without core dumping. These functions are all optional, but * we do this so we can have our crt0 always use them if they exist. * This is so BSPs work better when using the crt0 installed with gcc. * We have to initalize them twice, so we cover a.out (which prepends * an underscore) and coff object file formats. */ PROVIDE (crt0_flags = 0); PROVIDE (_crt0_flags = 0); PROVIDE (hardware_init_hook = 0); PROVIDE (_hardware_init_hook = 0); PROVIDE (software_init_hook = 0); PROVIDE (_software_init_hook = 0); /* Provide default values for the interrupt/exception vectors. * We have a unique name (in vectors.o) for each interrupt/exception vector. * Any that are not explicitly defined in user code will be assigned a default value * by this series of PROVIDE directives. */ /* .vectors, .text, and a copy of .data go into ROM; .data and .bss go into RAM. */ SECTIONS { /* .vectors __rom_start : { __vector_start = .; *(.vectors) } */ /* .text BLOCK (0x4) : */ .text __rom_start : { LONG (0xbeefbeef); LONG (__stack); LONG (__prog_start); LONG (0x0); *(.text) . = ALIGN(0x4); __CTOR_LIST__ = .; LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) *(.ctors) LONG(0) __CTOR_END__ = .; __DTOR_LIST__ = .; LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) *(.dtors) LONG(0) __DTOR_END__ = .; *(.rodata) *(.gcc_exc) *(.gcc_except_table) __INIT_SECTION__ = . ; LONG (0x4e560000) /* linkw %fp,#0 */ *(.init) SHORT (0x4e5e) /* unlk %fp */ SHORT (0x4e75) /* rts */ __FINI_SECTION__ = . ; LONG (0x4e560000) /* linkw %fp,#0 */ *(.fini) SHORT (0x4e5e) /* unlk %fp */ SHORT (0x4e75) /* rts */ /* hardware initialization lists go here */ . = ALIGN (0x4); crt0_initialization_list = .; _crt0_initialization_list = .; *(.crt0ini) . = ALIGN (0x2); LONG (0) /* null pointer terminates list */ _etext = .; *(.lit) . = ALIGN (0x4); __data_start_rom = .; } .data __ram_start : AT (__data_start_rom) { __data_start = .; *(.shdata) *(.data) _edata = .; } .bss BLOCK (0x4) : { __bss_start = . ; *(.shbss) *(.bss) *(COMMON) *(.eh_fram) *(.eh_frame) _end = ALIGN (0x8); __end = _end; } .stab 0 (NOLOAD) : { *(.stab) } .stabstr 0 (NOLOAD) : { *(.stabstr) } }
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |