EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

address 0xcaa58 of test section .bss is not within region ram

Started by mantaray August 23, 2004
Hello,

I am a newbie developing a httpd application on eCos plaform. I got
the following error while compiling a httpd application using arm-elf:

[root@localhost httpd_application]# make
make -C ../libhttpd-1.3/src -f Make.eCos HOME=`pwd`
make[1]: Entering directory `/root/httpd_test/libhttpd-1.3/src'
make[1]: `libhttp.a' is up to date.
make[1]: Leaving directory `/root/httpd_test/libhttpd-1.3/src'
arm-elf-gcc -c -D_eCos  -mcpu=arm7tdmi -mno-short-load-words -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections
-fno-rtti
-fno-exceptions -fvtable-gc -finit-priority
-I/root/httpd_test/ecos_kernel/install/include -I../libhttpd-1.3/src
test_httpd.c
In file included from test_httpd.c:39:
../libhttpd-1.3/src/httpd.h:121: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:124: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:181: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:181: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:182: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:183: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:184: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:185: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:185: warning: function declaration isn't a
prototype
../libhttpd-1.3/src/httpd.h:199: warning: function declaration isn't a
prototype
test_httpd.c:60: warning: function declaration isn't a prototype
test_httpd.c:93: warning: function declaration isn't a prototype
test_httpd.c: In function `test2_html':
test_httpd.c:116: warning: implicit declaration of function
`show_network_tables'
test_httpd.c: At top level:
test_httpd.c:122: warning: function declaration isn't a prototype
test_httpd.c:134: warning: function declaration isn't a prototype
test_httpd.c: In function `login_html':
test_httpd.c:136: warning: implicit declaration of function
`httpdAuthenticate'
test_httpd.c: At top level:
test_httpd.c:150: warning: function declaration isn't a prototype
test_httpd.c: In function `login2_html':
test_httpd.c:160: warning: implicit declaration of function
`httpdForceAuthenticate'
test_httpd.c: At top level:
test_httpd.c:169: warning: function declaration isn't a prototype
test_httpd.c: In function `httpd_test':
test_httpd.c:193: warning: implicit declaration of function
`init_all_network_interfaces'
test_httpd.c:231: warning: implicit declaration of function `exit'
test_httpd.c:175: warning: unused variable `errFlag'
test_httpd.c: In function `cyg_start':
test_httpd.c:302: warning: passing arg 2 of `cyg_thread_create' from
incompatible pointer type
arm-elf-gcc -mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections
-Wl,-static -g -nostdlib -L/root/httpd_test/ecos_kernel/install/lib
-Ttarget.ld test_httpd.o -L../libhttpd-1.3/src -lhttp -o test
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld:
address 0xcaa58 of test section .bss is not within region ram
collect2: ld returned 1 exit status
make: *** [test] Error 1

What is the reason for getting the error of "section .bss is not
within region ram" for this case?

How can I remedy this problem? (Are there some variables which I need
to change to define the ram region?)

Thanks in advance!
egeus@rocketmail.com (mantaray) wrote in
news:1d23bfdd.0408230818.5eea79c9@posting.google.com: 


> rm-elf/bin/ld: address 0xcaa58 of test section .bss is not within region > ram collect2: ld returned 1 exit status > make: *** [test] Error 1 > > What is the reason for getting the error of "section .bss is not > within region ram" for this case?
Time to look at your map file and see where things are being allocated. Then create your own custom linker control file (modify the default one being used now) and change the 'ram' region size to match your system. Or you may simply be out of memory and the .bss section has overflowed available ram. -- - Mark -> --
mantaray wrote:
> Hello, > > I am a newbie developing a httpd application on eCos plaform. I got > the following error while compiling a httpd application using arm-elf: > > [root@localhost httpd_application]# make > make -C ../libhttpd-1.3/src -f Make.eCos HOME=`pwd` > make[1]: Entering directory `/root/httpd_test/libhttpd-1.3/src' > make[1]: `libhttp.a' is up to date. > make[1]: Leaving directory `/root/httpd_test/libhttpd-1.3/src' > arm-elf-gcc -c -D_eCos -mcpu=arm7tdmi -mno-short-load-words -Wall > -Wpointer-arith -Wstrict-prototypes -Winline -Wundef > -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections > -fno-rtti > -fno-exceptions -fvtable-gc -finit-priority > -I/root/httpd_test/ecos_kernel/install/include -I../libhttpd-1.3/src > test_httpd.c > In file included from test_httpd.c:39: > ../libhttpd-1.3/src/httpd.h:121: warning: function declaration isn't a > prototype
This means that your header file is not compliant to the standard.
> test_httpd.c: In function `test2_html': > test_httpd.c:116: warning: implicit declaration of function > `show_network_tables'
This means that the function is not declared to the compiler in a heaader, maybe a mis-print in the call.
> test_httpd.c: In function `cyg_start': > test_httpd.c:302: warning: passing arg 2 of `cyg_thread_create' from > incompatible pointer type
The pointer in second argument of cyg_thread_create() is wrong.
> arm-elf-gcc -mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections > -Wl,-static -g -nostdlib -L/root/httpd_test/ecos_kernel/install/lib > -Ttarget.ld test_httpd.o -L../libhttpd-1.3/src -lhttp -o test > /opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: > address 0xcaa58 of test section .bss is not within region ram > > What is the reason for getting the error of "section .bss is not > within region ram" for this case? > > How can I remedy this problem? (Are there some variables which I need > to change to define the ram region?) >
Show the contents of the file target.ld. Check that the memory ranges in the loader script matches your hardware. If it is correct, your program + data is too large. The section .bss in C runtime code contains the unintialized static data of the program. HTH Tauno Voipio tauno voipio (at) iki fi
>I am a newbie developing a httpd application on eCos plaform.
You are making another newbie mistake by trying to fix the error message and ignoring the tons of warning messages you're getting. Newbies think "well, it's just a warnng, not a real error" but such things can create very hard to find bugs later on and some of those warnings might actually be causing the error(s) you get. Been there. Done that. :-/

The 2024 Embedded Online Conference