Hello, I've setup a project using autoconf/automake/libtool in which I create in the same row a static/shared library and a binary written in assembly and not linked to c, plus a test-case I also wrote in c. However the test-case (for which I wrote a header file complying with my library definitions) segfaults as soon as I attempt to link with it, even if I'm not using any of the functions it provides. This is something which doesn't happen if I link against the static version, though I'm not experienced enough so as to know why. Actually I've noticed a subtle difference in the shared version: 00001cc8 a _DYNAMIC 00001db4 a _GLOBAL_OFFSET_TABLE_ Those symbols appears as external in anyother shared library on my system, though I haven't found a way of make it change unless I'm supossed to create my own link script for this library (neither I'd know). These are outputs I've pasted for if anyone could give me a hint: the c-test case (segfaults on _IO_vfprintf_internal) as soon as I try to link with my library: http://pastebin.ca/731746 nm's output of such a library: http://pastebin.ca/731775 and the output from make when building it: http://pastebin.ca/731776 What I did was to define BUILDING_LIBRARY when doing so, and then _init_lib gets declared instead of _start , and vicercersa when not, right at the end the test-case gets built. Regards, ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- Prev by Date: Re: how to return a pointer to pointer
- Next by Date: Unable to use a variable in instruction
- Previous by thread: how to return a pointer to pointer
- Next by thread: Unable to use a variable in instruction
- Index(es):