http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55309
--- Comment #29 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-08
09:25:22 UTC ---
I think not in the default memory model, it can support only first 2GB of
code+data. Otherwise you couldn't call from the start of executable to a
function at the end of it (if text segment is bigger than 2GB) or reference
data from a function at the start of executable that is located at the end of
data segment.
So, with zero offset model, your restriction on programs would be essentially,
non-PIE executables (i.e. -mcmodel={small,medium,large} are unsupported),
with 0x7fff8000 (or perhaps even 0x7ffff000) it would be non-PIE executables of
-mcmodel=medium is unsupported and -mcmodel=large is unsupported, unless linked
to an address above shadow mem end. -mcmodel=small supported.