objdump - head ELF - Meaning of flags?

后端 未结 2 676
感情败类
感情败类 2021-01-19 00:01

$ objdump -f ./a.out

./a.out:     file format elf32-i386
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x080484e0


        
相关标签:
2条回答
  • 2021-01-19 00:36

    They are BFD-specific bitmasks. In the binutils source tree, see bfd/bfd-in2.h:

      /* BFD contains relocation entries.  */
    #define HAS_RELOC      0x01
    
      /* BFD is directly executable.  */
    #define EXEC_P         0x02
    ...
      /* BFD has symbols.  */
    #define HAS_SYMS       0x10
    ...
      /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
         linker sets this by default, but clears it for -r or -n or -N).  */
    #define D_PAGED        0x100
    

    These flag values won't appear in your object file; they are simply an in-memory representation that libbfd uses.

    0 讨论(0)
  • 2021-01-19 00:50

    They are LibBFD flags. You're trying to recode objdump ? ... =)

    0 讨论(0)
提交回复
热议问题