Re: Erreur bizarre

Pàgina inicial

Reply to this message
Autor: Christian Marillat
Data:  
A: guilde
Assumpte: Re: Erreur bizarre
On 11 juil. 2025 12:48, Frédéric <fma38@???> wrote:


[...]

> Oups, c'est juste que la machine est en 64 bits, pas 32 ! Bizarre,
> d'habitude ça dit que ce n'est pas le bon format ELF, non ?


Le 64 bits est capable s'exécuter du 32 bits. Si c'est un programme
linké en static il pourra même fonctionner normalement.

Au hasard un test avec cvs de cette page :
https://github.com/static-linux/static-binaries-i386

,----
| $ strace -f ./cvs
| execve("./cvs", ["./cvs"], 0x7ffd4e69e108 /* 74 vars */) = 0
| [ Process PID=24141 runs in 32 bit mode. ]
| set_thread_area({entry_number=-1, base_addr=0x8109634, limit=0x0fffff, seg_32bit=1, contents=0, read_exec_only=0, limit_in_pages=1, seg_not_present=0, useable=1}) = 0 (entry_number=12)
| set_tid_address(0x8109650)              = 24141
| open("/etc/localtime", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = 3
| fstat64(3, {st_mode=S_IFREG|0644, st_size=2962, ...}) = 0
| mmap2(NULL, 2962, PROT_READ, MAP_SHARED, 3, 0) = 0xf7f71000
| close(3)                                = 0

`----

Christian