public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
@ 2021-11-19 15:26 H.J. Lu
  2021-11-19 15:30 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2021-11-19 15:26 UTC (permalink / raw)
  To: libc-alpha; +Cc: Adhemerval Zanella, Florian Weimer

Executables with DT_RELR will crash mysteriously with glibc binaries
without DT_RELR support.  Bump EI_ABIVERSION won't prevent crash since
the Linux kernel loader doesn't check EI_ABIVERSION on executables.
Adding a glibc version dependency on the first glibc version with
DT_RELR support will prevent backporting DT_RELR support to released
glibc branches.

Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
with DT_RELR.  GLIBC_PRIVATE_RELR should be backported together when
backporting DT_RELR support.
---
 io/Versions         | 4 +++-
 scripts/abilist.awk | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/io/Versions b/io/Versions
index 4e19540885..629d458324 100644
--- a/io/Versions
+++ b/io/Versions
@@ -141,7 +141,6 @@ libc {
     closefrom;
   }
   GLIBC_PRIVATE {
-    __libc_fcntl64;
     __fcntl_nocancel;
     __open64_nocancel;
     __write_nocancel;
@@ -151,4 +150,7 @@ libc {
     __file_change_detection_for_fp;
     __fstat64;
   }
+  GLIBC_PRIVATE_RELR {
+    __libc_fcntl64;
+  }
 }
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 24a34ccbed..620aacb627 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -55,7 +55,7 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
   # caused STV_HIDDEN symbols to appear in .dynsym, though that is useless.
   if (NF > 7 && $7 == ".hidden") next;
 
-  if (version == "GLIBC_PRIVATE" && !include_private) next;
+  if (version ~ /^GLIBC_PRIVATE/ && !include_private) next;
 
   desc = "";
   if (type == "D" && ($4 == ".tbss" || $4 == ".tdata")) {
-- 
2.33.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-22 18:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 15:26 [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR H.J. Lu
2021-11-19 15:30 ` Florian Weimer
2021-11-19 15:36   ` H.J. Lu
2021-11-19 22:47     ` Florian Weimer
2021-11-20  2:55       ` H.J. Lu
2021-11-22 18:21         ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).