Author Topic: can't assemble to - f rdf for simple file that just has "section .text" in it.  (Read 14748 times)

Offline johntk

  • Jr. Member
  • *
  • Posts: 4
nasm: panic: rdf segment numbers not allocated as expected (0,0,0)
for nasm versions > 2.12.02
It works for 2.12.02

can't assemble even a simple .asm file to rdf object format. 
all the file has in it is:
section .text
that is all.  I reported this problem over a year ago and no one
has fixed it.  I got a message saying that this was fixed but it
still does not work.  I could assemble to elf format but I would
rather use rdf format.  I could use an earlier version of nasm. 
It works with version 2.12.02 but I want to use the latest version
if possible.  I am writing my own operating system and I need this
because I am developing this on a windows machine and I don't have
an elf cross linker available.  I want to write my own transpiler
and generate nasm assembly code and just use the rdf linker
to make the binary file.   

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Weird. Here is the code

Code: [Select]
section .text

With
Code: [Select]
[cyrill@uranus nasm.git] ./nasm -f rdf -o rdf.o ./t.asmpassed just fine. Maybe it's something windows specific?

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
I seem to repeat the problem. It indeed triggers on 2.13.03 while master branch works just fine.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
That said it will be fixed in 2.13.04 I think. Meanwhile could you please give https://www.nasm.us/pub/nasm/releasebuilds/2.14rc0/ a chance?

Offline johntk123

  • Jr. Member
  • *
  • Posts: 5
I tried 2.14rc0 last year and it did not work but I will try it again anyway.  It would be nice to have this working but it may not be essential for what I am trying to do.  I have gotten a 32 bit elf cross compiler and elf cross linker to work and I am very close to getting a 64 bit one to work also.  I have the 64 bit one but in order to get it to work I just need to get a cygwin.dll file.  For some reason the 32 bit one did not need this file.  I also have a sample build.bat file to cross compile the tiny c compiler tool chain, which contains a 32 and 64 bit compiler and linker, to produce elf object files.  But keep working on it and let me know when this will be working.  It may be a problem with running it on Windows if you got it to work on Linux but I don't see why this would be, but I don't know enough about it.

Offline johntk

  • Jr. Member
  • *
  • Posts: 4
Any news on this being fixed yet?  I tried all the latest versions and it still does not work??