Date: Thu, 25 Jan 2024 16:06:31 -0800
On Wednesday, 24 January 2024 04:33:15 PST Frederick Virchanza Gotham via Std-
Proposals wrote:
> If I only edit the linker, then big projects only need to be re-linked. No
> need to recompile all the object files, nor the static libraries.
You still need to recompile if the compiler decided it didn't need to emit
separate sections for those symbols. If the compiler does that, then the
linker can't insert the necessary 24 bytes in the middle of a section.
That's not theoretical, see the Clang output in
https://gcc.godbolt.org/z/GYT4GEd5j
note how it's only using the .rodata and .data.rel.ro sections. Compare to
GCC's output that is using weak symbols and uniquely-named sections.
This linker change is DoA for ABI purposes.
Proposals wrote:
> If I only edit the linker, then big projects only need to be re-linked. No
> need to recompile all the object files, nor the static libraries.
You still need to recompile if the compiler decided it didn't need to emit
separate sections for those symbols. If the compiler does that, then the
linker can't insert the necessary 24 bytes in the middle of a section.
That's not theoretical, see the Clang output in
https://gcc.godbolt.org/z/GYT4GEd5j
note how it's only using the .rodata and .data.rel.ro sections. Compare to
GCC's output that is using weak symbols and uniquely-named sections.
This linker change is DoA for ABI purposes.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DCAI Cloud Engineering
Received on 2024-01-26 00:06:33