Quote:
Originally Posted by MTK358
"-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.