Intra-library calls do not need symbols exported from the library.
If you write a FSAL, anything you call from your FSAL must be exported.
Anything you call from main() must be exported. If you write any
stand-alone utilities that use anything in the library, the library
function must be exported.
--
Kaleb
On Fri, Aug 23, 2019 at 2:37 PM Jeff Becker <jeff.c.becker(a)gmail.com> wrote:
OK - that worked. However if I want to call functions I defined
(possibly
different functions not called in main()) from parts of
libganesha_nfsd.so, e.g. from nfs_req_creds in support, do I need to do
something similar, or will that work? Thanks.
-Jeff
On Wed, Aug 21, 2019 at 5:18 PM Kaleb Keithley <kkeithle(a)redhat.com>
wrote:
> Hi
>
> I gather you've added calls to these new functions from main()?
>
> Starting with 2.8.0, ganesha.nfsd is a small executable linked to
> libganesha_nfsd.so. The symbols exposed/exported from libganesha_nfsd.so
> are controlled by a linker map. If your symbols aren't included in the
> linker map then they won't found at link time.
>
> You just need to add the new symbols to the linker map in
> .../src/MainNFSD/libganesha_nfsd.ver.
>
>
> On Wed, Aug 21, 2019 at 7:29 PM Jeff Becker <jeff.c.becker(a)gmail.com>
> wrote:
>
>> Hi. I cloned the latest git tree, checked out v2.8.2 and made sure I
>> could build it correctly. Then I created a new branch, in which I added a
>> single .c file in its own directory, as well as a .h file in the
>> src/include directory. I've been trying to modify various CMakeLists.txt
>> files to try to get it built. Although it gets compiled, when the final
>> link happens for ganesha.nfsd, the symbols from my .c file are not found. I
>> can get around this by adding my .c.o compiled file at the beginning of the
>> compile line, but I'd like to know how to get this to link properly. I
>> tried following the way FSAL and idmapper are built without success. Advice
>> appreciated. Thanks.
>>
>> -Jeff
>> _______________________________________________
>> Devel mailing list -- devel(a)lists.nfs-ganesha.org
>> To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org
>>
>