elf32-footer-single-main.hex2 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ### Copyright (C) 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  2. ### This file is part of stage0.
  3. ###
  4. ### stage0 is free software: you can redistribute it and/or modify
  5. ### it under the terms of the GNU General Public License as published by
  6. ### the Free Software Foundation, either version 3 of the License, or
  7. ### (at your option) any later version.
  8. ###
  9. ### stage0 is distributed in the hope that it will be useful,
  10. ### but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ### GNU General Public License for more details.
  13. ###
  14. ### You should have received a copy of the GNU General Public License
  15. ### along with stage0. If not, see <http://www.gnu.org/licenses/>.
  16. ### stage0's hex2 format for x86
  17. ### !<label> 1 byte relative
  18. ### $<label> 2 byte address
  19. ### @<label> 2 byte relative
  20. ### &<label> 4 byte address
  21. ### %<label> 4 byte relative
  22. ### local_<label> function-local
  23. ### string_<index> string #<index>
  24. ### elf32-footer-single-main.hex2: 32 bit elf footer in hex2 for single main
  25. # @230
  26. :ELF_str
  27. 00 # 0
  28. :ELF_str__start
  29. 5f 73 74 61 72 74 00 # _start
  30. :ELF_str__main
  31. 6d 61 69 6e 00 # main
  32. 00 00 00
  33. # @240
  34. :ELF_sym
  35. 00 00 00 00 # st-name
  36. 00 00 00 00 # st-offset: &_start - BaseAddress
  37. 00 00 00 00 # st-len : &main - _start
  38. 00 # st-info = stt-func= 2
  39. 00 # st-other
  40. 01 00 # st-shndx: 1
  41. # _start
  42. %ELF_str__start>ELF_str # st-name
  43. &_start
  44. 10 00 00 00 # st-len : &main - _start
  45. 02 # st-info = stt-func= 2
  46. 00 # st-other
  47. 01 00 # st-shndx: 1
  48. # main
  49. %ELF_str__main>ELF_str # st-name
  50. &main
  51. 10 00 00 00 # st-len : &ELF_data - main
  52. 02 # st-info = stt-func= 2
  53. 00 # st-other
  54. 01 00 # st-shndx: 1
  55. :ELF_end