This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about mixing 32-bit and 64-bit objects on x86-64


Luchezar Belev <lukcho@gmail.com> 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
> means

I think that should be technically possible but I've never heard of
anybody actually implementing it.  The binutils do not have such a
feature.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]