Skip to content

Conversation

@loongson-zn
Copy link
Member

@loongson-zn loongson-zn commented Apr 4, 2023

修改前输出:

[loongson@localhost LIEF]$ python3.8
Python 3.8.6 (default, Mar  7 2022, 16:47:42) 
[GCC 8.3.0 20190222 (Loongson 8.3.0-27 vec)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lief 
>>> binary=lief.parse("/bin/ls")
>>> print(binary)
Achitecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Architecture UNDEFINED not implemented
Header
======
Magic:                           7f 45 4c 46 
Class:                           CLASS64
Endianness:                      LSB
Version:                         CURRENT
OS/ABI:                          SYSTEMV
ABI Version:                     0
Machine type:                    UNDEFINED
File type:                       DYNAMIC
Object file version:             CURRENT
Entry Point:                     0x5d98
Program header offset:           0x40
Section header offset:           153312
Processor Flag:                  3 
Header size:                     64
Size of program header:          56
Number of program header:        9
Size of section header:          64
Number of section headers:       28
Section Name Table idx:          27

Sections
========
                    NULL           0         0         0         0                                                      
.interp             PROGBITS       238       f         238       3.50689   ALLOC 

修改后输出:

[loongson@localhost dist]$ python3.8
Python 3.8.6 (default, Mar  7 2022, 16:47:42) 
[GCC 8.3.0 20190222 (Loongson 8.3.0-27 vec)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lief
>>> binary=lief.parse("/bin/ls")
>>> print(binary)
Header
======
Magic:                           7f 45 4c 46 
Class:                           CLASS64
Endianness:                      LSB
Version:                         CURRENT
OS/ABI:                          SYSTEMV
ABI Version:                     0
Machine type:                    LOONGARCH
File type:                       DYNAMIC
Object file version:             CURRENT
Entry Point:                     0x5d98
Program header offset:           0x40
Section header offset:           153312
Processor Flag:                  3 BASE_ABI_LP64S BASE_ABI_LP64F BASE_ABI BASE_ABI_ILP32S BASE_ABI_ILP32F BASE_ABI_ILP32D
Header size:                     64
Size of program header:          56
Number of program header:        9
Size of section header:          64
Number of section headers:       28
Section Name Table idx:          27

Sections
========
                    NULL           0         0         0         0        

.interp             PROGBITS       238       f         238       3.50689   ALLOC                         INTERP LOAD    
.note.ABI-tag       NOTE           248       20        248       1.49878   ALLOC                         LOAD NOTE        

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants