[En-Nut-Discussion] Some notes on using GCC 4.4.1 (eh_frame)

Ulrich Prinz uprinz2 at netscape.net
Sun Sep 6 18:06:43 CEST 2009


Hmmm...

I installed the latest version from your hompage and got stuck at some 
other points too:

Building NutO/S fails as the new version likes to have unsetenv() return 
an int. I fixed that in nut/crt/setenv.c

The question ist, how can I detect the GCC version in the sources to 
compile the right unsetenv() version?

Now I compiled my application and it breaks too:

c:/programme/yagarto/bin/../lib/gcc/arm-elf/4.4.1/../../../../arm-elf/lib\libc.a
(lib_a-mallocr.o): In function `malloc_extend_top':
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
newlib-1.17.0/newlib/libc/stdlib/mallocr.c:2160: undefined reference to 
`_sbrk_r
'
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
newlib-1.17.0/newlib/libc/stdlib/mallocr.c:2197: undefined reference to 
`_sbrk_r
'
c:/programme/yagarto/bin/../lib/gcc/arm-elf/4.4.1/../../../../arm-elf/lib\libc.a
(lib_a-freer.o): In function `_malloc_trim_r':
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3326: undefined reference to 
`_sbrk_r
'
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3335: undefined reference to 
`_sbrk_r
'
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3340: undefined reference to 
`_sbrk_r
'
collect2: ld returned 1 exit status
make: *** [sam7x_ek_mineguard.elf] Error 1

So here I have two questions...
First, I can only find  _sbrk() functions... So here again the question 
how to map them to the newlib the best way, without leaving users with 
older yagarto versions in the rain?

Second, I do not have any path on my C: drive like that one:
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../.

Could it be, that there is something broken with this yagarto version?
A quich arm-elf-gcc --version showes:
arm-elf-gcc (GCC) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is 
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

Thanks in advance and best regards
Ulrich

Michael Fischer schrieb:
> Hello list,
> 
> I do not know if this is a general 4.4.x problem, but if you
> using YAGARTO based on GCC 4.4.1 and if you get an error like:
> 
> error: no memory region specified for loadable section `.eh_frame'
> 
> you must add an eh_frame in your linker script too.
> 
> In case of the at91sam7se512_ram.ld file, place the following
> part after the .text section:
> 
>    . = ALIGN(4);
>    .eh_frame :
>    {
>      KEEP (*(.eh_frame))
>    } > ram
> 
> 
> Best regards,
> 
> Michael
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list