Relocatable linking on x86-64 for i386
Valery Reznic
valery_reznic at yahoo.com
Tue Apr 5 09:19:43 IDT 2011
--- On Mon, 4/4/11, Ehud Karni <ehud at unix.mvs.co.il> wrote:
> From: Ehud Karni <ehud at unix.mvs.co.il>
> Subject: Re: Relocatable linking on x86-64 for i386
> To: gleb at minantech.com
> Cc: valery_reznic at yahoo.com, shachar at shemesh.biz, linux-il at cs.huji.ac.il
> Date: Monday, April 4, 2011, 5:21 PM
> On Mon, 4 Apr 2011 13:15:39 Gleb
> Natapov wrote:
> >
> > > > On 04/04/11 10:15, Valery Reznic wrote:
> > > > > Hello. I am trying to make relocatable
> linking on
> > > > x86-64 box for objects in format i386
> >
> > ld -m elf_i386 -r file1.o file2.o -o output.o
>
> If you use gcc for compiling you can do gcc -m32
> <arguments>
> to compile and link.
>
> In fact you can do: gcc -m32 file1.o file2.o -o output.o
I vaguely remember that I tried to use gcc instead of ld long time ago, but gcc gave me some trouble - may be link failed after that, may be run-time problems.
Anyway, thank you.
Valery.
> instead of calling ld directly.
>
> Ehud.
>
>
> --
> Ehud Karni
> Tel: +972-3-7966-561 /"\
> Mivtach - Simon Fax:
> +972-3-7976-561 \ / ASCII Ribbon Campaign
> Insurance agencies (USA) voice mail
> and X Against HTML Mail
> http://www.mvs.co.il FAX:
> 1-815-5509341 / \
> GnuPG: 98EA398D <http://www.keyserver.net/>
> Better Safe Than Sorry
>
More information about the Linux-il
mailing list