objdump - head ELF - Meaning of flags?

5

$ objdump -f ./a.out

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

$ objdump -f function.o

function.o:     file format elf32-i386
architecture: i386, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x00000000

What is the meaning of flags (flags 0x00000011: OR flags 0x00000112:) ? Nothin in the ELF header file has this flag. e_flag contain 0.

Someone have an idea about his meaning ?

Thanks

objdump
asked on Stack Overflow Mar 8, 2011 by Unitech • edited Mar 8, 2011 by Unitech

2 Answers

8

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.

answered on Stack Overflow Mar 3, 2012 by Bernd Jendrissek
-1

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

answered on Stack Overflow Mar 12, 2011 by Arcanis

User contributions licensed under CC BY-SA 3.0