From 7dc1d8ded00040d553d528676f989a519e9b9f2a Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 24 Jun 2015 00:58:49 +0000 Subject: [PATCH] fasm.m4 resulted in a unnecessary second segment for the dictionary. SAVE-SYSTEM, compilation and the -g option now works for fasm generated binaries. Some test options added in lina64. 128 G executable possible. --- blocks.frt | 4 ++-- fasm.m4 | 3 ++- lina64.cfg | 7 ++++++- logforth.txt | 14 ++++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/blocks.frt b/blocks.frt index 5b4b4f3..3e3f3cc 100644 --- a/blocks.frt +++ b/blocks.frt @@ -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. @@ -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 diff --git a/fasm.m4 b/fasm.m4 index 532a597..581c118 100644 --- a/fasm.m4 +++ b/fasm.m4 @@ -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_}) ;}) diff --git a/lina64.cfg b/lina64.cfg index 9edf747..e6dd77f 100644 --- a/lina64.cfg +++ b/lina64.cfg @@ -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 diff --git a/logforth.txt b/logforth.txt index 51eed73..89902b0 100644 --- a/logforth.txt +++ b/logforth.txt @@ -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)