[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files |
Date: |
Sun, 7 Sep 2008 19:45:33 +0200 (MET DST) |
Shilin Yu <address@hidden> wrote:
> the assembly file like this:
> .extern sched_mode
..extern is almost a no-op in GNU assembler. It declares a symbol
"undefined external". However, whenever the assembler encounters an
unknown (yet) symbol, it automatically classifies it "undefined
external", so in effect, .extern is almost only a comment to the
reader of the program to declare the intentions of the developer.
What you want is called .global; it declares a symbol as being
publically available to the linker. By default, a symbol is local to
the current module only, and not exported to the linker.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Re: [avr-gcc-list] Link Eorror in Combining C and assembly source files,
Joerg Wunsch <=