This is the mail archive of the binutils@sources.redhat.com 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]

gas/ld x86 16-bit 64kb limit and ominous "unreal mode"


Hello

Using gcc/gas to generate a pc-bios for a virtual machine, i face now
the problem, that gas/gcc just knows about the small memory modell and
so my code is restricted to 64kb somehow.

Now, i've by accident read about this ominous "unreal mode" (switching
from real mode to protected mode, changing the segment limits in the
cache and switching back) with which you can use 32-bit offset in
realmode (somehow). 

So im not THAT familiar with that mode, i wonder if it might be used to
execute more than 64kb of gas/gcc-code 16-bit code - circumventing the
use of far calls/jumps/rets by using 32-bit near offsets in (un-)real
mode. (gas with .code16gcc truncates offsets to 16-bit, but i guess the
gnu linker puts 32-bit offsets for the relocated code)

Ok might be a stupid idea, sound bizarre, i haven't found much to read
about code execution in mode, just about accessing data in the extended
memory. Though i hope one of you, knows better why this can't work or
when it could.

Thanks
josef


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