Compilation 如何构建Openssl_1.0.0版本4

Compilation 如何构建Openssl_1.0.0版本4,compilation,openssl,version,elf,Compilation,Openssl,Version,Elf,我正在尝试运行一个二进制文件,它似乎特别需要OPENSSL_1.0.0版本4: Version needs section '.gnu.version_r' contains 2 entries: Addr: 0x00000000080486ac Offset: 0x0006ac Link: 6 (.dynstr) 000000: Version: 1 File: libcrypto.so.1.0.0 Cnt: 1 0x0010: Name: OPENSSL_1.0.0

我正在尝试运行一个二进制文件,它似乎特别需要OPENSSL_1.0.0版本4:

Version needs section '.gnu.version_r' contains 2 entries:
 Addr: 0x00000000080486ac  Offset: 0x0006ac  Link: 6 (.dynstr)
  000000: Version: 1  File: libcrypto.so.1.0.0  Cnt: 1
  0x0010:   Name: OPENSSL_1.0.0  Flags: none  Version: 4
我已经检查了openssl git的源代码,并构建了1.0.0-stable,但无法确定如何具体构建二进制文件所需的内容

我应该从openssl repo中签出什么版本,如何编译它以便该二进制文件可以使用它

以下是来自elf头的其他可能相关字段:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x804a6e0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          214412 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         9
  Size of section headers:           40 (bytes)
  Number of section headers:         37
  Section header string table index: 34


Relocation section '.rel.plt' at offset 0x73c contains 37 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
0805b038  00000d07 R_386_JUMP_SLOT   00000000   MD5@OPENSSL_1.0.0

Dynamic section at offset 0x11f0c contains 25 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so.1.0.0]

Symbol table '.dynsym' contains 43 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name     
    13: 00000000     0 FUNC    GLOBAL DEFAULT  UND MD5@OPENSSL_1.0.0 (4)

Version symbols section '.gnu.version' contains 43 entries:
 Addr: 0000000008048656  Offset: 0x000656  Link: 5 (.dynsym)
  00c:   2 (GLIBC_2.0)     4 (OPENSSL_1.0.0)   2 (GLIBC_2.0)     0 (*local*)   

您看到的版本不是库的版本,而是表中符号的(任意)版本。正如jww已经指出的,这是指
OPENSSL_1.0.0
,它是符号版本字符串,与1.0.x发行版分支相关


请参阅我以前写过的一篇关于符号版本控制的随机引用。

我相信SONAME
OPENSSL\u 1.0.0
就是OPENSSL 1.0.x行。该行包括OpenSSL 1.0.1和1.0.2。签出
OpenSSL\u 1\u 0\u 2-stable
。另请参见OpenSSL网站。