News for hackers. Stuff that matters.
Re:Static Bundle Object: Modernizing Static Linking by bonzini on Friday October 10, 2025 @01:46PM (#45541725)
If I didn't misread your proposal, file-sections would handle visibilities and resolve symbols across the entire sbo, not per-file.
Re:Static Bundle Object: Modernizing Static Linking by eyalitki on Friday October 10, 2025 @02:00PM (#45541880)
OK, now I understood the gap. There is a technical limitation for relocation resolution when the relocation is against a different section. This means that for function sections we de-facto have no relocation finalization, only conversion of symbols from "global" to "local".

Hence, for a "file-sections" flag, we would only resolve relocations within a given file, but will leave intact relocations that cross the file boundary. Accordingly, this means that "function-sections" is identical to generating a static bundle object per original object file, and bundling them all together inside a .a archive.

Re:Static Bundle Object: Modernizing Static Linking by bonzini on Friday October 10, 2025 @02:06PM (#45541939)
> Accordingly, this means that "function-sections" is identical to generating a static bundle object per original object file, and bundling them all together inside a .a archive.

Ah, how are local symbols resolved within the whole .a file? I thought it would be only within the individual object file.