Bug 74634 - binaries built with glibc 2.2.94 not compatible with 2.2.90 (rh7) or lower
binaries built with glibc 2.2.94 not compatible with 2.2.90 (rh7) or lower
Status: CLOSED NOTABUG
Product: Red Hat Public Beta
Classification: Retired
Component: glibc (Show other bugs)
null
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-27 21:31 EDT by Red Hat Bugzilla
Modified: 2008-03-13 15:18 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-27 22:06:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Red Hat Bugzilla 2002-09-27 21:31:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

Description of problem:
Running a dynamically-linked binary built against glibc 2.2.94 (or something
higher than 2.2.90) in RH 8.0 seems to be unrunnable on (null) or 7.3 (and
probably lower).  The problem seems to be a change in ctype.

In 2.2.90, ctype.h has:

extern __const unsigned short int *__ctype_b;   /* Characteristics.  */
...
#define __isctype(c, type) \
  (__ctype_b[(int) (c)] & (unsigned short int) type)


In 2.2.94 (and possibly earlier), this became:

extern __const unsigned short int **__ctype_b_loc (void)
     __attribute__ ((__const));
...
#define __isctype(c, type) \
  ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)


Trying to run an app built on 8.0 that uses ctype results in:

./mozilla-bin: relocation error: /home/vladimir/mozilla/libmozjs.so: symbol
__ctype_b_loc, version GLIBC_2.3 not defined in file libc.so.6 with link time
reference

This would happen with both gcc3 and gcc296 built binaries (the mozilla above
was built with gcc296).
Comment 1 Red Hat Bugzilla 2002-09-27 22:06:50 EDT
If foo.c is created as such:

#include <ctype.h>

__const unsigned short int **__ctype_b_loc (void)
{ return &__ctype_b; }

__const __int32_t **__ctype_tolower_loc (void)
{ return &__ctype_tolower; }

__const __int32_t **__ctype_toupper_loc (void)
{ return &__ctype_toupper; }

and compiled with "gcc -shared -o foo.so foo.c", and then used as a LD_PRELOAD
for the binary in question, it runs fine under (null) and presumably under 7.3
as well.
Comment 2 Red Hat Bugzilla 2002-09-28 11:17:44 EDT
And the problem is?
glibc has always been just backwards compatible, not forward compatible.

Note You need to log in before you can comment on or make changes to this bug.