This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Register-relative data addressing, especially m68k.
On Thu, 2004-02-26 at 07:29, Ray Whitmer wrote:
> It is understandable to me that you need a GOT if you are invoking methods
> (or data) in seperate shared libraries.
That seems to make sense. I can't think of an obvious reason why we
need a GOT if we will never have shared libraries. We do still need
assembler/linker support to create/resolve special relocations though,
and not all targets will have the necessary relocations.
Some targets allow putting variables inside the GOT to eliminate one
indirection. This can be done if the variables are "owned" by the
executable, i.e. that are defined in the executable, and can not be
overridden by another module. If there will never be any shared
libraries, then all variables are "owned". If all variables can be put
in the GOT, then the GOT essentially becomes the entire data section,
which is basically what you want.
It looks like we have at least 3 m68k examples now, the AMOS work from
Ian, and the Palm and AmigaOS work you already mentioned.
It should be possible to get something like this accepted into the FSF
gcc sources, but it is likely to take some time and effort to get
everything reviewed and accepted.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com