LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2010, 11:13 AM   #31
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297

Hi,

@MTK358: I'm glad you got a solution from the other forum you posted. As a personal note: congratulations on your patience and for letting pass the insults of Sergei Steshenko.

Kind regards,

Eric
 
Old 04-23-2010, 11:37 AM   #32
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
"-melf_i386" was suggested on the other forum and it worked.

From "ld --help | grep -- -m" (BTW I feel like I want to throw up if I ever see "ld --help" again):

Code:
  -m EMULATION                Set emulation
How the *#$() am I supposed to know that that means "output format/architecture"?

Last edited by MTK358; 04-23-2010 at 11:40 AM.
 
Old 04-23-2010, 12:07 PM   #33
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by MTK358 View Post
"-melf_i386" was suggested on the other forum and it worked.

From "ld --help | grep -- -m" (BTW I feel like I want to throw up if I ever see "ld --help" again):

Code:
  -m EMULATION                Set emulation
How the *#$() am I supposed to know that that means "output format/architecture"?
In English "emulation" means "behaving like, similarly". And it's indeed what you might need - by default your system is 64 bits, but you need linker to behave like it's 32 bits, don't you ?

So, the next step is 'man ld':

Code:
    231        -memulation
    232            Emulate the emulation linker.  You can list the available emulations with the --verbose or -V options.
    233
    234            If the -m option is not used, the emulation is taken from the "LDEMULATION" environment variable, if that is defined.
    235
    236            Otherwise, the default emulation depends upon how the linker was configured.
Then a qucik WEB search for LDEMULATION - because it looks like pretty unique name. In Yahoo the 5-th match:

http://www.xgc.com/manuals/m1750-ada/xgc-alu/x9277.html :

Quote:
A linker emulation is a "personality" of the linker, which gives the linker default values for the other aspects of the target system. In particular, it consists of

*

the linker script
*

the target
*

several "hook" functions that are run at certain stages of the linking process to do special things that some targets require

Do you see "target" ? If you did read 'ld --help | less' did you see:

Code:
    158 ld: supported targets: elf32-i386 a.out-i386-linux efi-app-ia32 efi-bsdrv-ia32 efi-rtdrv-ia32 elf32-little elf32-big elf64-alpha ecoff-littlealpha elf64-little elf64-
    158 big elf32-littlearm elf32-bigarm elf32-hppa-linux elf32-hppa elf64-hppa-linux elf64-hppa elf64-x86-64 elf64-ia64-little elf64-ia64-big efi-app-ia64 efi-bsdrv-ia64 efi
    158 -rtdrv-ia64 elf32-m68k a.out-m68k-linux elf32-tradbigmips elf32-tradlittlemips ecoff-bigmips ecoff-littlemips elf32-ntradbigmips elf64-tradbigmips elf32-ntradlittlemi
    158 ps elf64-tradlittlemips elf32-powerpc aixcoff-rs6000 elf32-powerpcle ppcboot elf64-powerpc elf64-powerpcle aixcoff64-rs6000 elf32-s390 elf64-s390 elf32-sh-linux elf32
    158 -shbig-linux elf32-sparc a.out-sparc-linux elf64-sparc a.out-sunos-big efi-app-x86_64 efi-bsdrv-x86_64 efi-rtdrv-x86_64 xcoff-powermac mach-o-be mach-o-le mach-o-fat
    158 pef pef-xlib sym elf32-spu srec symbolsrec tekhex binary ihex trad-core
    159 ld: supported emulations: elf_i386 i386linux elf_x86_64
    160 ld: emulation specific options:
    161 elf_i386:
?

I.e. does the 'elf' substring ring a bell ? It's been mentioned in this thread, hasn't it ?

Again, if you did read "ld --help | less". did you see this:

Code:
    109   --oformat TARGET            Specify target of output file
?

And do you see the "format" in "--oformat" ?

Are you at all capable of relating the same words in various parts of text ? Are you capable of finding in your brain a list of synonyms for a word you see ? This is all about reading, comprehending, analyzing.
 
2 members found this post helpful.
Old 04-23-2010, 01:00 PM   #34
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I still don't think "emulation" sounds too intuitive.

When I think "emulation" I imagine things like Bochs and QEMU.
 
0 members found this post helpful.
  


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
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 03:18 PM
Trying to patch kernel + compile, compile is looping. kripz Linux - Kernel 1 06-16-2009 06:51 AM
CLFS 5.9 - Glibc compile: suffix of object files, cannot compile Noddegamra Linux From Scratch 3 04-27-2009 12:49 AM
how to compile software for any other Linux box which is do not have compile? hocheetiong Linux - Newbie 4 03-06-2009 04:35 PM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 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