Comment 9 for bug 1838740

Revision history for this message
Marc Streckfuß (mefisto94) wrote :

Just using GCC8 didn't solve the problem, but after looking at the assertion again, I've come up with what I think is the solution, I just need to look at debian/control and find out how to fix it.

So the static symbol table is not of interest and the dynamic symbol table is intact, but: the version symbol tables are stripped just like the static symbol table is.
I guess this is some kind of compression/shrinking optimization, but LWJGL2 has some verneed entries:

Version needs section '.gnu.version_r' contains 3 entries:
 Adr: 0x000000000003b7a0 Offset: 0x03b7a0 Link: 5 (.dynstr)
  000000: Version: 1 Datei: libjawt.so Zähler: 1
  0x0010: Name: SUNWprivate_1.1 Flags: nichts Version: 5
  0x0020: Version: 1 Datei: libm.so.6 Zähler: 1
  0x0030: Name: GLIBC_2.2.5 Flags: nichts Version: 3
  0x0040: Version: 1 Datei: libc.so.6 Zähler: 3
  0x0050: Name: GLIBC_2.4 Flags: nichts Version: 6
  0x0060: Name: GLIBC_2.3.4 Flags: nichts Version: 4
  0x0070: Name: GLIBC_2.2.5 Flags: nichts Version: 2

Here it depends on libjawt.so which does not provide a versym table and thus LD fails at resolving the method.

Also the "working" libjawt.so from AdoptOpenJDK has 26 tables, where this one has 22 tables, specifically missing .gnu.version.

This is only half the puzzle, though, since neither AdoptOpenJDK nor RedHat's build expose the SUNWprivate_1.1 like libjawt.so from openjdk8 did:

Version symbols section '.gnu.version' contains 12 entries:
 Adr: 00000000000004b6 Offset: 0x0004b6 Link: 4 (.dynsym)
  000: 0 (*lokal*) 3 (SUNWprivate_1.1) 0 (*lokal*) 3 (SUNWprivate_1.1)
  004: 3 (SUNWprivate_1.1) 0 (*lokal*) 3 (SUNWprivate_1.1) 0 (*lokal*)
  008: 3 (SUNWprivate_1.1) 0 (*lokal*) 2 (SUNWprivate_1.1) 2 (SUNWprivate_1.1)

Version definition section '.gnu.version_d' contains 2 entries:
  Adr: 0x00000000000004d0 Offset: 0x0004d0 Link: 5 (.dynstr)
  000000: Rev: 1 Flags: BASE Index: 1 Zähler: 1 Name: libjawt.so
  0x001c: Rev: 1 Flags: nichts Index: 2 Zähler: 1 Name: SUNWprivate_1.1

.dynsym:
    10: 0000000000000760 110 FUNC GLOBAL DEFAULT 13 JAWT_GetAWT@@SUNWprivate_1.1

So I guess the versioning feature has been removed, but the deletion of the versioning tables is something that ld cannot handle gracefully. I don't know if this is a bug in ld/glibc or just a faulty behavior from Ubuntu's Packaging.