about summary refs log tree commit diff stats
path: root/subx/teensy
diff options
context:
space:
mode:
Diffstat (limited to 'subx/teensy')
-rwxr-xr-xsubx/teensy/test5bin99 -> 99 bytes
-rw-r--r--subx/teensy/test5.s10
2 files changed, 5 insertions, 5 deletions
diff --git a/subx/teensy/test5 b/subx/teensy/test5
index a67a5299..b960ac41 100755
--- a/subx/teensy/test5
+++ b/subx/teensy/test5
Binary files differdiff --git a/subx/teensy/test5.s b/subx/teensy/test5.s
index 54a79846..e4bd0c7e 100644
--- a/subx/teensy/test5.s
+++ b/subx/teensy/test5.s
@@ -11,7 +11,7 @@ ehdr:                                                 ; Elf32_Ehdr
               dw      2                               ;   e_type
               dw      3                               ;   e_machine
               dd      1                               ;   e_version
-              dd      _start                          ;   e_entry
+              dd      $$                              ;   e_entry
               dd      phdr - $$                       ;   e_phoff
               dd      0                               ;   e_shoff
               dd      0                               ;   e_flags
@@ -25,11 +25,11 @@ ehdrsize  equ  $ - ehdr
 
 phdr:                                                 ; Elf32_Phdr
               dd      1                               ;   p_type
-              dd      0                               ;   p_offset
+              dd      _start - $$                     ;   p_offset
               dd      $$                              ;   p_vaddr
               dd      $$                              ;   p_paddr
-              dd      filesize                        ;   p_filesz
-              dd      filesize                        ;   p_memsz
+              dd      codesize                        ;   p_filesz
+              dd      codesize                        ;   p_memsz
               dd      5                               ;   p_flags
               dd      0x1000                          ;   p_align
 phdrsize  equ  $ - phdr
@@ -43,4 +43,4 @@ _start:
     dd 0x00000001  ; imm32 operand
   int 0x80
 
-filesize      equ     $ - $$
+codesize      equ     $ - _start