global variables?
Peter Johnson
peter at tortall.net
Sat May 27 11:11:46 PDT 2006
On Sat, 27 May 2006, Nic Reveles wrote:
<SNIP code>
> I copied this from a website teaching Unix assembly in comparison with dos
> assembly.
>
> yasm -m amd64 -o hello_world hello_world.asm
> hello_world.asm:8: warning: binary object format does not support global
> variables
This looks like an example for Unix assembly; Unix requires two steps (the
book should be telling you this), first assembly, then linking. This
requires an intermediate relocatable object file like ELF, not BIN.
Also, the code given is standard x86 code, not AMD64 code. The correct
sequence to assemble, link, and run should be something like:
yasm -f elf hello_world.asm <-- generates hello_world.o
gcc -o hello_world hello_world.o <-- generates hello_world by calling the
linker (ld)
./hello_world
--
Peter
More information about the bug-yasm
mailing list