* RE: [ECOS] Executable Size
@ 2001-05-31 11:12 Dan Conti
0 siblings, 0 replies; 5+ messages in thread
From: Dan Conti @ 2001-05-31 11:12 UTC (permalink / raw)
To: ecos-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
> -----Original Message-----
> From: Carlos Camargo [ mailto:carlos_ivan_camargo@yahoo.com ]
[snip]
> arm-elf-gcc -mcpu=arm7di -c -o twothreads.o -static
> -Wall -I/root/ecos-work/install/include
> -ffunction-sections -fdata-sections twothreads.c
> arm-elf-gcc -mcpu=arm7di -nostartfiles
> -L/root/ecos-work/install/lib -Wl,--gc-sections -o
> twothreads twothreads.o -Ttarget.ld -nostdlib
>
>
> text data bss dec hex filename
> 45880 1956 23544 71380 116d4 twothreads
>
> But, i don`t understand this information, when i use
> man size don´t provide information about this format
It's giving you the size in bytes of each of the sections (sort of).
text is the size of the code, so 45k code. data is, i believe, both the
.data section and the .rodata section (which are preinitialized data,
the latter being const). bss is zero initialized data. the next value,
dec, is the total size in decimal, and the following one, hex, is the
total size in hex.
It's quite easy to get very small images with eCos. I've packed a lot
into a 160k image. :)
-Dan
>
> Thanks Carlos Camargo
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Executable Size
2001-05-31 10:45 ` Carlos Camargo
@ 2001-05-31 11:26 ` Jonathan Larmour
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-05-31 11:26 UTC (permalink / raw)
To: Carlos Camargo; +Cc: 'ecos-discuss@sources.redhat.com'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
Carlos Camargo wrote:
>
> text data bss dec hex filename
> 45880 1956 23544 71380 116d4 twothreads
>
> But, i don`t understand this information, when i use
> man size don´t provide information about this format
Try "info size" which is a little bit better.
But basically, text==code, and data+bss==your program data. This totals
71380 bytes in this case (rather large for such a simple case, but easily
reduced by tailoring your eCos configuration if you choose).
For a program programmed into ROM/Flash, you would find the total ROM usage
to be text+data, and the total RAM usage to be data+bss.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Executable Size
2001-05-31 10:15 ` Jonathan Larmour
@ 2001-05-31 10:45 ` Carlos Camargo
2001-05-31 11:26 ` Jonathan Larmour
0 siblings, 1 reply; 5+ messages in thread
From: Carlos Camargo @ 2001-05-31 10:45 UTC (permalink / raw)
To: Jonathan Larmour; +Cc: 'ecos-discuss@sources.redhat.com'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
Hi..
Jonathan thanks for your answer..
When i compile the twothreads example:
arm-elf-gcc -mcpu=arm7di -c -o twothreads.o -g -Wall
-I/root/ecos-work/install/include -ffunction-sections
-fdata-sections twothreads.c
arm-elf-gcc -mcpu=arm7di -nostartfiles
-L/root/ecos-work/install/lib -Wl,--gc-sections -o
twothreads twothreads.o -Ttarget.ld -nostdlib
and i execute arm-elf-size twothreads:
text data bss dec hex filename
45880 1956 23544 71380 116d4 twothreads
When i Buils whitout "-g" option
arm-elf-gcc -mcpu=arm7di -c -o twothreads.o -static
-Wall -I/root/ecos-work/install/include
-ffunction-sections -fdata-sections twothreads.c
arm-elf-gcc -mcpu=arm7di -nostartfiles
-L/root/ecos-work/install/lib -Wl,--gc-sections -o
twothreads twothreads.o -Ttarget.ld -nostdlib
text data bss dec hex filename
45880 1956 23544 71380 116d4 twothreads
But, i don`t understand this information, when i use
man size don´t provide information about this format
Thanks Carlos Camargo
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Executable Size
2001-05-31 10:02 ` [ECOS] Executable Size Carlos Camargo
@ 2001-05-31 10:15 ` Jonathan Larmour
2001-05-31 10:45 ` Carlos Camargo
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Larmour @ 2001-05-31 10:15 UTC (permalink / raw)
To: Carlos Camargo; +Cc: 'ecos-discuss@sources.redhat.com'
>
> When i compile the hello world example the executable
> size is 1.1M, is this posible???
The executable size may be 1.1M, but that's because of debug information.
Use arm-elf-size on the executable to get the true size.
But you're correct that more unnecessary stuff could be stripped out by
judicious configuration of eCos using the Configuration Tool. But that's up
to you. At least, the situation is not what you think anyway.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] Executable Size
2001-05-31 8:35 [ECOS] What is RedBoot_INIT_TAB, Narayana, Venkat A.
@ 2001-05-31 10:02 ` Carlos Camargo
2001-05-31 10:15 ` Jonathan Larmour
0 siblings, 1 reply; 5+ messages in thread
From: Carlos Camargo @ 2001-05-31 10:02 UTC (permalink / raw)
To: Narayana, Venkat A., 'ecos-discuss@sources.redhat.com'
Hi all.
I have a question:
I have arm evaluator 7t, i build ecos:
ecosconfig new e7t
ecosconfig tree
make
The Makefile is:
PKG_INSTALL_DIR = /root/ecos-work/install
XCC = arm-elf-gcc -mcpu=arm7di
ifeq ($(XCC),sh-elf-gcc)
#CFLAGS = -ggdb
else
#CFLAGS = -g
CFLAGS = -static
endif
CXXFLAGS = $(CFLAGS)
EXTRACFLAGS = -Wall -I$(PKG_INSTALL_DIR)/include
-ffunction-sections -fdata-sections
EXTRACXXFLAGS = $(EXTRACFLAGS) -fno-exceptions
-fno-rtti -fvtable-gc -finit-priority
LDFLAGS = -nostartfiles -L$(PKG_INSTALL_DIR)/lib
-Wl,--gc-sections
LIBS = -Ttarget.ld -nostdlib
LD = $(XCC)
XCXX = $(XCC)
When i compile the hello world example the executable
size is 1.1M, is this posible??? How i Can erase
drivers for ecos in linux???
Thanks
Carlos Camargo
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-05-31 11:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-31 11:12 [ECOS] Executable Size Dan Conti
-- strict thread matches above, loose matches on Subject: below --
2001-05-31 8:35 [ECOS] What is RedBoot_INIT_TAB, Narayana, Venkat A.
2001-05-31 10:02 ` [ECOS] Executable Size Carlos Camargo
2001-05-31 10:15 ` Jonathan Larmour
2001-05-31 10:45 ` Carlos Camargo
2001-05-31 11:26 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).