Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

elf_dprefix.S 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #include "elf.h"
  2. .arch i386
  3. .section ".prefix", "a", @progbits
  4. #define LOAD_ADDR 0x10000
  5. /* ELF Header */
  6. .globl elf_header
  7. elf_header:
  8. e_ident: .byte 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
  9. e_type: .short ET_DYN
  10. e_machine: .short EM_386
  11. e_version: .long 1
  12. e_entry: .long LOAD_ADDR + _start - elf_header
  13. e_phoff: .long elf_program_header - elf_header
  14. e_shoff: .long 0
  15. e_flags: .long 0
  16. e_ehsize: .short elf_header_end - elf_header
  17. e_phentsize: .short ELF32_PHDR_SIZE
  18. e_phnum: .short (elf_program_header_end - elf_program_header)/ELF32_PHDR_SIZE
  19. e_shentsize: .short 0
  20. e_shnum: .short 0
  21. e_shstrndx: .short 0
  22. elf_header_end:
  23. elf_program_header:
  24. phdr1_p_type: .long PT_NOTE
  25. phdr1_p_offset: .long elf_note - elf_header
  26. phdr1_p_vaddr: .long elf_note
  27. phdr1_p_paddr: .long elf_note
  28. phdr1_p_filesz: .long elf_note_end - elf_note
  29. phdr1_p_memsz: .long elf_note_end - elf_note
  30. phdr1_p_flags: .long PF_R | PF_W | PF_X
  31. phdr1_p_align: .long 0
  32. /* The decompressor */
  33. phdr2_p_type: .long PT_LOAD
  34. phdr2_p_offset: .long 0
  35. phdr2_p_vaddr: .long elf_header
  36. phdr2_p_paddr: .long LOAD_ADDR
  37. phdr2_p_filesz: .long _verbatim_size
  38. phdr2_p_memsz: .long _image_size
  39. phdr2_p_flags: .long PF_R | PF_W | PF_X
  40. phdr2_p_align: .long 16
  41. elf_program_header_end:
  42. .globl elf_note
  43. elf_note:
  44. .balign 4
  45. .int 2f - 1f
  46. .int 4f - 3f
  47. .int EIN_PROGRAM_NAME
  48. 1: .asciz "ELFBoot"
  49. 2:
  50. .balign 4
  51. 3:
  52. .asciz "Etherboot"
  53. 4:
  54. .balign 4
  55. .int 2f - 1f
  56. .int 4f - 3f
  57. .int EIN_PROGRAM_VERSION
  58. 1: .asciz "ELFBoot"
  59. 2:
  60. .balign 4
  61. 3:
  62. .asciz VERSION
  63. 4:
  64. #if 0
  65. .balign 4
  66. .int 2f - 1f
  67. .int 4f - 3f
  68. .int EIN_PROGRAM_CHECKSUM
  69. 1: .asciz "ELFBoot"
  70. 2:
  71. .balign 4
  72. 3:
  73. .word 0
  74. 4:
  75. #endif
  76. .balign 4
  77. elf_note_end:
  78. /* Dummy routines to satisfy the build */
  79. .section ".text16", "ax", @progbits
  80. .globl prefix_exit
  81. prefix_exit:
  82. .globl prefix_exit_end
  83. prefix_exit_end:
  84. .previous