Skip to contentSkip to conversation

Unable To Jump To Undefined Symbol

DISCUSSION Deepak Pandey 3 participants 3 messages Mar 14, 2006

lore
Share & tools
lore
#0 lore raw

Hi,
I got a compilation problem saying UNABLE TO JUMP TO UNDEFIND SYMBOL
while compiling a code in which I tried to jump to a symbol(symbol_name) from a different file by an assembly instruction (j symbol_name).However I also declared the symbol as global(.globl symbol_name) but still it didnot worked. The Symbol was defined as follows:

        LEAF(symbol_name)
    /*some assembly instructions*/
    END(symbol_name)

Thanks in Advance.

#1 lore raw
Quoted 5 lines · Deepak Pandey

Hi, I got a compilation problem saying UNABLE TO JUMP TO UNDEFIND SYMBOL while compiling a code in which I tried to jump to a symbol(symbol_name) from a different file by an assembly instruction (j symbol_name).However I also declared the symbol as global(.globl symbol_name) but still it didnot worked.

You need to tell the assembler in the file which references the symbol that it's out there. Use extern, EXTRN or whatever directive your assembler supports for this purpose.

Quoted 4 lines

The Symbol was defined as follows:
LEAF(symbol_name)

      /*some assembly instructions*/

END(symbol_name)

What assembler uses these syntactic constructs?

Leslie

Signature · 2 lines
gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289
http://nic-nac-project.de/~skypher/
#2 lore raw
In reply to Deepak Pandey

yup, as leslie pointed out, you need an EXTRN directive so that undefined refernces are handled by the linker. and what is LEAF, END ???

Quoted 7 lines · Deepak Pandey

Hi,
I got a compilation problem saying UNABLE TO JUMP TO UNDEFIND SYMBOL
while compiling a code in which I tried to jump to a symbol(symbol_name) from a different file by an assembly instruction (j symbol_name).However I also declared the symbol as global(.globl symbol_name) but still it didnot worked.
The Symbol was defined as follows:

Quoted 9 lines
         LEAF(symbol_name)
     /*some assembly instructions*/
     END(symbol_name)

Thanks in Advance.
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
The person who cannot reason is a fool, one who won't reason is a bigot, one who dare not reason is a slave.