Export symbols of library though same symbol is exposed already using diff library
We have a scenario where Library A and Library B has many duplicate function definition, because of which finding difficulties in using exposed symbols.
In this case A and B are independent libraries and loaded separately. So in a system if library A is loaded first then always symbols of A is used. Later at runtime if library B is loaded, it's functions are not getting exposed, library B starts using the functions of library A. Because of this static variable of library A is getting updated. Later if some application tries to use library A directly because of static value change, unexpected behavior is seen.
So here our question is, is it possible to tell library B to use its function even if library A's functions are already exposed.
Note we can't use export or inline as almost all the functions of library A and library B are same.
Can this be achieved using Makefile change?
When you build library B you can pass -Bsymbolic to ld
from ld man page
But the question why you should mix such similar libraries?
|All times are GMT -5. The time now is 05:55 PM.|