You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I watched your amazing stream about this project.
I noticed that if the entry point was not at the beginning of code segment (by setting entry <label>) the current impelemention do not detect the correct beggining of Machine code. like:
formatELF64 executable 3SYS_write = 1SYS_exit = 60STDOUT = 1segment readable executable; <-------- original entry point; these must not be executed ,; (but the elf.js parser must shows them in result console as first machine code bytes)syscallsyscallsyscallprint: ; rsi=str.ptr rdx=str.sizemovrax, SYS_writemovrdi, STDOUTsyscallretexit: ; rdi=retcodemovrax, SYS_exitsyscallretentry main ; <-------- change of entry point of the programmain:movrsi, hellomovrdx, hello_szcall printmovrdi,0call exitret ; UNREACHABLEsegment readable writablehello: db "Hello, World!",10hello_sz = $-hello
now if I run the elf.js parse routine,
It doesn't show repeated syscall bytecode and it gives me: Ehdr.e_entry = 4194513 Phdrs[0].p_vaddr = 4194304
4194513-4194304 = 209
but the correct offset for beginning of the machine code must remains 64(ElfH)+2*56(ProgH)=176
I think because this project may lead to porth development, it's better to use a better way to detect start of the machine code (separate it from entry point), OR just keep in mind to not change entry point from the start of the segment to other addresses.
The text was updated successfully, but these errors were encountered:
Hi, I watched your amazing stream about this project.
I noticed that if the entry point was not at the beginning of code segment (by setting
entry <label>
) the current impelemention do not detect the correct beggining of Machine code. like:now if I run the elf.js parse routine,
It doesn't show repeated
syscall
bytecode and it gives me:Ehdr.e_entry
= 4194513Phdrs[0].p_vaddr
= 41943044194513-4194304 = 209
but the correct offset for beginning of the machine code must remains 64(ElfH)+2*56(ProgH)=176
I think because this project may lead to porth development, it's better to use a better way to detect start of the machine code (separate it from entry point), OR just keep in mind to not change entry point from the start of the segment to other addresses.
The text was updated successfully, but these errors were encountered: