On Mon, Oct 15, 2012 at 09:48:57AM -0500, Chris Bennett wrote: > On Mon, Oct 15, 2012 at 09:31:34AM -0500, Chris Bennett wrote: > > I have added this: > > > > section .note.openbsd.ident > > align 2 > > dd 8 > > dd 4 > > dd 1 > > db 'OpenBSD',0 > > dd 0 > > align 2 > > > > But get error: > > > > sfhello.asm:1: error: segment name `.note.openbsd.ident' not recognized > > > > This does work fine if I do this: > add note section then compile like this: > > nasm -f elf32 -o sfhello.o sfhello.asm > ld -m elf_i386_obsd -o sfhello sfhello.o > ./sfhello > Hello, world! > > Anything wrong with this method?
No, but it is often easier to let gcc invoke the linker. instead of ld -m elf_i386_obsd -o sfhello sfhello.o you could do gcc -o sfhello sfhello.o /jl -- ASCII ribbon campaign ( ) Powered by Lemote Fuloong against HTML e-mail X Loongson MIPS and OpenBSD and proprietary / \ http://www.mutt.org attachments Code Blue or Go Home!