root@gatto:/tmp# gdb -c core /usr/bin/openssl GNU gdb (GDB) 7.4.1 Program terminated with signal 4, Illegal instruction. #0 0xb761d1f3 in _init () from /usr/lib/libcrypto.so.0 (gdb) disassemble Dump of assembler code for function _init: 0xb761d1d0 <+0>: push %ebx 0xb761d1d1 <+1>: sub $0x8,%esp 0xb761d1d4 <+4>: call 0xb761d840 0xb761d1d9 <+9>: add $0x12c6b7,%ebx 0xb761d1df <+15>: mov -0x220(%ebx),%eax 0xb761d1e5 <+21>: test %eax,%eax 0xb761d1e7 <+23>: je 0xb761d1ee <_init+30> 0xb761d1e9 <+25>: call 0xb761d4d0 <__gmon_start__@plt> 0xb761d1ee <+30>: call 0xb761d970 => 0xb761d1f3 <+35>: nopw %cs:0x0(%eax,%eax,1) 0xb761d1fd <+45>: nopl (%eax) 0xb761d200 <+48>: call 0xb761dc10 <OPENSSL_cpuid_setup> 0xb761d205 <+53>: jmp 0xb761d210 <_init+64> 0xb761d207 <+55>: mov %esi,%esi 0xb761d209 <+57>: lea 0x0(%edi,%eiz,1),%edi 0xb761d210 <+64>: call 0xb76f8140 0xb761d215 <+69>: add $0x8,%esp 0xb761d218 <+72>: pop %ebx 0xb761d219 <+73>: ret End of assembler dump. (gdb) x/24bx 0xb759b1f3 0xb759b1f3: 0xff 0x5c 0xae 0x02 0x00 0x3c 0x66 0xfc 0xb759b1fb: 0xff 0x8c 0xae 0x02 0x00 0xac 0x66 0xfc 0xb759b203: 0xff 0xc4 0xae 0x02 0x00 0x5c 0x67 0xfc (gdb) root@gatto:/var/named/internet# cat /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 9 model name : VIA Nehemiah stepping : 8 cpu MHz : 1000.377 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr cx8 mtrr pge cmov pat mmx fxsr sse rng rng_en ace ace_en bogomips : 2000.75 clflush size : 32 cache_alignment : 32 address sizes : 32 bits physical, 32 bits virtual power management: CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN --DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 --fomit-frame-pointer -march=i486 -mtune=i686 -Wall --DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM --DAES_ASM
glibc itself does not code the NOPs, this is done by binutils. How did you configure and build glibc?
> How did you configure and build glibc? via build scripts of my distro (slackware) with cflags: CFLAGS="-g -O3 -march=i486 -mtune=i686" \ ../configure \ --prefix=/usr \ --libdir=/usr/lib \ --enable-kernel=2.6.18 \ --with-headers=/usr/include \ --enable-add-ons=libidn,nptl \ --enable-profile \ --infodir=/usr/info \ --mandir=/usr/man \ --with-tls \ --with-__thread \ --without-cvs \ -i486-slackware-linux Thanks for the support! Roberto Corrado
This looks to me like a issue with binutils - please talk with them about it.
Moving to binutils.
Which version of binutils? What is the command line passed to assembler?
(In reply to comment #5) > Which version of binutils? root@gatto:/tmp# as -V GNU assembler version 2.22.52.0.1 (i486-slackware-linux) using BFD version (Linux/GNU Binutils) 2.22.52.0.1.20120131 > What is the command line passed to assembler? CC= gcc CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -mtune=i686 -Wall AS=$(CC) -c ASFLAG=$(CFLAG) PROCESSOR=. Configuring for linux-elf Configuring for linux-elf no-camellia [default] OPENSSL_NO_CAMELLIA (skip dir) no-capieng [default] OPENSSL_NO_CAPIENG (skip dir) no-cms [default] OPENSSL_NO_CMS (skip dir) no-gmp [default] OPENSSL_NO_GMP (skip dir) no-idea [option] OPENSSL_NO_IDEA (skip dir) no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-mdc2 [default] OPENSSL_NO_MDC2 (skip dir) no-montasm [default] no-rc5 [option] OPENSSL_NO_RC5 (skip dir) no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir) no-seed [default] OPENSSL_NO_SEED (skip dir) no-sse2 [option] no-zlib [default] no-zlib-dynamic [default] IsMK1MF=0 CC =gcc CFLAG =-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -mtune=i686 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM EX_LIBS =-ldl CPUID_OBJ =x86cpuid-elf.o BN_ASM =bn86-elf.o co86-elf.o DES_ENC =dx86-elf.o yx86-elf.o AES_ASM_OBJ =ax86-elf.o BF_ENC =bx86-elf.o CAST_ENC =c_enc.o RC4_ENC =rx86-elf.o rc4_skey.o RC5_ENC =r586-elf.o MD5_OBJ_ASM =mx86-elf.o SHA1_OBJ_ASM =sx86-elf.o RMD160_OBJ_ASM=rm86-elf.o PROCESSOR = RANLIB =/usr/bin/ranlib ARFLAGS = PERL =/usr/bin/perl THIRTY_TWO_BIT mode DES_PTR used DES_RISC1 used DES_UNROLL used BN_LLONG mode RC4_INDEX mode RC4_CHUNK is undefined e_os2.h => include/openssl/e_os2.h However compiles without errors with new version of binutils root@gatto:/tmp# as -V GNU assembler version 2.22.52.0.2 (i486-slackware-linux) using BFD version (Linux/GNU Binutils) 2.22.52.0.2.20120424 Thanks for the support Roberto Corrado
Dup. *** This bug has been marked as a duplicate of bug 6957 ***