This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] rs6000: -msdata=none vs -G0
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] rs6000: -msdata=none vs -G0
- From: DJ Delorie <dj at redhat dot com>
- Date: Fri, 26 Oct 2001 15:04:57 -0400
- CC: dj at redhat dot com
If you give gcc "-msdata=none" there should be no .sdata/.sbss
sections created. However, only cc1 honors this option - the linker
can still put ".comm" objects in .sbss based on their size and the -G
setting. So, if you give -msdata=none, tell the linker -G0 so that it
also does not create a .sbss section.
2001-10-26 DJ Delorie <dj@redhat.com>
* config/rs6000/sysv4.h (LINK_SPEC): Allow -msdata=none to
override -G, and force -G0.
Index: config/rs6000/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.64
diff -p -3 -r1.64 sysv4.h
*** sysv4.h 2001/10/22 14:43:30 1.64
--- sysv4.h 2001/10/26 18:56:00
*************** do { \
*** 1019,1025 ****
/* Override svr4.h definition. */
#undef LINK_SPEC
#define LINK_SPEC "\
! %{h*} %{v:-V} %{G*} \
%{YP,*} %{R*} \
%{Qy:} %{!Qn:-Qy} \
%(link_shlib) \
--- 1019,1025 ----
/* Override svr4.h definition. */
#undef LINK_SPEC
#define LINK_SPEC "\
! %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
%{YP,*} %{R*} \
%{Qy:} %{!Qn:-Qy} \
%(link_shlib) \