This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -mcmodel=large doesn't work to me
- From: Ian Lance Taylor <iant at google dot com>
- To: Wei Li <liwei79 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 21 Oct 2010 21:26:01 -0700
- Subject: Re: -mcmodel=large doesn't work to me
- References: <AANLkTikKseCkJdi9kHGtAzhOzp4CxT31j172Rb==HevU@mail.gmail.com> <AANLkTinazkZGMCFn0he-YwO775Zi6Y9AmHVhnj1t6qQy@mail.gmail.com>
Wei Li <liwei79@gmail.com> writes:
> I am working on huge object files and I am glad to see that gcc
> supports -mcmodel=large now. However, my experiment even doesn't work
> because of relocation problem in crtbeginS.o
This message was not appropriate for the mailing list gcc@gcc.gnu.org,
which is for the development of gcc itself. It would be appropriate for
the mailing list gcc-help@gcc.gnu.org. Please take any followups to
gcc-help. Thanks.
Basically, you have encountered a problem which is a cross between a bug
and an installation issue. In order to use -mcmodel=large reliably, you
really need to compile everything with -mcmodel=large. In this case,
the startup file crtbeginS.o, which is part of gcc, was not compiled
with -mcmodel=large.
This can be fixed with a minor gcc source code modification, but the
effect will be to build -mcmodel=large versions of all the gcc
libraries. Distros may prefer to avoid that.
So the best approach here may be to add yet another configure option to
request that this be done. Please consider filing an enhancement
request at http://gcc.gnu.org/bugzilla/ . Thanks.
Ian