From 5dd81d871e7e22dacec690411a1ae470c2f68bd2 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Thu, 21 Jan 2021 18:37:59 -0500 Subject: [PATCH] Updated Documentation to reflect new M2libc changes --- docs/M2-Planet.1 | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/docs/M2-Planet.1 b/docs/M2-Planet.1 index 53ab160..2a54938 100644 --- a/docs/M2-Planet.1 +++ b/docs/M2-Planet.1 @@ -20,29 +20,32 @@ to make a more powerful C compiler. (with a few extras for convience) Those core primitives being: if (with continue), while (with break), asm, structs (with -> support) gotos (with labels) and return. -With do and for loops, arrays and function pointers as nice extras +With do and for loops, arrays, function pointers and simple macro support +as nice extras .br The supported ARCHITECTURES are as follows: knight-native, knight-posix, x86, amd64, armv7l, aarch64. + +Unofficially all tested armv7l binaries have also worked on armv6l +hosts that have thus far been tested but no promise of compatibilty +until someone is willing to put in the work. + (with planned ports to z80 and 6502) If you fail to specify an architecture, the default of knight-native will be used. +The option --bootstrap-mode exists purely for testing C code for cc_* +compatibility + .br -As M2-Planet's libc is literally only a half-dozen lines of assembly -you will likely need to import libc primitives when building or -having previously built them seperately. +The minimal libc required to work with M2-Planet generated output is +literally only a half-dozen lines of assembly and to simplify use +M2libc (https://github.com/oriansj/M2libc.git) was created with the +goal of providing commonly desired C library functionality. -You can find examples for such primitives in: -test/common_x86/functions/ -test/common_amd64/functions/ -test/common_armv7l/functions/ -test/common_aarch64/functions/ -test/common_knight/functions/ - -with the default libc implementations and elf-headers in the -parent directories correspondingly. +with architecture specific elf-headers and functions in the +directories matching the architecture name. .br @@ -60,12 +63,12 @@ with blood-elf generating dwarf stubs if additional debug info is desired. .br -# M1 -f test/common_x86/x86_defs.M1 -f test/common_x86/libc-core.M1 \ --f return.M1 --LittleEndian --architecture x86 -o return.hex2 +# M1 -f M2libc/x86/x86_defs.M1 -f M2libc/x86/libc-full.M1 \ +-f return.M1 --little-endian --architecture x86 -o return.hex2 -# hex2 -f test/common_x86/ELF-i386.hex2 -f return.hex2 --LittleEndian \ ---architecture x86 --BaseAddress 0x8048000 -o example --exec_enable +# hex2 -f M2libc/x86/ELF-x86.hex2 -f return.hex2 --little-endian \ +--architecture x86 --base-address 0x8048000 -o example .br .SH COMPATIBILITY @@ -77,12 +80,20 @@ even the ones that try to be Turing complete -1 Jeremiah Orians .br Jan (janneke) Nieuwenhuizen +.br +deesix +.br +Sanne Wouda .SH COPYRIGHT -Copyright 2016-2019 Jeremiah Orians +Copyright 2016-2021 Jeremiah Orians .br Copyright 2017 Jan Nieuwenhuizen .br +Copyright 2020-2021 deesix +.br +Copyright 2020-2021 Sanne Wouda +.br License GPLv3+. .SH "SEE ALSO"