25Close27
PpHdOn the 2008-02-28 at 11:07pm
Arg sick

[pphd@localhost src]$ make
echo " dc.b" \"`date -u +"[%Y%m%d %k:%M]"`\" > version.h
tigcc -c -WA,-ic -WA,-i../../preos//src PedroM.asm Bss.asm -WA,-vTI89 
68000 Assembler - version 2.71.F3u (Feb 2, 2005)
Copyright 1985 by Brian R. Anderson
AmigaDOS conversion copyright 1991 by Charlie Gibbs.
Adapted for use with Fargo by David Ellsworth.
Bugfixes and additions by Julien Muchembled, Paul Froissart and Kevin Kofler

Assembling PedroM.asm

PASS 1 line 37494
PASS 2 line 37494
End of assembly - no errors were found.
Heap usage:  -w4095,296
Total hunk sizes:  1b870 code, 0 data, 0 BSS
68000 Assembler - version 2.71.F3u (Feb 2, 2005)
Copyright 1985 by Brian R. Anderson
AmigaDOS conversion copyright 1991 by Charlie Gibbs.
Adapted for use with Fargo by David Ellsworth.
Bugfixes and additions by Julien Muchembled, Paul Froissart and Kevin Kofler

Assembling Bss.asm

PASS 1 line 930
PASS 2 line 930
End of assembly - no errors were found.
Heap usage:  -w4095,264
Total hunk sizes:  0 code, 0 data, 27f8 BSS
tigcc -v --flash-os --outputbin --flash-os-bss-start=0x5B00 PedroM.o
tigcc: /home/pphd/tigcc/bin/ld-tigcc -v --flash-os PedroM.o /home/pphd/tigcc/lib/flashos.a -o PedroM --outputbin
Warning: Flash OS support in TIGCC is experimental.
PedroM.o: Error: Unresolved reference to `BSSSectionStart'.
make: *** [pedrom-89] Error 1

Les deux fichiers sont compilés, mais tigcc n'en passe qu'un au linkeur !

[pphd@localhost src]$ /home/pphd/tigcc/bin/ld-tigcc -v --flash-os PedroM.o Bss.o /home/pphd/tigcc/lib/flashos.a -o PedroM --outputbin
Warning: Flash OS support in TIGCC is experimental.
Bss.o: Error: Symbol import/export hunk without context.
PedroM.o: Error: Unresolved reference to `BSSSectionStart'.

On passe les 2 à la main, et poum, une erreur système de ld-tigcc !

Le fichier qui pose problème Bss.asm ne possède qu'une section BSS qu'il exporte.
Si j'essaye de le compiler :
[pphd@localhost src]$ a68k -g Bss.asm -i../../preos/src/
68000 Assembler - version 2.71.F3u (Feb 2, 2005)
Copyright 1985 by Brian R. Anderson
AmigaDOS conversion copyright 1991 by Charlie Gibbs.
Adapted for use with Fargo by David Ellsworth.
Bugfixes and additions by Julien Muchembled, Paul Froissart and Kevin Kofler

Assembling Bss.asm

PASS 1 line Segmentation fault

Bonheur...

Le fichier Bss.asm:
;
; PedroM - Operating System for Ti-89/Ti-92+/V200.
; Copyright (C) 2008 Patrick Pelissier
;
; This program is free software ; you can redistribute it and/or modify it under the
; terms of the GNU General Public License as published by the Free Software Foundation;
; either version 2 of the License, or (at your option) any later version. 
; 
; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
; See the GNU General Public License for more details. 
; 
; You should have received a copy of the GNU General Public License along with this program;
; if not, write to the 
; Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 

	;; Define the BSS Section for PedroM.
DefineBSSSection set 1

	section ".text"
        xdef	BSSSectionStart
	
	include	"Const.h"		; Constant and Variables.


Le fichier Const.h est celui de PedroM modulo le fait qui inclue Vars.h et kheader.h à la fin.
Vars.h a été légèrement modifié:
;
; PedroM - Operating System for Ti-89/Ti-92+/V200/Titanium.
; Copyright (C) 2003, 2005-2008 Patrick Pelissier
;
; This program is free software ; you can redistribute it and/or modify it under the
; terms of the GNU General Public License as published by the Free Software Foundation;
; either version 2 of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
; See the GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License along with this program;
; if not, write to the
; Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

; System Vars (Globals).

     ifd  DefineBSSSection
     BSS
BSSSectionStart:
     ;; Reserve some place in the BSS Section
rs   MACRO
\1   ds.b \2
     ENDM
     endc

     ifnd  DefineBSSSection
data_start_offset       set	$4C00+$F00
data_global_offset	set	data_start_offset
rs	MACRO
\1	EQU	data_global_offset
data_global_offset	set	data_global_offset+\2
	ENDM
     endc

     ;; Set one data :
     ;;	rs name,data_len

	rs	FloatReg1,FLOAT.sizeof			;// Float register : it is used mainly by internal Floatting Point functions to overides the lack of FPU
	rs	FloatReg2,FLOAT.sizeof
	rs	FloatReg3,FLOAT.sizeof
	rs	FloatReg4,FLOAT.sizeof
	rs	FloatPreCalculMultTab,FLOAT.sizeof*10	;// Table used by FloatMult/FLoatDivide functions to precalculted the multiplication of a floatr by the finger 0, 1, 2 ... 9.
[...]


Des idées ?