[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [avr-gcc-list] AVR-GCC--linker problems

From: Haase Bjoern (PT-BEU/EMT) *
Subject: AW: [avr-gcc-list] AVR-GCC--linker problems
Date: Tue, 28 Mar 2006 16:33:36 +0200

These two functions initialize and delete global static data structures. The 
references to these symbols are generated in each gcc file and they are, imo, 
necessary in order to run C code because gcc assumes that the variables are 
initialized on program start.
The functions are defined in avr-libc's crt function and in libgcc (part of the 
compiler itself.).

If you want to write your own initialization routines: Go ahead and define a 
dummy assembler file

   .global __do_clear_bss   
   .global __do_copy_data

And ld will no longer use the code from the libraries. But better be careful. 


-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von maha
Gesendet: Montag, 27. März 2006 09:00
An: address@hidden
Betreff: [avr-gcc-list] AVR-GCC--linker problems

    I have a little questions about avr-gcc...
    What's the functions about "__do_clear_bss" and "__do_copy_data"? Do I
to use them? Do I have other ways can replce them?( disappear them in my
test.o )
    Because I have to link and relocate symbols by myself. But, I don't know
how to link symbols that references to libraries.
    Can I pass test.o back to AVR-GCC and handles libraries linking after
done my work?( complete relocatable symbols' linking )
    And, where can I find more informations about this question?
    ./nm test.o     ( compiled but no linking )
00000000 a *ABS*
0000003e a __SP_H__
0000003d a __SP_L__
0000003f  a __SREG__
               U __do_clear_bss        <--\
               U __do_copy_data      <---- How to take them away and has no
00000000 a __tmp_reg__                  function about test.o
00000001 a __zero_reg__                                        
00000008 T cleanup_module                                         or
00000000 T init_module
               U ker_led                   <--Can I pass this test.o back to
avr-gcc to handles  
                                                   __do_clear_bss and
__do_copy_data after linking
                                                   ker_led by myself ?

  Help me please, Thanks a lot~


View this message in context: 
Sent from the AVR - gcc forum at Nabble.com.

AVR-GCC-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]