[patch] rs6000: -msdata=none vs -G0
DJ Delorie
dj@redhat.com
Fri Oct 26 12:05:00 GMT 2001
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) \
More information about the Gcc-patches
mailing list