This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ld includes entire archive (.a) when compiling .elf file


The map file says the archive member is included.  However, I only make
one call to an empty function (I'm testing to see what's included) in my
main() called OSInitHookEnd (first line listed below).  I'm not sure why
it's pulling in the rest of the libucos_ii.a archive.
-Josh

The top of the map file is as follows:

$ more main.map
Archive member included because of file (symbol)

ucos_ii/libucos_ii.a(os_cpu_c.o)
                              main.o (OSInitHookEnd)
ucos_ii/libucos_ii.a(os_core.o)
                              ucos_ii/libucos_ii.a(os_cpu_c.o)
(OSIntCtxSwFlag)
ucos_ii/libucos_ii.a(os_mem.o)
                              ucos_ii/libucos_ii.a(os_core.o)
(OS_MemInit)
ucos_ii/libucos_ii.a(os_q.o)  ucos_ii/libucos_ii.a(os_core.o) (OS_QInit)
ucos_ii/libucos_ii.a(os_task.o)
                              ucos_ii/libucos_ii.a(os_core.o)
(OSTaskCreateExt)
ucos_ii/libucos_ii.a(os_cpu_a.o)
                              ucos_ii/libucos_ii.a(os_core.o)
(OSStartHighRdy)
ucos_ii/libucos_ii.a(os_time.o)
                              ucos_ii/libucos_ii.a(os_core.o)
(OSTimeDly)
/usr/local/gnu/lib/gcc-lib/arm-elf/3.3/libgcc.a(_udivsi3.o)
                              main.o (__udivsi3)
/usr/local/gnu/lib/gcc-lib/arm-elf/3.3/libgcc.a(_dvmd_tls.o)
 
/usr/local/gnu/lib/gcc-lib/arm-elf/3.3/libgcc.a(_udivsi3.o) (__div0)
/usr/local/gnu/lib/gcc-lib/arm-elf/3.3/../../../../arm-elf/lib/libc.a(st
rlen.o)
                              interrupt_Usart.o (strlen) 

 BTW, the end application is a small microcontroller (with 64kb of FLASH
w/16kb of RAM) so code space is an issue for me.  I plan on switching
the processor into THUMB mode later once I have these kinks worked out.
Thanks!

-Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]