EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: softiIoc and softIocPVA incomplete on VxWorks (and others?)
From: "Zimoch Dirk \(PSI\) via Core-talk" <core-talk at aps.anl.gov>
To: "'core-talk at aps.anl.gov'" <core-talk at aps.anl.gov>
Date: Wed, 9 Jun 2021 08:35:52 +0000
On VxWorks, softIoc.munch and softioc.PVA.munch are statically linked. As normal with static linkage, only those symbols actually used in the program are copied into the program. While this is usually totally sufficient, it becomes a problem when the statically linked program dynamically loads plugins as possible with 'dlload' (or 'ld' on VxWorks).
Those dynamically loaded plugins may use EPICS functions that are defined but not used in EPICS Base itself, resulting in load errors like this:
Warning: module 0x76a130 holds reference to undefined symbol epicsMessageQueueReceiveWithTimeout.

I have seen this on VxWorks only, as this is the only platform where I use static linkage with dynamic loading of modules. But I guess that other platforms may be affected as well. As I have never seen any complaints about this behavior, I may be the only one who uses softIoc this way.

Anyway, the problem is easy to fix, and I would appreciate to have the fix included future EPICS releases:
Add the linker flag -whole-archive when building softIoc/softIocPVA.
I have added PROD_LDFLAGS_vxWorks = --whole-archive to modules/database/src/std/softIoc/Makefile and modules/pva2pva/pdbApp/Makefile.
Maybe this or something similar (I don't know the corresponding Windows linker flag) should be done not only for VxWorks but for all statically built versions.

Dirk

Replies:
Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Bug in vxWorks implementation and/or usage of epicsAtomicCmpAndSwapIntT Zimoch Dirk (PSI) via Core-talk
Next: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Bug in vxWorks implementation and/or usage of epicsAtomicCmpAndSwapIntT Zimoch Dirk (PSI) via Core-talk
Next: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024