This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
not strictly speaking a cross-compiler question but i'm hoping someone here has a solution. with an SH3eb toolchain i created with crosstool, i wanted to compile and link some source files i got from someone else -- some C files and a couple assembler files. the source files will call routines in the .asm files as sub1(), and the .asm files will define those global entry points with .global _sub1 (note the leading "_") ... _sub1: ... the compilation (and assembly) of the individual files works fine, but the link step fails, claiming that the name "sub1" is an undefined reference from the calling file. this just shows how long it's been since i've messed with this, but what's the rule on C/asm linkage and that leading underscore? didn't it used to be necessary? the symbol table of the assembler object file shows: ... T _sub1 so that's the name in the object file's symbol table. and the symbol table in the calling object file contains: ... U sub1 so there's a clear mismatch based on that leading underscore. i've been assured this all compiled and linked under a commercial vendor's toolchain for this architecture. can anyone point me at a page outlining the rules for linkage here? thanks. rday ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |