Reply
Thread Tools
OSEmuTech's Avatar
Posts: 466 | Thanked: 142 times | Joined on Jan 2008 @ Temple Terrorist, FL
#1
I was excited that the latest Netwide Assembler source was able to build in Scratchbox and then when nasm assembled a source file on my N800.

But when I went to link the file using ld I realized I was probably not thinking ahead: Nasm can only assemble to the following object code, while ld is expecting some other format (armel)?

bin flat-form binary files (e.g. DOS .COM, .SYS)
aout Linux a.out object files
aoutb NetBSD/FreeBSD a.out object files
coff COFF (i386) object files (e.g. DJGPP for DOS)
elf32 ELF32 (i386) object files (e.g. Linux)
elf ELF (short name for ELF32)
elf64 ELF64 (x86_64) object files (e.g. Linux)
as86 Linux as86 (bin86 version 0.3) object files
obj MS-DOS 16-bit/32-bit OMF object files
win32 Microsoft Win32 (i386) object files
win64 Microsoft Win64 (x86-64) object files
rdf Relocatable Dynamic Object File Format v2.0
ieee IEEE-695 (LADsoft variant) object file format
macho NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X object files
__________________
16-Bit x86 DOS: DOSBox
Amiga 68k: UAE
Apple II: Winapple
Apple 68k Mac: Basilisk II
Commodore 64: Frodo
Palm OS: Access GarnetVM
TI-89 Calculator: TiEmu 2
 
OSEmuTech's Avatar
Posts: 466 | Thanked: 142 times | Joined on Jan 2008 @ Temple Terrorist, FL
#2
Hum. I looked at the help output of ld. A small flat binary file format might work, but Nasm doesn't output the other file formats.

ld: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big srec symbolsrec tekhex binary ihex
ld: supported emulations: armelf_linux_eabi
__________________
16-Bit x86 DOS: DOSBox
Amiga 68k: UAE
Apple II: Winapple
Apple 68k Mac: Basilisk II
Commodore 64: Frodo
Palm OS: Access GarnetVM
TI-89 Calculator: TiEmu 2
 
Posts: 157 | Thanked: 96 times | Joined on Nov 2007 @ Oxford, UK
#3
The documentation for NASM says it targets x86 processors so even if it runs on an ARM processor the code it outputs won't.
 

The Following 2 Users Say Thank You to Duncan For This Useful Post:
OSEmuTech's Avatar
Posts: 466 | Thanked: 142 times | Joined on Jan 2008 @ Temple Terrorist, FL
#4
That's true. I wasn't thinking things out. Thank you.

I did a -S output of a C source file using gcc last night and saw that the (g)as code generated was for ARM of course. So besides the AT&T syntax, I would need to learn ARM directives, opcodes, etc. to develop using assembly on the NIT.
__________________
16-Bit x86 DOS: DOSBox
Amiga 68k: UAE
Apple II: Winapple
Apple 68k Mac: Basilisk II
Commodore 64: Frodo
Palm OS: Access GarnetVM
TI-89 Calculator: TiEmu 2
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:42.