LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2010, 12:05 AM   #1
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Rep: Reputation: 18
ld can't recognize .o format ??


Hi
i have
Code:
GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303
and it is unable to recognize the .o format
i have typed following :
Code:
ld 2.o
2.o: file not recognized: File format not recognized
plz help
thanks in advance
 
Old 07-12-2010, 12:53 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, what is the origin of the 2.o file? What does
Code:
file 2.o
say?

Last edited by raskin; 07-12-2010 at 12:54 AM.
 
Old 07-12-2010, 12:59 AM   #3
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
here it is ...
Quote:
file 2.o
2.o: data
 
Old 07-12-2010, 01:01 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
And why do you think that it is a GNU-toolchain-compatible object file? Where did you get it?

Looks like it is an .o-file in some other object file format not usually seen on POSIX-like computers.
 
Old 07-12-2010, 01:08 AM   #5
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
I have written a .asm program and compiled & linked it using SciTE
and i dont know how to run it , i am a newbie in .asm too !!
 
Old 07-12-2010, 01:14 AM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
SciTE? Isn't SciTE just an editor? Maybe it used something incompatible with GCC/GAs/BNU ld
 
Old 07-12-2010, 01:22 AM   #7
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
here is .asm properties file ..
Quote:
command.compile.$(file.patterns.asm)=nasm $(FileNameExt)

command.name.0.*.asm=Link
command.0.*.asm=link $(FileName) $(FileName).o



statement.indent.$(file.patterns.asm)=9 .if

I just had read about file formats..and I see there is a object file format called "elf"
so what do you say about it ??
thanks for the above info !!
can you suggest some diff editor for asm ??
 
Old 07-12-2010, 01:34 AM   #8
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, I was not saying anything bad or good about SciTE (I am a Vim user, but Vim requires some effort to learn and payback is delayed). I just said that mentioning SciTE doesn't describe the real origin of object file. If I remember correctly, NASM can create different object file formats. ELF is the format used by GNU ld. Maybe NASM can just create static ELF executables on its own, though.
 
Old 07-12-2010, 09:31 AM   #9
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
that worked !!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Simple Linux script to convert datetime format to UTC format shayno90 Linux - Newbie 10 10-09-2009 08:19 AM
VLC can't recognize the input's format: gitecravirs Linux - Newbie 0 08-03-2009 08:03 AM
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
gdb won't recognize a.out file format jakykong Programming 17 08-25-2007 05:21 AM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration