Hi I have the following assembly code ,
.export __ls__11NSDOM_EncapFf
.text
__ls__11NSDOM_EncapFf:
/* first load the symbolic constant*/
movq _IEEE_FP@GOTPCREL(%rip), %r8 /*%r8 is a scratch register*/
movq (%r8), %r9 /* %r9 and %r11 are scratch registers*/
movl (%r9), %r11d
/* second, see if it is zero and branch accordingly */
test %r11d, %r11d /* zero call TNS procedure */
/* non-zero call IEEE procedure */
je ____ls__11NSDOM_EncapFf_tns/* constant equals 0 */
jmp ____ls__11NSDOM_EncapFf_ieee/* constant not equal to 0 */
ret
I compile the .s file to .o file(compilation is fine) , but when I link this .o with other .o files it is failing due to unresolved reference to _ls_11NSDOM_EncapFf. I am using GNU assembler 2.19.1 on HP Non stop system, X86-64 bit architecture. Please help me to resolve the issue.
You'll need to set your symbol global for it to be externally linkable;
.text
.global __ls__11NSDOM_EncapFf /* Sets the symbol externally linkable */
__ls__11NSDOM_EncapFf:
/* first load the symbolic constant*/
...
Use .global symbol
or .globl symbol
(see Using as - Assembler directives).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With