summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2016-12-28 19:06:50 +0200
committerHans Rosenfeld <hans.rosenfeld@nexenta.com>2017-01-05 11:06:44 +0100
commit92f29c4ad7c40b844424bb1858c06f2baea67ddd (patch)
tree103515d81431ed560a273c4524b0ae5ce9f54556
parent2380c36e1bade5eb4eb6c6b7445ff58583f998cf (diff)
downloadillumos-joyent-92f29c4ad7c40b844424bb1858c06f2baea67ddd.tar.gz
7695 loader btxldr: process all PT_LOAD segments, not just the first two
Reviewed by: Rich Lowe <richlowe@richlowe.net> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
-rw-r--r--usr/src/boot/sys/boot/i386/btx/btxldr/btxldr.S8
1 files changed, 1 insertions, 7 deletions
diff --git a/usr/src/boot/sys/boot/i386/btx/btxldr/btxldr.S b/usr/src/boot/sys/boot/i386/btx/btxldr/btxldr.S
index c3e544e3a6..1a0f5f40ff 100644
--- a/usr/src/boot/sys/boot/i386/btx/btxldr/btxldr.S
+++ b/usr/src/boot/sys/boot/i386/btx/btxldr/btxldr.S
@@ -198,7 +198,6 @@ start.3:
call putstr # message
movl $m_segs,%esi # Format string
#endif
- movl $0x2,%edi # Segment count
movl 0x1c(%ebx),%edx # Get e_phoff
addl %ebx,%edx # To pointer
movzwl 0x2c(%ebx),%ecx # Get e_phnum
@@ -216,8 +215,7 @@ start.4: cmpl $0x1,(%edx) # Is p_type PT_LOAD?
call putstr # End message
#endif
pushl %esi # Save
- pushl %edi # working
- pushl %ecx # registers
+ pushl %ecx # working registers
movl 0x4(%edx),%esi # Get p_offset
addl %ebx,%esi # as pointer
movl 0x8(%edx),%edi # Get p_vaddr
@@ -232,13 +230,9 @@ start.4: cmpl $0x1,(%edx) # Is p_type PT_LOAD?
rep # zero
stosb # them
start.5: popl %ecx # Restore
- popl %edi # working
popl %esi # registers
- decl %edi # Segments to do
- je start.7 # If none
start.6: addl $0x20,%edx # To next entry
loop start.4 # Till done
-start.7:
#ifdef BTXLDR_VERBOSE
movl $m_done,%esi # Display done
call putstr # message