I have a codebase where I have many .so 's and lot of link sets defined & implemented.
Now for performance reasons I want to compile my code as a single static library.
But I get the errors that linker sets aren’t allowed in static libraries or executable.
Is there any alternate which exists for the same? Also I am not sure if this question belongs to this category. If not, please do suggest the right category.
Can you be a bit more specific about which LLD you are using, and what you mean by linker sets? I’m familiar with ld.lld the ELF version, which I think you are referring to as ELF has .so but I don’t recognise the term “linker set” and I can’t see any LLD diagnostics that use “linker set”.
The closest thing that I can think of that exists in shared-libraries but not static libraries is dynamic information. This is usually created by the linker, although in the case of symbol versioning scripts that is provided by the user.
Thanks for the reference. From what I can see the linker feature this needs is support for the GNU ld convention that linker can define __start_<secname> and __stop_<secname> for every output section called <secname>. These are supported by lld, and as jrtc27 says these are not restricted to shared objects.