elf64-ARM.hex2 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ### Copyright (C) 2016 Jeremiah Orians
  2. ### Copyright (C) 2017 Jan Nieuwenhuizen <janneke@gnu.org>
  3. ### This file is part of stage0.
  4. ###
  5. ### stage0 is free software: you can redistribute it and/or modify
  6. ### it under the terms of the GNU General Public License as published by
  7. ### the Free Software Foundation, either version 3 of the License, or
  8. ### (at your option) any later version.
  9. ###
  10. ### stage0 is distributed in the hope that it will be useful,
  11. ### but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ### GNU General Public License for more details.
  14. ###
  15. ### You should have received a copy of the GNU General Public License
  16. ### along with stage0. If not, see <http://www.gnu.org/licenses/>.
  17. ### elf64.hex2: 64 bit elf header in hex2
  18. ### if you wish to use this header, you need to add :ELF_end to the end of your
  19. ### M1 or hex2 files.
  20. ## ELF Header
  21. :ELF_base
  22. 01111111 01000101 01001100 01000110 ## e_ident[EI_MAG0-3] ELF's magic number
  23. 00000010 ## e_ident[EI_CLASS] Indicating 64 bit
  24. 00000001 ## e_ident[EI_DATA] Indicating little endianness
  25. 00000001 ## e_ident[EI_VERSION] Indicating original elf
  26. 00000000 ## e_ident[EI_OSABI] Set at 0 because none cares
  27. 00000000 ## e_ident[EI_ABIVERSION] See above
  28. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ## e_ident[EI_PAD]
  29. 00000010 00000000 ## e_type Indicating Executable
  30. 10110111 00000000 ## e_machine Indicating AARCH64
  31. 00000001 00000000 00000000 00000000 ## e_version Indicating original elf
  32. &ELF_text 00000000 00000000 00000000 00000000 ## e_entry Address of the entry point (Number of bytes this header is + Base Address)
  33. %ELF_program_headers>ELF_base 00000000 00000000 00000000 00000000 ## e_phoff Address of program header table
  34. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ## e_shoff Address of section header table
  35. 00000000 00000000 00000000 00000000 ## e_flags
  36. 01000000 00000000 ## e_ehsize Indicating our 64 Byte header
  37. 00111000 00000000 ## e_phentsize size of a program header table
  38. 00000001 00000000 ## e_phnum number of entries in program table
  39. 00000000 00000000 ## e_shentsize size of a section header table
  40. 00000000 00000000 ## e_shnum number of entries in section table
  41. 00000000 00000000 ## e_shstrndx index of the section names
  42. ## Program Header
  43. :ELF_program_headers
  44. 00000001 00000000 00000000 00000000 ## p_type
  45. 00000110 00000000 00000000 00000000 ## Flags
  46. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ## p_offset
  47. &ELF_base 00000000 00000000 00000000 00000000 ## p_vaddr
  48. &ELF_base 00000000 00000000 00000000 00000000 ## p_physaddr
  49. %ELF_end>ELF_base 00000000 00000000 00000000 00000000 ## p_filesz
  50. %ELF_end>ELF_base 00000000 00000000 00000000 00000000 ## p_memsz
  51. 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ## Required alignment
  52. :ELF_text