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: 16-bit relocations in 32-bit code


On 03/13/2010 12:49 PM, Andrew Zabolotny wrote:
> Are there any ideas how my goal could be achieved? It would be good to
> find at least some hack for i386 targets (elf_i386 and pei_i386 would
> be ideal), since on x86_64 everything works fine with the first
> approach.

There is no solution that is generally portable.  However,
given the existance of R_386_PC16, you should be able to
represent ".short SYM-." for any SYM on both i386 and x86_64.

For portability to other machines, you might consider writing
your own trivial assembler and linker for the forth.  You
can then include the linked forth program into the native 
binary via .incbin or the like.


r~


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