diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-11-19 06:18:56 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-04-26 10:16:11 -0700 |
commit | 57292f574156f817b7cbeb33ea6278c6eab22bcc (patch) | |
tree | 07c80714e7f6aa9a74647bbe1585e1c921f27ba4 /scripts/versions.awk | |
parent | 4610b24f5e4e6d2c4b769594efa6d460943163bb (diff) | |
download | glibc-57292f574156f817b7cbeb33ea6278c6eab22bcc.tar.gz glibc-57292f574156f817b7cbeb33ea6278c6eab22bcc.tar.xz glibc-57292f574156f817b7cbeb33ea6278c6eab22bcc.zip |
Add GLIBC_ABI_DT_RELR for DT_RELR support
The EI_ABIVERSION field of the ELF header in executables and shared libraries can be bumped to indicate the minimum ABI requirement on the dynamic linker. However, EI_ABIVERSION in executables isn't checked by the Linux kernel ELF loader nor the existing dynamic linker. Executables will crash mysteriously if the dynamic linker doesn't support the ABI features required by the EI_ABIVERSION field. The dynamic linker should be changed to check EI_ABIVERSION in executables. Add a glibc version, GLIBC_ABI_DT_RELR, to indicate DT_RELR support so that the existing dynamic linkers will issue an error on executables with GLIBC_ABI_DT_RELR dependency. When there is a DT_VERNEED entry with libc.so on DT_NEEDED, issue an error if there is a DT_RELR entry without GLIBC_ABI_DT_RELR dependency. Support __placeholder_only_for_empty_version_map as the placeholder symbol used only for empty version map to generate GLIBC_ABI_DT_RELR without any symbols.
Diffstat (limited to 'scripts/versions.awk')
-rw-r--r-- | scripts/versions.awk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/versions.awk b/scripts/versions.awk index 357ad1355e..d70b07bd1a 100644 --- a/scripts/versions.awk +++ b/scripts/versions.awk @@ -185,8 +185,13 @@ END { closeversion(oldver, veryoldver); veryoldver = oldver; } - printf("%s {\n global:\n", $2) > outfile; oldver = $2; + # Skip the placeholder symbol used only for empty version map. + if ($3 == "__placeholder_only_for_empty_version_map;") { + printf("%s {\n", $2) > outfile; + continue; + } + printf("%s {\n global:\n", $2) > outfile; } printf(" ") > outfile; for (n = 3; n <= NF; ++n) { |