[bootstrappable] Re: GNU Mes 0.18 released

  • From: Ondřej Čertík <ondrej@xxxxxxxxx>
  • To: bootstrappable@xxxxxxxxxxxxx
  • Date: Wed, 07 Nov 2018 12:24:05 -0700



On Wed, Nov 7, 2018, at 11:52 AM, Orians, Jeremiah (DTMB) wrote:

Ok. Here is what I have done, please let me know if there is a simpler way:
Will do

git clone ...
cd mescc-tools-seed
./bootstrap.sh
This creates the blood-elf executable needed for the next stage, I put it 
into my PATH. This accesses the "vm" in stage0, which I also compiled.
Exactly correct

git clone ...
cd M2-Planet
./bootstrap.sh 
./bootstrap.sh: line 84: 18530 Segmentation fault      (core dumped) 
blood-elf -f seed.M1 -o bin/seed-footer.M1
+ exit 1
And it segfaults. I use Ubuntu 18.04.

Oh that is a bug I recently fixed in M2-Planet's ELF header 
(https://github.com/oriansj/M2-Planet/commit/4629a2e842a9e07ea366a3fd731f3c21bdc5afdf)
[Caused by a change in Linux v4.17 where 2 headers are no longer allowed 
to be loaded at the same address]
and haven't propagated to mescc-tools-seed yet (Sorry about that)
The fix is to change line 80: 
https://github.com/oriansj/mescc-tools-seed/blob/master/ELF-i386-debug.hex2#L80
From
01 00 00 00 # ph_type: PT-LOAD = 1
To
00 00 00 00 # ph_type: PT-LOAD = 0

And that bug will be resolved

Which will change the resulting binaries from the original and thus you 
will want to comment out:
https://github.com/oriansj/mescc-tools-seed/blob/master/bootstrap.sh#L256
The 3 diff lines

(I'll be updating all of these when I get home tonight)

I applied the following patch:

--- a/ELF-i386-debug.hex2
+++ b/ELF-i386-debug.hex2
@@ -76,8 +76,7 @@
 01 00 00 00                    # ph_align
 
 # @60
-:ELF_program_header__data
-01 00 00 00                     # ph_type: PT-LOAD = 1
+00 00 00 00                     # ph_type: PT-LOAD = 0
 00 00 00 00                     # ph_offset
 &ELF_base                       # ph_vaddr
 &ELF_base                       # ph_physaddr


but the bootstrap.sh worked, but based on your comments it should fail the 
tests. And blood-elf still segfaults. So I don't know.

There is no rush. Once you fix it, I'll try it again. I use Linux kernel 4.15.0 
in Ubuntu 18.04.

Ondrej

Other related posts: