Re: [Etherboot-developers] Why doesn't gas assemble start32.S
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Marty C. <md...@th...> - 2001-02-09 17:58:24
|
On 2/9/2001 12:36 PM Eno Compton Eno...@Mi... wrote:
>Tried to assemble start32.S. Was amazed to discover errors occur even on
>comment lines. Obviously, some assembler, other than gas, has been used to
>assemble the code.
>Discovered as well, gas includes only one pass, which, among other things,
>makes an assembly listing of questionable value.
>These things suggest to me, real programmers are using an assembler other
>than gas.
>Would somebody please fill me in on these questions?
>How does one assemble start32.S?
Good question. Let's see how the Makefile does it:
$ grep start32 Makefile
SRCS= floppyload.S comload.S liloprefix.S loader.S start16.S start32.S
serial.S
START32= start32.o.pre
START32= bin32/start32.o
# To make sure that this actually builds a start32.o.pre with all options
set,
precompiled: bin/rloader.bin bin/rzloader.bin bin/prloader.bin
bin/przloader.bin bin/floppyload.bin bin/comload.bin bin16/start16.o
bin32/start32.o bin/liloprefix.bin
cp -p bin32/start32.o start32.o.pre
Well, it seems to be part of the "precompiled" family. Let's see what
happens if we do that:
[mdc@rom src]$ make precompiled
gcc -E -DUSE_AS86 -DMOVEROM -DRELOC=0x98000 -o bin/rloader.s loader.S
as86 -0 -b bin/rloader.bin bin/rloader.s
gcc -E -DUSE_AS86 -DMOVEROM -DRELOC=0x98000 -DZLOADER -o bin/rzloader.s
loader.S
as86 -0 -b bin/rzloader.bin bin/rzloader.s
gcc -E -DUSE_AS86 -DMOVEROM -DRELOC=0x98000 -DPCI_PNP_HEADER -o
bin/prloader.s loader.S
as86 -0 -b bin/prloader.bin bin/prloader.s
gcc -E -DUSE_AS86 -DMOVEROM -DRELOC=0x98000 -DPCI_PNP_HEADER -DZLOADER -o
bin/przloader.s loader.S
as86 -0 -b bin/przloader.bin bin/przloader.s
gcc -E -DUSE_AS86 -o bin/floppyload.s floppyload.S
as86 -0 -b bin/floppyload.bin bin/floppyload.s
gcc -E -DUSE_AS86 -o bin/comload.s comload.S
as86 -0 -b bin/comload.bin bin/comload.s
bcc -DMOTD -DIMAGE_MENU -DBACKOFF_LIMIT=7 -DASK_BOOT=3
-DANS_DEFAULT=ANS_NETWORK -O -ansi -DVERSION=\"4.6.12\" -DRELOC=0x98000
-c -o bin16/start16.o start16.S
[here's where start32.S gets assembled]
gcc -E -DMOTD -DIMAGE_MENU -DBACKOFF_LIMIT=7 -DASK_BOOT=3
-DANS_DEFAULT=ANS_NETWORK -O2 -g -fstrength-reduce -fomit-frame-pointer
-m386 -malign-jumps=1 -malign-loops=1 -malign-functions=1 -Wall -W
-Wno-format -Wno-unused -DVERSION=\"4.6.12\" -DRELOC=0x98000 start32.S |
as -o bin32/start32.o
{standard input}: Assembler messages:
{standard input}:339: Warning: indirect ljmp without `*'
[the warnings can be safely ignored, I'm told]
gcc -E -DUSE_AS86 -o bin/liloprefix.s liloprefix.S
as86 -0 -b bin/liloprefix.bin bin/liloprefix.s
cp -p bin/rloader.bin rloader.bin.pre
cp -p bin/rzloader.bin rzloader.bin.pre
cp -p bin/prloader.bin prloader.bin.pre
cp -p bin/przloader.bin przloader.bin.pre
cp -p bin/floppyload.bin floppyload.bin.pre
cp -p bin/comload.bin comload.bin.pre
cp -p bin16/start16.o start16.o.pre
cp -p bin32/start32.o start32.o.pre
cp -p bin/liloprefix.bin liloprefix.bin.pre
OK, so it puts it in bin32/start32.o
Let's try making that:
[mdc@rom src]$ make bin32/start32.o
gcc -E -DMOTD -DIMAGE_MENU -DBACKOFF_LIMIT=7 -DASK_BOOT=3
-DANS_DEFAULT=ANS_NETWORK -O2 -g -fstrength-reduce -fomit-frame-pointer
-m386 -malign-jumps=1 -malign-loops=1 -malign-functions=1 -Wall -W
-Wno-format -Wno-unused -DVERSION=\"4.6.12\" -DRELOC=0x98000 start32.S |
as -o bin32/start32.o
{standard input}: Assembler messages:
{standard input}:339: Warning: indirect ljmp without `*'
That looks like it. I guess it needs lots of options to assemble
properly.
Hope this helps,
Marty
---
Try: http://rom-o-matic.net/ to make Etherboot images instantly.
Name: Martin D. Connor
US Mail: Entity Cyber, Inc.; P.O. Box 391827; Cambridge, MA 02139; USA
Voice: (617) 491-6935, Fax: (617) 491-7046
Email: md...@th...
Web: http://www.thinguin.org/
|