stage0: Move to-be-generated part of body to footer.

* stage0/elf32-footer-exit-42.hex2: Add ELF_str, ELF_sym from body.
* stage0/elf32-body-exit-42.hex2: Remove ELF_str, ELF_sym.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-21 07:05:26 +02:00
parent cfca4c5cc1
commit afb5c207a9
2 changed files with 36 additions and 35 deletions

View file

@ -46,38 +46,3 @@ cd 80 # int $0x80
:ELF_data
65 78 69 74 34 32 20 64 61 74 61 20 68 65 72 65 # exit42 data here"
# @230
:ELF_str
00 # 0
:ELF_str__start
5f 73 74 61 72 74 00 # _start
:ELF_str__main
6d 61 69 6e 00 # main
00 00 00
# @240
:ELF_sym
00 00 00 00 # st-name
00 00 00 00 # st-offset: &_start - BaseAddress
00 00 00 00 # st-len : &main - _start
00 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1
# _start
%ELF_str__start>ELF_str # st-name
&_start
10 00 00 00 # st-len : &main - _start
02 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1
# main
%ELF_str__main>ELF_str # st-name
&main
10 00 00 00 # st-len : &ELF_data - main
02 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1

View file

@ -25,4 +25,40 @@
### elf32-footer-exit-42.hex2: 32 bit elf footer in hex2 for `exit 42'
# @230
:ELF_str
00 # 0
:ELF_str__start
5f 73 74 61 72 74 00 # _start
:ELF_str__main
6d 61 69 6e 00 # main
00 00 00
# @240
:ELF_sym
00 00 00 00 # st-name
00 00 00 00 # st-offset: &_start - BaseAddress
00 00 00 00 # st-len : &main - _start
00 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1
# _start
%ELF_str__start>ELF_str # st-name
&_start
10 00 00 00 # st-len : &main - _start
02 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1
# main
%ELF_str__main>ELF_str # st-name
&main
10 00 00 00 # st-len : &ELF_data - main
02 # st-info = stt-func= 2
00 # st-other
01 00 # st-shndx: 1
:ELF_end