[En-Nut-Discussion] Strange newlib syscall dependencies / linker problems when using 64bit integers

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Feb 20 21:28:57 CET 2012


Hi all,

I've been on a business trip for the last week, so sorry for the late
answer.

> Some days ago there have been problems with linking using 64bit integers and im not shure if a solution was found. I stumbled over the same problem and found the following solution for me (Ethernut 4.10, yagarto).
> the following:
> ---
>   /* .ARM.exidx is sorted, so has to go in its own output section.  kl for using long long*/
>   .ARM.exidx : {
>     __exidx_start = .;
>     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
>     __exidx_end = .;
>   } >rom
> ---
> was added to my .ld file right after the .text segment
> 
> Somewhere i had to create the empty functions:
> ---
> void _sbrk(void){
> }
> 
> void _getpid(void){
> }
> 
> void _kill(void){
> }
> 
> void _exit(int status){
> 	while(1){;}
> }

Yes this is the solution. I decided to go another way and to use only
32bit integers after a redesign of my algorithm.

The mentioned function stubs are the needed "syscall" stubs for Newlib.
In fact they hopefully won't ever be used. The _exit() function will
only be called in case of a "software exeption" like a division by zero.

Bye,

Ole


-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list