public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/46125] New: -mcmodel=large doesn't work
@ 2010-10-22 1:53 liwei79 at gmail dot com
2010-10-27 20:38 ` [Bug other/46125] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: liwei79 at gmail dot com @ 2010-10-22 1:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46125
Summary: -mcmodel=large doesn't work
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: liwei79@gmail.com
Hi,
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
My Source file: t.c
#include <stdio.h>
extern int foo(int argc, char **argv);
void *pv1[1024]={(void*)foo,};
char aaaaa[2147483658] = {1, 2 };
char bbbbb[2147483658] = {2, 3 };
void *pv2[1024]={(void*)foo,};
int foo(int argc, char **argv)
{
printf("%d", aaaaa[2147483657]);
printf("%d", bbbbb[2147483657]);
return 0;
}
Command line:
gcc -mcmodel=large -fPIC -shared t.c -o t.so
Error:
/gcc4.5.1/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/crtbeginS.o: In
function `__do_global_dtors_aux':
crtstuff.c:(.text+0x3): relocation truncated to fit: R_X86_64_PC32
against `.bss'
crtstuff.c:(.text+0x37): relocation truncated to fit: R_X86_64_PC32
against `.bss'
crtstuff.c:(.text+0x57): relocation truncated to fit: R_X86_64_PC32
against `.bss'
crtstuff.c:(.text+0x62): relocation truncated to fit: R_X86_64_PC32
against `.bss'
crtstuff.c:(.text+0x6d): relocation truncated to fit: R_X86_64_PC32
against `.bss'
Could someone help me figure out the problem? I am using RH5 64bit. My gcc is
compiled with all default configuration.
Thanks,
Wei
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/46125] -mcmodel=large doesn't work
2010-10-22 1:53 [Bug other/46125] New: -mcmodel=large doesn't work liwei79 at gmail dot com
@ 2010-10-27 20:38 ` pinskia at gcc dot gnu.org
2010-10-28 6:23 ` liwei79 at gmail dot com
2012-06-21 15:28 ` adrian.m.smith at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-10-27 20:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46125
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ABI |
Severity|critical |normal
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-27 20:37:54 UTC ---
As mentioned in the thread to the list you need to compile crtstuff.c with
-mcmodel=large also.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/46125] -mcmodel=large doesn't work
2010-10-22 1:53 [Bug other/46125] New: -mcmodel=large doesn't work liwei79 at gmail dot com
2010-10-27 20:38 ` [Bug other/46125] " pinskia at gcc dot gnu.org
@ 2010-10-28 6:23 ` liwei79 at gmail dot com
2012-06-21 15:28 ` adrian.m.smith at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: liwei79 at gmail dot com @ 2010-10-28 6:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46125
Wei Li <liwei79 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Wei Li <liwei79 at gmail dot com> 2010-10-28 06:22:59 UTC ---
Thanks a lot.
I recompiled crtstuff.c with -mcmodel=large and the issue is solved.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/46125] -mcmodel=large doesn't work
2010-10-22 1:53 [Bug other/46125] New: -mcmodel=large doesn't work liwei79 at gmail dot com
2010-10-27 20:38 ` [Bug other/46125] " pinskia at gcc dot gnu.org
2010-10-28 6:23 ` liwei79 at gmail dot com
@ 2012-06-21 15:28 ` adrian.m.smith at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: adrian.m.smith at gmail dot com @ 2012-06-21 15:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46125
Adrian Smith <adrian.m.smith at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adrian.m.smith at gmail dot
| |com
--- Comment #3 from Adrian Smith <adrian.m.smith at gmail dot com> 2012-06-21 15:27:49 UTC ---
"As mentioned in the thread to the list you need to compile crtstuff.c with
-mcmodel=large also."
Can someone add a link to the thread? I have googled for it but this bug report
keeps on coming up. I am not too familiar with gcc development so don't know
which list is being talked about.
I too have a program which requires > 2GB of compiled code on x86-64 and get
the errors from "crtstuff.c". But where is it, how do I recompile it?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-21 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-22 1:53 [Bug other/46125] New: -mcmodel=large doesn't work liwei79 at gmail dot com
2010-10-27 20:38 ` [Bug other/46125] " pinskia at gcc dot gnu.org
2010-10-28 6:23 ` liwei79 at gmail dot com
2012-06-21 15:28 ` adrian.m.smith at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).