Skip to content

Commit

Permalink
fasm.m4 resulted in a unnecessary second segment for the dictionary.
Browse files Browse the repository at this point in the history
SAVE-SYSTEM, compilation and the -g option now works for fasm generated
binaries. Some test options added in lina64. 128 G executable possible.
  • Loading branch information
albert committed Jun 24, 2015
1 parent 7199882 commit 7dc1d8d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 2 additions & 2 deletions blocks.frt
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ WANT Z$@ WANT COMPARE WANT ENV
SM HERE OVER - 2SWAP PUT-FILE ; DECIMAL
: TURNKEY ( Save a system to do ACTION in a file witH NAME .)
ROT >DFA @ 'ABORT >DFA ! SAVE-SYSTEM BYE ; DECIMAL
( SAVE-SYSTEM TURNKEY ) CF: ?LI ?64 HEX \ AvdH
( SAVE-SYSTEM TURNKEY ) CF: ?LI ?64 HEX \ AvdH/CH B5jun24
\ The magic number marking the start of an ELF header
CREATE MAGIC 7F C, &E C, &L C, &F C,
\ Return the START of the ``ELF'' header.
Expand All @@ -1640,7 +1640,7 @@ WANT Z$@ WANT COMPARE WANT ENV
\ Return the VALUE of ``HERE'' when this forth started.
: HERE-AT-STARTUP 'DP >DFA @ +ORIGIN @ ;
: SAVE-SYSTEM ( ISO ) HERE BM - D-SIZE ! ( dict size)
0 SM 28 + ! 1 SM 38 + ! ( Kill sections)
SM 28 + @ IF 0 SM 28 + ! 1 SM 38 + ! THEN ( Kill sections)
U0 @ 0 +ORIGIN 40 CELLS MOVE ( Save user variables)
\ Now write it. Consume NAME here.
SM HERE OVER - 2SWAP PUT-FILE ; DECIMAL
Expand Down
3 changes: 2 additions & 1 deletion fasm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ _LINUX_N_(
_BITS32_({define({ELF_FORMAT},{ELF})})
_BITS64_({define({ELF_FORMAT},{ELF64})})
FORMAT ELF_FORMAT EXECUTABLE ; Instead of telling the linker.
define({_SECTION_NOBITS_},{ SEGMENT executable readable writable})
dnl define({_SECTION_NOBITS_},{ SEGMENT executable readable writable})
define({_SECTION_NOBITS_},{ })
;
})_C{}_END_({ _LINUX_N_})
;})
Expand Down
7 changes: 6 additions & 1 deletion lina64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ dnl too. Experience suggests a relation with the
dnl size of the swap space.
dnl 1 Mbyte
define({M4_EM}, 0x00100000)
dnl define({M4_EM},(0x7F000000))
dnl ugly value for test
dnl define({M4_EM}, 0x00176500)
dnl 8 Gbyte , doesn't work for fasm
dnl define({M4_EM},(0x200000000))
dnl slightly under 2 Gbyte, doesn't work for fasm
dnl define({M4_EM},(0x07F000000))
define( {_TASK_}, _yes)dnl
define( {_ALIGNED_}, _yes)
dnl define( {_ISO_IN_}, _yes)dnl
Expand Down
14 changes: 14 additions & 0 deletions logforth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13755,6 +13755,20 @@ Test lina32 and lina64 and added releases to the www/page directory.
The wina release has been tested in full and reported in the testreport.txt
The xina release is still a snapshot.

2015 june 24
Session with Coos Haak. After the change to Debian 7 I could no longer
build 64 bits lina. This was needed because the distributed version
did not run. The problem is that the linker script refuses a 64 bit target.
The lina64/lina32 elf headers build with fasm where wrong, because the
dictionary starts a new section unnecessarily. Change in fasm.m4.
Session with Coos Haak. After the change to Debian 7 I could no longer
build 64 bits lina. This was needed because the distributed version
did not run. The problem is that the linker script refuses a 64 bit target.
Experimenting with the fasm build reveals that the only change needed
to use fasm build lina64 is that the sections must not be killed if
they are zero already, (provided there is only the one segment,like
said above).

--------------------
*SET-SRC should contain a ref to SAVE
*$! and $+! should use smart moves (MOVE)
Expand Down

0 comments on commit 7dc1d8d

Please sign in to comment.