Problem linking a function written in assembly

15 views
Skip to first unread message

Pradeep

unread,
Dec 30, 2009, 8:54:31 AM12/30/09
to android-ndk
Hi,

In my .S file I have defined a function Test() as external symbol
using following directives
.global _Test
.extern _Test

and then after defining _Test am calling it from a .c file but I get
a linker error "undefined reference to 'Test'".

The same code works in some other platform. What is missing ?

Regards,
Pradeep


Tristan Miller

unread,
Dec 30, 2009, 7:26:23 PM12/30/09
to andro...@googlegroups.com

I'm pretty sure that in Linux-ARM, C symbols aren't preceded by underscores.

Tristan Miller





--

You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Pradeep

unread,
Jan 6, 2010, 4:15:46 AM1/6/10
to android-ndk
Thanks !

On Dec 31 2009, 5:26 am, Tristan Miller <trisman...@gmail.com> wrote:
> I'm pretty sure that in Linux-ARM, C symbols aren't preceded by underscores.
>
> Tristan Miller
>

> On Dec 30, 2009 7:15 PM, "Pradeep" <bhatt.prad...@gmail.com> wrote:
>
> Hi,
>
> In my .S file I have defined a function Test() as external symbol
> using following directives
> .global _Test
> .extern _Test
>
> and then after defining _Test  am calling it from a .c file but I get
> a  linker error "undefined reference to 'Test'".
>
> The same code works in some other platform. What is missing ?
>
> Regards,
> Pradeep
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to

> android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>

Reply all
Reply to author
Forward
0 new messages