NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/58975: sparc64 compat32 libc missing symbols



>Number:         58975
>Category:       lib
>Synopsis:       sparc64 compat32 libc missing symbols
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 08 12:35:00 +0000 2025
>Originator:     Valery Ushakov
>Release:        NetBSD current
>Organization:
>Environment:
>Description:
I'm using an Ultra 1 sparc64 machine for some 32-bit sparc work
(inferno-os, self, etc) using cc -m32 - diskless krups is waaay too
slow for that :)

Unfortunately, native sparc64 gdb cannot handle 32-bit binaries (which
is a separate problem), so I thought I can bring over 32-bit gdb
binary from sparc.  Unfortunately^2, that doesn't work:

$ gdb32 -q --args ./NetBSD/sparc/bin/emu -c5 /catchme.dis
Reading symbols from ./NetBSD/sparc/bin/emu...
gdb32: Undefined PLT symbol "__atomic_compare_exchange_1" (symnum = 322)

>How-To-Repeat:
Copy gdb from a sparc (32-bit) build.  Try to run it on sparc64:

$ LD_BIND_NOW=1 gdb32
gdb32: Undefined PLT symbol "__sync_bool_compare_and_swap_4" (symnum = 152)

This is on a slightly out of date current:

$ ll distrib/sparc/lib/libc.so.12.222 distrib/sparc64/lib/libc.so.12.222
-r--r--r-- 1 uwe uwe 2228224 Nov 30 15:15 distrib/sparc/lib/libc.so.12.222
-r--r--r-- 1 uwe uwe 2564624 Nov 30 18:01 distrib/sparc64/lib/libc.so.12.222

Some symbols are missing from the 32-bit libc built as part of sparc64
build, compared to the 32-bit libc built as part of the normal sparc
build:

$ nm -D distrib/sparc/lib/libc.so.12.222 | grep atomic_compare
000edc9c T __atomic_compare_exchange_1
00089ba0 T __atomic_compare_exchange_2
000f6490 T __atomic_compare_exchange_4
$ nm -D distrib/sparc64/lib/libc.so.12.222 | grep atomic_compare
$

>Fix:



Home | Main Index | Thread Index | Old Index