gcc -m32 option on amd64.

Peter Jeremy peterjeremy at optushome.com.au
Sat Jul 28 07:55:55 UTC 2007


On 2007-Jul-27 17:32:35 +0100, Tom Evans <tevans.uk at googlemail.com> wrote:
>gcc on amd64 is capable of generating i386 code, but ld on amd64 is
>incapable of linking i386 code together without serious amounts of work.

Can you elaborate on what you mean by "incapable of linking i386 code"?
The stock ld can definitely link i386 code:
turion% ld -V
GNU ld version 2.15 [FreeBSD] 2004-05-23
  Supported emulations:
   elf_i386_fbsd
   elf_x86_64_fbsd
turion% 

There is a problem that the 32-bit pathnames on FreeBSD/amd64 are
different to the 32-bit pathnames on FreeBSD/i386 (ie an i386
executable built on amd64 will point to /libexec/ld-elf32.so.1, rather
than /libexec/ld-elf.so.1) so the result won't execute on a
FreeBSD/i386 box - but I don't see that as a problem with ld, rather
the configuration.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070728/9d835785/attachment.pgp


More information about the freebsd-hackers mailing list