public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* SIGSEGV when running 32bit apps
@ 2023-05-05  0:16 alexandre schenberg
  2023-05-05  1:33 ` Andrew Bell
  0 siblings, 1 reply; 4+ messages in thread
From: alexandre schenberg @ 2023-05-05  0:16 UTC (permalink / raw)
  To: libc-help

Hello. When trying execute the vast majority of 32bit applications, they end causing a segmentation fault.

Running one of them with these sequence of commands: 
LD_LIBRARY_PATH=/media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4/lib32/ gdb ./raytracer
(gdb) run
(gdb) backtrace

I end receiving:

Program received signal SIGSEGV, Segmentation fault.
0x000044ae in ?? ()
(gdb) backtrace
#0  0x000044ae in ?? ()
#1  0xf7eb5854 in ?? ()
#2  0xf7fde66e in dl_main (phdr=0x8048034, phnum=8, user_entry=0xffffd3ec, auxv=0xffffd52c) at rtld.c:2203
#3  0xf7fefb89 in _dl_sysdep_start (start_argptr=0xffffd480, dl_main=0xf7fdc490 <dl_main>) at ../elf/dl-sysdep.c:241
#4  0xf7fdf6fe in _dl_start_final (arg=0xffffd480) at rtld.c:331
#5  _dl_start (arg=<optimized out>) at rtld.c:557
#6  0xf7fdba87 in _start () from /usr/lib32/ld-2.17.so

What I did so far. Installed Glibc outside the usual system tree of directories. Created /usr/lib32. Made symbolic links from everything on Glibc-2.17/lib to it. Then added /usr/lib32 to ld.so.conf. 
Installed Gcc outside system tree of directories. Created a symbolic link in /usr/lib32 to libstdc++.so.6
Executed ldconfig.

What it works. Simple C programs (use only standard c libraries). Static linked c and c++ programs
What doesn't work. Any non static c++ program. Any non static c program that uses anything outside standard c (for instance, a simple gtk example) 

What I think it's happening after reading the backtrace: Some auxiliary 64bit library is being accessed when executing 32bit, some address is being computed based in incorrect 64bit data. The question is: How to fix it?

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

end of thread, other threads:[~2023-05-07  0:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05  0:16 SIGSEGV when running 32bit apps alexandre schenberg
2023-05-05  1:33 ` Andrew Bell
2023-05-06 23:54   ` alexandre schenberg
2023-05-07  0:55     ` 김찬

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