This is the mail archive of the
mailing list for the binutils project.
Re: Question about mixing 32-bit and 64-bit objects on x86-64
- From: Ian Lance Taylor <iant at google dot com>
- To: Luchezar Belev <lukcho at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 14 Jul 2009 07:09:45 -0700
- Subject: Re: Question about mixing 32-bit and 64-bit objects on x86-64
- References: <email@example.com>
Luchezar Belev <firstname.lastname@example.org> writes:
> My question is this: is there a way i can link a 32-bit-compiled
> application/object to a 64-bit-compiled library/object or vice versa
> on x86-64
With the GNU linker, you can do the actual link using the -b option to
set the expected input target. But since x86 and x86_64 code is not
compatible, you can't actually make function calls between the code.
> If the binary formats are not compatible maybe some form of "bridge"
> could be used - for example 2 special objects/libs - one 32-bit and
> one 64-bit that link with each other by some special non-standard
I think that should be technically possible but I've never heard of
anybody actually implementing it. The binutils do not have such a