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

From: Erwin Authried (eauth@softsys.co.at)
Date: Mon Sep 03 2001 - 06:38:20 EDT


Joaquin Garay schrieb:

> Umm, seems I didn't make it clear enough, so I'm going to explain
> exactly what I'm doing setp by step:
>
> - First I need to create three libraries, so I compile the sources to
> object and put them together:
>
> m68k-pic-coff-gcc -fPIC -O2 -c some_source_file.c
> m68k-pic-coff-ar cr libmy_library.a first_file.o second_file.o ...
> m68k-pic-coff-ranlib libmy_library.a
>
> - The I compile the last file and link it with the libraries and a file
> containig only _cleanup(){} (cleanup.o):
>
> m68k-pic-coff-gcc -fPIC -O2 -c my_program.c
> m68k-pic-coff-gcc -fPIC -O2 -c cleanup.c
> m68k-pic-coff-gcc -O2 -fPIC -o my_program source_file.o cleanup.o
> -lmy_library
>
> - And now I get the following errors:
>
> /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
>
> Now, somebody knows what I'm doing wrong? AFAIK I'm doing everything
> I've to do when I've to do it... or not?
>
> jokin

It seems that the offset between _cleanup and libgcc is still too large. Please try
to add
cleanup.o to your C library (libc.a). This will not solve the "a5world is full"
message, you
have to reduce the size of data + bss too.

-Erwin

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