This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Darwin] More dead-code stripping


Devang's dead code stripping patches were necessary but not sufficient. Here's round 2.

OK to commit to mainline?


--Matt


Index: gcc/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.4958
diff -p -r2.4958 ChangeLog
*** gcc/ChangeLog	18 Aug 2004 17:04:46 -0000	2.4958
--- gcc/ChangeLog	18 Aug 2004 17:28:17 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2004-08-18  Matt Austern  <austern@apple.com
+
+ 	Dead code stripping
+ 	* darwin.h (EH_FRAME_SECTION_ATTR): Mark so it doesn't get stripped.
+ 	* darwin.c (darwin_file_end): Mark file as potentially strippable.
+ 	
  2004-08-18  Zack Weinberg  <zack@codesourcery.com>

  	* rtl.def (NIL): Delete.
Index: gcc/config/darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v
retrieving revision 1.78
diff -p -r1.78 darwin.c
*** gcc/config/darwin.c	18 Aug 2004 16:22:04 -0000	1.78
--- gcc/config/darwin.c	18 Aug 2004 17:28:18 -0000
*************** darwin_file_end (void)
*** 1252,1257 ****
--- 1252,1258 ----
        destructor_section ();
        ASM_OUTPUT_ALIGN (asm_out_file, 1);
      }
+   fprintf (asm_out_file, "\t.subsections_via_symbols\n");
  }

  #include "gt-darwin.h"
Index: gcc/config/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v
retrieving revision 1.91
diff -p -r1.91 darwin.h
*** gcc/config/darwin.h	16 Aug 2004 20:54:40 -0000	1.91
--- gcc/config/darwin.h	18 Aug 2004 17:28:18 -0000
*************** enum machopic_addr_class {
*** 898,904 ****
  #define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section

  #define EH_FRAME_SECTION_NAME   "__TEXT"
! #define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms"

  #undef ASM_PREFERRED_EH_DATA_FORMAT
  #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)  \
--- 898,904 ----
  #define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section

#define EH_FRAME_SECTION_NAME "__TEXT"
! #define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms+live_support"


  #undef ASM_PREFERRED_EH_DATA_FORMAT
  #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)  \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]