Author Topic: Local symbols in obj files  (Read 10815 times)

Offline naens

  • Jr. Member
  • *
  • Posts: 2
Local symbols in obj files
« on: June 09, 2018, 11:08:28 AM »
Hello.

I'm trying to use nasm to output an obj file with local symbols (for debugging purposes), but I cannot find an option to do that.

Here is my command line:
Code: [Select]
nasm -f obj hello.asm -o hello.obj
Other assemblers, like RASM-86, can generate such obj files, which can be used to generate symbols files that can be used for debugging.  But I would like to use nasm because it has some nice features.

Can anyone help me?

Thanks!

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Local symbols in obj files
« Reply #1 on: June 09, 2018, 06:11:11 PM »
Hi naens,
Welcome to the Forum.

The "-g" switch will include debug information in "Borland" format. I am not familiar  with RASM-86.

Best,
Frank


Offline naens

  • Jr. Member
  • *
  • Posts: 2
Re: Local symbols in obj files
« Reply #2 on: June 11, 2018, 06:53:24 AM »
Thanks.

It seems that the Borland format is an incompatible extension to the format the linker (LINK-86) uses.  The object files are still recognized, but the symbols are not read.  Is there any solution to this?  For example, adding another format...

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Local symbols in obj files
« Reply #3 on: June 11, 2018, 07:24:03 PM »
I do not think that it is very likely that a new debug format will be added to OMF. It is rather an obsolete format. You're probably better off to stick with RASM-86, if it does what you want.

Best,
Frank