public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* What's the point having GLIBC_ABI_DT_RELR?
@ 2024-06-21  7:56 Bjørn Mork
  2024-06-21 11:14 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2024-06-21  7:56 UTC (permalink / raw)
  To: libc-help; +Cc: Peter O'Connor

So I stumbled across the DT_RELR without GLIBC_ABI_DT_RELR thing as an
end user, and couldn't figure out what the point was.  I'd really
appreciate it if anyone took the time to spoon feed me.

Googling for an answer I found this old question from Peter, which is a
much better summary of the situation than I'm able to give:
https://sourceware.org/pipermail/libc-alpha/2022-March/136773.html

But I still could not find an answer.

Isn't the whole GLIBC_ABI_DT_RELR test just unnecessarily preventing
glibc from loading libraries with DT_RELR?  Any glibc version testing
for it will also support DT_RELR. So it would have worked fine if it
weren't for the test.  Looks like unnecessary forced breakage - there
must be something I'm missing. But what?

I realize that the reason I'm here asking. isn't going to win me any
points. And I might lose some readers now.  But, like many other end
users, I am using an RPi4 running a standard Debian stable installation
with Kodi as a media center.  Which quickly ends up with a "wish" for
DRM support.  Not that I really want DRM of course, but I would like to
watch the content and I am pragmatic enough to accept that's how stupid
the world is.

So the current pragmatic DRM solution for an aarch64 system is to fetch
a libwidevinecdm.so binary from a Chrome OS rescue image and dload
that. Simple enough.

But that doesn't work on a plain Debian installation, because:

 bjorn@brego:~$ ldd /tmp/libwidevinecdm.so 
 /tmp/libwidevinecdm.so: error while loading shared libraries: /tmp/libwidevinecdm.so: DT_RELR without GLIBC_ABI_DT_RELR dependency

Google pointed me to a terrible hack as a "solution": disabling the test
specifically for the "libwidevinecdm.so" binary.  Patch example linked from
https://github.com/xbmc/inputstream.adaptive/wiki/Widevine-ARM64-support

This seems to be implemented by default in some media center focused
distros.  I haven't asked, but I'm pretty sure something like that is
out of the question for Debian.

I can certainly build my own hacked glibc package and be happy wth
that. But I would prefer to avoid it.  And I do worry about other Debian
(or any generic distro) end users. There should be a better solution
than having every end user patch their glibc package, or install some
distro with an unknown number of similar hacks already applied.

So I come here to ask if the GLIBC_ABI_DT_RELR thing really is in the
best interest of users?  And if not, if it can be removed or maybe
demoted to a warning?

Personally I replaced the widevine specific hack with this, so that I
would still notice that this problem is there and being worked around:

--- a/elf/dl-version.c  2022-07-29 22:03:09.000000000 +0000
+++ b/elf/dl-version.c  2024-06-19 13:05:51.609950787 +0000
@@ -374,12 +374,8 @@
          {
            const char *name = strtab + d->d_un.d_val;
            if (strncmp (name, "libc.so.", 8) == 0)
-             {
-               _dl_exception_create
-                 (&exception, DSO_FILENAME (map->l_name),
-                  N_("DT_RELR without GLIBC_ABI_DT_RELR dependency"));
-               goto call_error;
-             }
+             _dl_error_printf ("%s: DT_RELR without GLIBC_ABI_DT_RELR dependency\n",
+               DSO_FILENAME (map->l_name));
          }
     }
 

Which makes the library load and work fine while providing a visible
indication of the unexpected format:

bjorn@rattata:~$ ldd /tmp/libwidevinecdm.so 
/tmp/libwidevinecdm.so: DT_RELR without GLIBC_ABI_DT_RELR dependency
        linux-vdso.so.1 (0x0000ffffbf0d8000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffbd890000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffbd860000)
        libnspr4.so => /lib/aarch64-linux-gnu/libnspr4.so (0x0000ffffbd800000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffffbd760000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffbd5b0000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffffbf09b000)


But the question still remains:  What does this test actually achieve?

Some details about the binary below.  The copy I got was automatically
downloaded by the kodi-inputstream-adaptive plugin, as packaged by
Debian (version 20.3.18+ds-1), after asking me the appropriate
questions.


bjorn@brego:~$ readelf -d /tmp/libwidevinecdm.so 

Dynamic section at offset 0x9ccc78 contains 34 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libnspr4.so]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-aarch64.so.1]
 0x000000000000000e (SONAME)             Library soname: [libwidevinecdm.so]
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
 0x0000000000000007 (RELA)               0x1d50
 0x0000000000000008 (RELASZ)             408 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x0000000000000024 (RELR)               0x1ee8
 0x0000000000000023 (RELRSZ)             536 (bytes)
 0x0000000000000025 (RELRENT)            8 (bytes)
 0x0000000000000017 (JMPREL)             0x2100
 0x0000000000000002 (PLTRELSZ)           3072 (bytes)
 0x0000000000000003 (PLTGOT)             0x9de9b8
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x298
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x15c8
 0x000000000000000a (STRSZ)              1927 (bytes)
 0x0000000000000004 (HASH)               0x1168
 0x0000000000000019 (INIT_ARRAY)         0x9d7a00
 0x000000000000001b (INIT_ARRAYSZ)       64 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x9d7a40
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000000000000c (INIT)               0x9c7134
 0x000000000000000d (FINI)               0x9c714c
 0x000000006ffffff0 (VERSYM)             0xfa0
 0x000000006ffffffe (VERNEED)            0x10b8
 0x000000006fffffff (VERNEEDNUM)         5
 0x0000000000000000 (NULL)               0x0


bjorn@brego:~$ readelf -Ws /tmp/libwidevinecdm.so

Symbol table '.dynsym' contains 139 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     2: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __register_frame_info
     3: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.17 (2)
     4: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __deregister_frame_info
     5: 00000000005c89b4     4 FUNC    GLOBAL DEFAULT   14 InitializeCdmModule_4
     6: 00000000005c89b8    36 FUNC    GLOBAL DEFAULT   14 DeinitializeCdmModule
     7: 00000000005c89dc   272 FUNC    GLOBAL DEFAULT   14 CreateCdmInstance
     8: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND __stack_chk_guard@GLIBC_2.17 (3)
     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.17 (2)
    10: 00000000005c8aec    12 FUNC    GLOBAL DEFAULT   14 GetCdmVersion
    11: 00000000005c8af8     8 FUNC    GLOBAL DEFAULT   14 VerifyCdmHost_0
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __cxa_atexit@GLIBC_2.17 (2)
    13: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.17 (2)
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __memcpy_chk@GLIBC_2.17 (2)
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.17 (2)
    16: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND bcmp@GLIBC_2.17 (2)
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND abort@GLIBC_2.17 (2)
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memmove@GLIBC_2.17 (2)
    19: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.17 (2)
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcmp@GLIBC_2.17 (2)
    21: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND syscall@GLIBC_2.17 (2)
    22: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __open64_2@GLIBC_2.17 (2)
    23: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtol@GLIBC_2.17 (2)
    24: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_setspecific@GLIBC_2.17 (4)
    25: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_key_create@GLIBC_2.17 (4)
    26: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_getspecific@GLIBC_2.17 (4)
    27: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.17 (4)
    28: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __vsnprintf_chk@GLIBC_2.17 (2)
    29: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __aarch64_ldadd4_acq_rel
    30: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sched_yield@GLIBC_2.17 (2)
    31: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND gettimeofday@GLIBC_2.17 (2)
    32: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sysconf@GLIBC_2.17 (2)
    33: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND munmap@GLIBC_2.17 (2)
    34: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mmap64@GLIBC_2.17 (2)
    35: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND clock_gettime@GLIBC_2.17 (2)
    36: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND nanosleep@GLIBC_2.17 (2)
    37: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getenv@GLIBC_2.17 (2)
    38: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fopen64@GLIBC_2.17 (2)
    39: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fclose@GLIBC_2.17 (2)
    40: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcmp@GLIBC_2.17 (2)
    41: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND localtime_r@GLIBC_2.17 (2)
    42: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND gmtime_r@GLIBC_2.17 (2)
    43: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getauxval@GLIBC_2.17 (2)
    44: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND read@GLIBC_2.17 (4)
    45: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getpid@GLIBC_2.17 (2)
    46: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fwrite@GLIBC_2.17 (2)
    47: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@GLIBC_2.17 (2)
    48: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __vfprintf_chk@GLIBC_2.17 (2)
    49: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strerror_r@GLIBC_2.17 (2)
    50: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND madvise@GLIBC_2.17 (2)
    51: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND write@GLIBC_2.17 (4)
    52: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __memset_chk@GLIBC_2.17 (2)
    53: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_create@GLIBC_2.17 (4)
    54: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_destroy@GLIBC_2.17 (2)
    55: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_cond_signal@GLIBC_2.17 (4)
    56: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_cond_broadcast@GLIBC_2.17 (4)
    57: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_cond_wait@GLIBC_2.17 (4)
    58: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_cond_destroy@GLIBC_2.17 (2)
    59: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fflush@GLIBC_2.17 (2)
    60: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stdin@GLIBC_2.17 (2)
    61: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stdout@GLIBC_2.17 (2)
    62: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND ungetc@GLIBC_2.17 (2)
    63: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getc@GLIBC_2.17 (2)
    64: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND uselocale@GLIBC_2.17 (2)
    65: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __isoc99_vsscanf@GLIBC_2.17 (2)
    66: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND newlocale@GLIBC_2.17 (2)
    67: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strftime_l@GLIBC_2.17 (2)
    68: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbsrtowcs@GLIBC_2.17 (2)
    69: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __isoc99_sscanf@GLIBC_2.17 (2)
    70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __vasprintf_chk@GLIBC_2.17 (2)
    71: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND catopen@GLIBC_2.17 (2)
    72: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND catgets@GLIBC_2.17 (2)
    73: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND catclose@GLIBC_2.17 (2)
    74: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND freelocale@GLIBC_2.17 (2)
    75: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND wcsnrtombs@GLIBC_2.17 (2)
    76: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND wcrtomb@GLIBC_2.17 (2)
    77: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbsnrtowcs@GLIBC_2.17 (2)
    78: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbrtowc@GLIBC_2.17 (2)
    79: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbtowc@GLIBC_2.17 (2)
    80: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_get_mb_cur_max@GLIBC_2.17 (2)
    81: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND mbrlen@GLIBC_2.17 (2)
    82: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND wcslen@GLIBC_2.17 (2)
    83: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtoll_l@GLIBC_2.17 (2)
    84: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtoull_l@GLIBC_2.17 (2)
    85: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtof_l@GLIBC_2.17 (2)
    86: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtod_l@GLIBC_2.17 (2)
    87: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtold_l@GLIBC_2.17 (2)
    88: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutex_lock@GLIBC_2.17 (4)
    89: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutex_unlock@GLIBC_2.17 (4)
    90: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutex_trylock@GLIBC_2.17 (4)
    91: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutexattr_init@GLIBC_2.17 (4)
    92: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutex_init@GLIBC_2.17 (4)
    93: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutexattr_destroy@GLIBC_2.17 (4)
    94: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_mutex_destroy@GLIBC_2.17 (4)
    95: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_join@GLIBC_2.17 (4)
    96: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_once@GLIBC_2.17 (4)
    97: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strncmp@GLIBC_2.17 (2)
    98: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp@GLIBC_2.29 (5)
    99: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND prctl@GLIBC_2.17 (2)
   100: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_b_loc@GLIBC_2.17 (2)
   101: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fcntl64@GLIBC_2.28 (6)
   102: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.17 (7)
   103: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.17 (7)
   104: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _setjmp@GLIBC_2.17 (2)
   105: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __longjmp_chk@GLIBC_2.17 (2)
   106: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND usleep@GLIBC_2.17 (2)
   107: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND uname@GLIBC_2.17 (2)
   108: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_cond_init@GLIBC_2.17 (2)
   109: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_init@GLIBC_2.17 (2)
   110: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_setstacksize@GLIBC_2.17 (4)
   111: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_malloc@GLIBC_2.17 (2)
   112: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_calloc@GLIBC_2.17 (2)
   113: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_memalign@GLIBC_2.17 (2)
   114: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_realloc@GLIBC_2.17 (2)
   115: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_free@GLIBC_2.17 (2)
   116: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND program_invocation_short_name@GLIBC_2.17 (2)
   117: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND qsort@GLIBC_2.17 (2)
   118: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.17 (2)
   119: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND perror@GLIBC_2.17 (2)
   120: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND OPENSSL_memory_alloc
   121: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND OPENSSL_memory_free
   122: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND sdallocx
   123: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND OPENSSL_memory_get_size
   124: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_rwlock_init@GLIBC_2.17 (4)
   125: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_rwlock_rdlock@GLIBC_2.17 (4)
   126: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_rwlock_wrlock@GLIBC_2.17 (4)
   127: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_rwlock_unlock@GLIBC_2.17 (4)
   128: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_rwlock_destroy@GLIBC_2.17 (4)
   129: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __fgets_chk@GLIBC_2.17 (2)
   130: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __aarch64_swp4_acq_rel
   131: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sem_init@GLIBC_2.17 (4)
   132: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sem_destroy@GLIBC_2.17 (4)
   133: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sem_wait@GLIBC_2.17 (4)
   134: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sem_trywait@GLIBC_2.17 (4)
   135: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND sem_post@GLIBC_2.17 (4)
   136: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND rand@GLIBC_2.17 (2)
   137: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dl_iterate_phdr@GLIBC_2.17 (2)
   138: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __register_atfork@GLIBC_2.17 (2)


Let me know if you want other data, or a copy of this binary, or
something else.

OK, so this problem will most likely go away by itself once Google start
liking their libwidevinecdm.so with the GLIBC_ABI_DT_RELR version.
Which will solve my problem.  But the question remains.


Bjørn

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

* Re: What's the point having GLIBC_ABI_DT_RELR?
  2024-06-21  7:56 What's the point having GLIBC_ABI_DT_RELR? Bjørn Mork
@ 2024-06-21 11:14 ` Florian Weimer
  2024-06-21 11:28   ` Bjørn Mork
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2024-06-21 11:14 UTC (permalink / raw)
  To: Bjørn Mork via Libc-help; +Cc: Bjørn Mork, Peter O'Connor

* Bjørn Mork via Libc-help:

> Isn't the whole GLIBC_ABI_DT_RELR test just unnecessarily preventing
> glibc from loading libraries with DT_RELR?  Any glibc version testing
> for it will also support DT_RELR. So it would have worked fine if it
> weren't for the test.  Looks like unnecessary forced breakage - there
> must be something I'm missing. But what?

The purpose of the check is to stop the proliferation of binaries that
crash when loaded by glibc versions that do not support DT_RELR.

Thanks,
Florian


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

* Re: What's the point having GLIBC_ABI_DT_RELR?
  2024-06-21 11:14 ` Florian Weimer
@ 2024-06-21 11:28   ` Bjørn Mork
  2024-06-21 11:56     ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2024-06-21 11:28 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Bjørn Mork via Libc-help

[ dropped Peter's Cc as his email seems defunct ]

Florian Weimer <fweimer@redhat.com> writes:
> * Bjørn Mork via Libc-help:
>
>> Isn't the whole GLIBC_ABI_DT_RELR test just unnecessarily preventing
>> glibc from loading libraries with DT_RELR?  Any glibc version testing
>> for it will also support DT_RELR. So it would have worked fine if it
>> weren't for the test.  Looks like unnecessary forced breakage - there
>> must be something I'm missing. But what?
>
> The purpose of the check is to stop the proliferation of binaries that
> crash when loaded by glibc versions that do not support DT_RELR.

Thanks. Is this a crash on load, or will (some of) those binaries load
successfully and then mysteriously crash later?

If only the first alternative, then I still don't see the point making
it fatal. Keeping the error message would still achieve the same goal
without affecting other binaries.


Bjørn

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

* Re: What's the point having GLIBC_ABI_DT_RELR?
  2024-06-21 11:28   ` Bjørn Mork
@ 2024-06-21 11:56     ` Florian Weimer
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Weimer @ 2024-06-21 11:56 UTC (permalink / raw)
  To: Bjørn Mork via Libc-help; +Cc: Bjørn Mork

* Bjørn Mork via Libc-help:

> [ dropped Peter's Cc as his email seems defunct ]
>
> Florian Weimer <fweimer@redhat.com> writes:
>> * Bjørn Mork via Libc-help:
>>
>>> Isn't the whole GLIBC_ABI_DT_RELR test just unnecessarily preventing
>>> glibc from loading libraries with DT_RELR?  Any glibc version testing
>>> for it will also support DT_RELR. So it would have worked fine if it
>>> weren't for the test.  Looks like unnecessary forced breakage - there
>>> must be something I'm missing. But what?
>>
>> The purpose of the check is to stop the proliferation of binaries that
>> crash when loaded by glibc versions that do not support DT_RELR.
>
> Thanks. Is this a crash on load, or will (some of) those binaries load
> successfully and then mysteriously crash later?

It's a mysterious crash.  Even with symbols and GDB, it's difficult to
figure out what is going on because the symptoms are quite unusual: some
pointers in global data are null because initialization has not been
performed.  These null pointers may end up at very distant places before
the crash.

Thanks,
Florian


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

end of thread, other threads:[~2024-06-21 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21  7:56 What's the point having GLIBC_ABI_DT_RELR? Bjørn Mork
2024-06-21 11:14 ` Florian Weimer
2024-06-21 11:28   ` Bjørn Mork
2024-06-21 11:56     ` Florian Weimer

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).