Re: [uCsimm] m68k-pic32, adding _cleanup to libc

From: Phil Wilshire (philw@lineo.com)
Date: Fri Aug 31 2001 - 05:15:08 EDT


Joaquin
One solution to this is to add a dummy _cleanup function to crt0.S

_cleanup(){}

Make sure you are using the modified crt0.S attached (cleanup is not in
this one)

Phil
>
> Hi all,
>
> I'm trying to finish my project with the ucsimm and I have to fix the
> last errors before I start my exams. I'm using Erwin's 32-bit PIC patch
> for the gcc and the uclinux 2.0.38 kernel. And after removing all the
> errors I've found this last one.
>
> /opt/uClinux/m68k-pic-coff/bin/gld: region a5world is full (snmpd
> section .bss)
> /opt/uClinux/lib/gcc-lib/m68k-pic-coff/2.7.2.3-pic-060999/libgcc.a(_exit.o):
> In function `exit':
> libgcc2.c(.text+0xc): relocation truncated to fit: DISP16 _cleanup
> mv: cannot stat `snmpd': No such file or directory
> Can't open snmpd.coff
>
> So, what's happening? I've compiled all the objects with the -fPIC flag
> even if it was not necesary. What do I have to do, recompile libc with
> the new compiler? Add the _cleanup function to the library instead of
> adding it when compiling the executable? (I'm trying not to look at the
> line saying region a5world is full, it scares me) I've to say that I
> would like to have it finished NOW (during the next two weeks I have
> enough to do preparing my exams to be worrying about it)
>
> Any suggestions will be _desesperately_ welcome. (Erwin, Tom, are you
> there?)
>
> jokin
> This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/

-- 
Phil Wilshire
Wizard Trainer  -- Lineo Inc. -- Where Open Meets Smart
Tel: (703) 863-0715

.global __start .global __main .global _end .global __data_start

.bss .global environ environ: .long 0

.text __start: nop nop

movea.l %d5, %a5

lea __bss_start(%a5), %a0 lea end(%a5), %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1: movel #0, %a0@+ cmpal %a0, %a1 bhi L1

move.l 8(%sp), %d5 move.l %d5, environ(%a5) lea main-.-8,%a0 jsr 0(%pc,%a0) move.l %d0,%sp@- lea exit-.-8,%a0 jsr 0(%pc,%a0) /* Invoke exit() routine */

#ifdef NO_LIBGCC /* If that didn't kill us, ... */ _exit: move.l %sp@+,%d1 moveq #1,%d0 /* SYS_exit */ trap #0

__main: rts #else

#endif /* NO_LIBGCC */

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:44 EST