Date: Wed, 19 Apr 2023 17:56:27 -0700
On Wednesday, 19 April 2023 17:37:23 PDT Thiago Macieira via Std-Proposals
wrote:
> This is impossible to implement right now because it's just not how linkers
> work. You'd need to work with the implementations to first have a technical
> solution, before even attempting to standardise.
Let me just qualify my answer a bit.
I actually think this is a good idea and could be very useful for libraries. I
am a library developer and would definitely welcome such a solution.
But it requires a lot of pre-work to be done, understanding the actual needs
and use-cases of library developers that use static libraries, and how open
toolchain vendors are to updating their linkers to such a feature. I do expect
this would need a lengthy trial period as an extension in several toolchains
before we can discuss making it standard, whether de facto or de jure. WG14 (C
standard) needs to be involved too.
I also think it needs to grow scope. If you're going to address static
libraries, you should also address shared libraries and the sharing of
variables and functions inside of it, versus outside. Unlike static libraries,
this is an area where there is no need to change linkers, only standardise
compilers.
And it probably does need to address Modules.
wrote:
> This is impossible to implement right now because it's just not how linkers
> work. You'd need to work with the implementations to first have a technical
> solution, before even attempting to standardise.
Let me just qualify my answer a bit.
I actually think this is a good idea and could be very useful for libraries. I
am a library developer and would definitely welcome such a solution.
But it requires a lot of pre-work to be done, understanding the actual needs
and use-cases of library developers that use static libraries, and how open
toolchain vendors are to updating their linkers to such a feature. I do expect
this would need a lengthy trial period as an extension in several toolchains
before we can discuss making it standard, whether de facto or de jure. WG14 (C
standard) needs to be involved too.
I also think it needs to grow scope. If you're going to address static
libraries, you should also address shared libraries and the sharing of
variables and functions inside of it, versus outside. Unlike static libraries,
this is an area where there is no need to change linkers, only standardise
compilers.
And it probably does need to address Modules.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DCAI Cloud Engineering
Received on 2023-04-20 00:56:29