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]

Forcing ld to link 32 and 64 bit code together


I know you're reading this just to say "it can't be done." But listen.

I'm making some code that will exist in the transition between a 32
bit non-paged environment to a 64 bit paged environment. So my 32 bit
code will turn on 64 bit page tables, and then it needs to jump to 64
bit code. I want to end the 32 bit code with a relative jump to the
symbol name for the 64 bit code, and I just want the linker to fill in
the offset for me (or else I'm just going to have to manually emit the
bytes myself and fix up the offset manually every time the code
changes.)

Is it possible to override the (understandable, correct) behavior of
ld to force it to link 32 and 64 bit together? If not, is there a
specific place I can look in the source to disable the sanity check
for linking 32 and 64 bit code together?

Thanks

JB


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