Open DenizThatMenace opened 6 months ago
@madler: Have you seen this PR?
@madler, do you mind having a look at this PR?
Merging this would fix versioned symbols in the built shared object (zlib.so
).
Without the change from this PR using the version-script (zlib.map
) has no effect when the z_
prefix is used on function names! (Even worse, with newer lld
linkers it will no longer build.)
This PR fixes a problem with the version-script (
zlib.map
) when also building with enabledz_
prefix for the function names.Without the changes from this PR the version-script did not properly assign version numbers to the function symbols in
zlib.so
(using GCC or Clang) if the function symbols are prefixed withz_
!Background
Most linkers silently ignored this error and just generated a
zlib.so
without any version numbers attached. Starting withlld
17 (or was it 16?), however, linking even fails with the following errors:The reason is that
zlib.map
did not care whether thez_
prefix is used or not.