E
Erik Leunissen
Hello all,
I want to distribute a shared library (lets call it "parent.so"), which,
in turn, is used to create shared libs by invoking the GNU linker (lets
call these shared libs "child.so").
When creating "child.so", some code which needs to be incorporated into
each "child.so" comes from "parent.so" itself. I fully control how
"parent.so" is built, but the problem is that I want to strip all
symbols from "parent.so" before distribution.
I understand that in order to perform the link step for creating a
"child.so", the linker needs to know at which locations in parent.so
certain symbols reside. If "parent.so" itself doesn't have this
information in a regular way,
Is there any (possibly wild) way to inform the linker about what parts
of "parent.so" need to be linked with "child.so", if that information
cannot come the regular way from "parent.so" itself?
I've been looking into command line options to ld, and some of them seem
to come close to what I might need (e.g. some let you specify symbols,
some of them let you specify other files that have symbol information,
....). But to be honest, I don't completely understand many of them.
I have been thinking about:
- using the link map from the link process that generated "parent.so" as
a source of information about the location of certain symbols;
- somehow using the linker command language;
- ...
Being unfamiliar with details of the linking process, and not fully
understanding the command line options, let alone the possibilities that
the linker command language offers, I'm stuck.
I'd appreciate very much if someone pointed me to possibly feasible ways
if these exists; or otherwise be explicit if there is definitely no way
to do what I want.
Thanks in advance,
Erik Leunissen
I want to distribute a shared library (lets call it "parent.so"), which,
in turn, is used to create shared libs by invoking the GNU linker (lets
call these shared libs "child.so").
When creating "child.so", some code which needs to be incorporated into
each "child.so" comes from "parent.so" itself. I fully control how
"parent.so" is built, but the problem is that I want to strip all
symbols from "parent.so" before distribution.
I understand that in order to perform the link step for creating a
"child.so", the linker needs to know at which locations in parent.so
certain symbols reside. If "parent.so" itself doesn't have this
information in a regular way,
Is there any (possibly wild) way to inform the linker about what parts
of "parent.so" need to be linked with "child.so", if that information
cannot come the regular way from "parent.so" itself?
I've been looking into command line options to ld, and some of them seem
to come close to what I might need (e.g. some let you specify symbols,
some of them let you specify other files that have symbol information,
....). But to be honest, I don't completely understand many of them.
I have been thinking about:
- using the link map from the link process that generated "parent.so" as
a source of information about the location of certain symbols;
- somehow using the linker command language;
- ...
Being unfamiliar with details of the linking process, and not fully
understanding the command line options, let alone the possibilities that
the linker command language offers, I'm stuck.
I'd appreciate very much if someone pointed me to possibly feasible ways
if these exists; or otherwise be explicit if there is definitely no way
to do what I want.
Thanks in advance,
Erik Leunissen