mescc: Update elf32-header for linux-4.17.
Previously, our binaries showed this $ readelf -s scaffold/main.mes-out There are 2 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x01000000 0x01000000 0x0557c 0x0557c RWE 0x1 LOAD 0x000000 0x01000000 0x01000000 0x0557c 0x0557c RWE 0x1 Section to Segment mapping: Segment Sections... 00 .text .data 01 .text .data Linux-4.17 refuses to run this and says Uhuuh, elf segment at 0000000001000000 requested but the memory is mapped already Segmentation fault * lib/x86-mes/elf32-header.hex2: Remove unused data program header.
This commit is contained in:
parent
d8e6046453
commit
125b43acc8
|
@ -51,7 +51,7 @@
|
||||||
34 00 # e_ehsize Indicating our 52 Byte header
|
34 00 # e_ehsize Indicating our 52 Byte header
|
||||||
|
|
||||||
20 00 # e_phentsize size of a program header table
|
20 00 # e_phentsize size of a program header table
|
||||||
02 00 # e_phnum number of entries in program table
|
01 00 # e_phnum number of entries in program table
|
||||||
|
|
||||||
28 00 # e_shentsize size of a section header table
|
28 00 # e_shentsize size of a section header table
|
||||||
07 00 # e_shnum number of entries in section table
|
07 00 # e_shnum number of entries in section table
|
||||||
|
@ -76,15 +76,18 @@
|
||||||
01 00 00 00 # ph_align
|
01 00 00 00 # ph_align
|
||||||
|
|
||||||
# @60
|
# @60
|
||||||
:ELF_program_header__data
|
#:ELF_program_header__data # NOT USED
|
||||||
01 00 00 00 # ph_type: PT-LOAD = 1
|
# FIXME: linux 4.17 does not allow this overlap
|
||||||
00 00 00 00 # ph_offset
|
# Uhuuh, elf segment at 0000000001000000
|
||||||
&ELF_base # ph_vaddr
|
# requested but the memory is mapped already
|
||||||
&ELF_base # ph_physaddr
|
01 00 00 00 # ph_type: PT-LOAD = 1
|
||||||
%ELF_end>ELF_base # ph_filesz
|
00 00 00 00 # ph_offset
|
||||||
%ELF_end>ELF_base # ph_memsz
|
&ELF_base # ph_vaddr
|
||||||
07 00 00 00 # ph_flags: PF-X|PF-W|PF-R = 7
|
&ELF_base # ph_physaddr
|
||||||
01 00 00 00 # ph_align
|
%ELF_end>ELF_base # ph_filesz
|
||||||
|
%ELF_end>ELF_base # ph_memsz
|
||||||
|
07 00 00 00 # ph_flags: PF-X|PF-W|PF-R = 7
|
||||||
|
01 00 00 00 # ph_align
|
||||||
|
|
||||||
# @80
|
# @80
|
||||||
:ELF_comment
|
:ELF_comment
|
||||||
|
|
Loading…
Reference in a new issue