Meanings of mips flags from readelf command?

2019-07-23 09:22发布

问题:

I have executed the command "readelf -h test" ("test" is my binary program) on linux, and got following text:

ELF header:
   Magic:  7f 45 4c 46 ....
   Data:   2's complement, little endian
   ...
   **Flags: 0x1007, noreorder, pic, cpic, o32, mips1**
   ...

Could you please let me know each meanings of flags of the above text in detail?

I have googled it, but could not find answers. Any comments would be appreciated.

回答1:

ELF header flags are architecture-specific. For MIPS they are defined in SYSTEM V APPLICATION BINARY INTERFACE

EF_MIPS_NOREORDER 0x00000001
EF_MIPS_PIC       0x00000002
EF_MIPS_CPIC      0x00000004
EF_MIPS_ARCH      0xf0000000