source:
scripts/patches/gcc-3.4.3-linkonce-1.patch@
f35399d3
Last change on this file since f35399d3 was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
File size: 12.2 KB |
-
gcc/config/alpha/alpha.c
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2004-11-05 Initial Package Version: 3.4.3 Origin: Jim Gifford Upstream Status: Delayed till 3.4.4 Description: Fixes linkone/comdat issue diff -Naur gcc-3.4.3.orig/gcc/config/alpha/alpha.c gcc-3.4.3/gcc/config/alpha/alpha.c
old new 10169 10169 # define TARGET_SECTION_TYPE_FLAGS unicosmk_section_type_flags 10170 10170 # undef TARGET_ASM_UNIQUE_SECTION 10171 10171 # define TARGET_ASM_UNIQUE_SECTION unicosmk_unique_section 10172 #undef TARGET_ASM_FUNCTION_RODATA_SECTION 10173 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 10172 10174 # undef TARGET_ASM_GLOBALIZE_LABEL 10173 10175 # define TARGET_ASM_GLOBALIZE_LABEL hook_void_FILEptr_constcharptr 10174 10176 #endif -
gcc/config/arm/pe.h
diff -Naur gcc-3.4.3.orig/gcc/config/arm/pe.h gcc-3.4.3/gcc/config/arm/pe.h
old new 97 97 #define MULTIPLE_SYMBOL_SPACES 98 98 99 99 #define TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section 100 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 100 101 101 102 #define SUPPORTS_ONE_ONLY 1 102 103 -
gcc/config/avr/avr.c
diff -Naur gcc-3.4.3.orig/gcc/config/avr/avr.c gcc-3.4.3/gcc/config/avr/avr.c
old new 229 229 #define TARGET_ASM_FUNCTION_EPILOGUE avr_output_function_epilogue 230 230 #undef TARGET_ATTRIBUTE_TABLE 231 231 #define TARGET_ATTRIBUTE_TABLE avr_attribute_table 232 #undef TARGET_ASM_FUNCTION_RODATA_SECTION 233 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 232 234 #undef TARGET_INSERT_ATTRIBUTES 233 235 #define TARGET_INSERT_ATTRIBUTES avr_insert_attributes 234 236 #undef TARGET_SECTION_TYPE_FLAGS -
gcc/config/darwin.h
diff -Naur gcc-3.4.3.orig/gcc/config/darwin.h gcc-3.4.3/gcc/config/darwin.h
old new 686 686 #undef TARGET_ASM_SELECT_RTX_SECTION 687 687 #define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section 688 688 689 #undef TARGET_ASM_FUNCTION_RODATA_SECTION 690 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 691 689 692 #define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \ 690 693 do { \ 691 694 if (FILE) { \ -
gcc/config/i386/cygming.h
diff -Naur gcc-3.4.3.orig/gcc/config/i386/cygming.h gcc-3.4.3/gcc/config/i386/cygming.h
old new 255 255 256 256 extern void i386_pe_unique_section (TREE, int); 257 257 #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section 258 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 258 259 259 260 #define SUPPORTS_ONE_ONLY 1 260 261 -
gcc/config/i386/i386-interix.h
diff -Naur gcc-3.4.3.orig/gcc/config/i386/i386-interix.h gcc-3.4.3/gcc/config/i386/i386-interix.h
old new 344 344 345 345 extern void i386_pe_unique_section (tree, int); 346 346 #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section 347 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 347 348 348 349 #define SUPPORTS_ONE_ONLY 1 349 350 #endif /* 0 */ -
gcc/config/ip2k/ip2k.c
diff -Naur gcc-3.4.3.orig/gcc/config/ip2k/ip2k.c gcc-3.4.3/gcc/config/ip2k/ip2k.c
old new 98 98 #undef TARGET_ASM_UNIQUE_SECTION 99 99 #define TARGET_ASM_UNIQUE_SECTION unique_section 100 100 101 #undef TARGET_ASM_FUNCTION_RODATA_SECTION 102 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 103 101 104 #undef TARGET_ATTRIBUTE_TABLE 102 105 #define TARGET_ATTRIBUTE_TABLE ip2k_attribute_table 103 106 -
gcc/config/mcore/mcore.c
diff -Naur gcc-3.4.3.orig/gcc/config/mcore/mcore.c gcc-3.4.3/gcc/config/mcore/mcore.c
old new 165 165 #define TARGET_ATTRIBUTE_TABLE mcore_attribute_table 166 166 #undef TARGET_ASM_UNIQUE_SECTION 167 167 #define TARGET_ASM_UNIQUE_SECTION mcore_unique_section 168 #undef TARGET_ASM_FUNCTION_RODATA_SECTION 169 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 168 170 #undef TARGET_ENCODE_SECTION_INFO 169 171 #define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info 170 172 #undef TARGET_STRIP_NAME_ENCODING -
gcc/config/rs6000/xcoff.h
diff -Naur gcc-3.4.3.orig/gcc/config/rs6000/xcoff.h gcc-3.4.3/gcc/config/rs6000/xcoff.h
old new 172 172 #define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section 173 173 #define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section 174 174 #define TARGET_ASM_UNIQUE_SECTION rs6000_xcoff_unique_section 175 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section 175 176 #define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding 176 177 #define TARGET_SECTION_TYPE_FLAGS rs6000_xcoff_section_type_flags 177 178 -
gcc/doc/tm.texi
diff -Naur gcc-3.4.3.orig/gcc/doc/tm.texi gcc-3.4.3/gcc/doc/tm.texi
old new 6003 6003 Whatever the actual target object format, this is often good enough. 6004 6004 @end deftypefn 6005 6005 6006 @deftypefn {Target Hook} void TARGET_ASM_FUNCTION_RODATA_SECTION (tree @var{decl}) 6007 Switches to a readonly data section associated with 6008 @samp{DECL_SECTION_NAME (@var{decl})}. 6009 The default version of this function switches to @code{.gnu.linkonce.r.name} 6010 section if function's section is @code{.gnu.linkonce.t.name}, to 6011 @code{.rodata.name} if function is in @code{.text.name} section 6012 and otherwise switches to the normal readonly data section. 6013 @end deftypefn 6014 6006 6015 @deftypefn {Target Hook} void TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode @var{mode}, rtx @var{x}, unsigned HOST_WIDE_INT @var{align}) 6007 6016 Switches to the appropriate section for output of constant pool entry 6008 6017 @var{x} in @var{mode}. You can assume that @var{x} is some kind of -
gcc/final.c
diff -Naur gcc-3.4.3.orig/gcc/final.c gcc-3.4.3/gcc/final.c
old new 1881 1881 { 1882 1882 int log_align; 1883 1883 1884 readonly_data_section ();1884 targetm.asm_out.function_rodata_section (current_function_decl); 1885 1885 1886 1886 #ifdef ADDR_VEC_ALIGN 1887 1887 log_align = ADDR_VEC_ALIGN (NEXT_INSN (insn)); -
gcc/output.h
diff -Naur gcc-3.4.3.orig/gcc/output.h gcc-3.4.3/gcc/output.h
old new 500 500 unsigned HOST_WIDE_INT, int); 501 501 extern void default_unique_section (tree, int); 502 502 extern void default_unique_section_1 (tree, int, int); 503 extern void default_function_rodata_section (tree); 504 extern void default_no_function_rodata_section (tree); 503 505 extern void default_select_rtx_section (enum machine_mode, rtx, 504 506 unsigned HOST_WIDE_INT); 505 507 extern void default_elf_select_rtx_section (enum machine_mode, rtx, -
gcc/target-def.h
diff -Naur gcc-3.4.3.orig/gcc/target-def.h gcc-3.4.3/gcc/target-def.h
old new 78 78 #define TARGET_ASM_UNIQUE_SECTION default_unique_section 79 79 #endif 80 80 81 #ifndef TARGET_ASM_FUNCTION_RODATA_SECTION 82 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_function_rodata_section 83 #endif 84 81 85 #ifndef TARGET_ASM_SELECT_RTX_SECTION 82 86 #define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section 83 87 #endif … … 201 205 TARGET_ASM_SELECT_SECTION, \ 202 206 TARGET_ASM_SELECT_RTX_SECTION, \ 203 207 TARGET_ASM_UNIQUE_SECTION, \ 208 TARGET_ASM_FUNCTION_RODATA_SECTION, \ 204 209 TARGET_ASM_CONSTRUCTOR, \ 205 210 TARGET_ASM_DESTRUCTOR, \ 206 211 TARGET_ASM_OUTPUT_MI_THUNK, \ -
gcc/target.h
diff -Naur gcc-3.4.3.orig/gcc/target.h gcc-3.4.3/gcc/target.h
old new 118 118 for SELECT_SECTION. */ 119 119 void (* unique_section) (tree, int); 120 120 121 /* Tell assembler to switch to the readonly data section associated 122 with function DECL. */ 123 void (* function_rodata_section) (tree); 124 121 125 /* Output a constructor for a symbol with a given priority. */ 122 126 void (* constructor) (rtx, int); 123 127 -
gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc
diff -Naur gcc-3.4.3.orig/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc gcc-3.4.3/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc
old new 1 extern void 2 bar (int x); 3 4 inline void 5 foo (int i) 6 { 7 switch (i) 8 { 9 case 3: 10 case 5: 11 case 6: 12 case 9: 13 case 15: 14 bar (1); 15 break; 16 case 2: 17 case 4: 18 case 7: 19 case 10: 20 case 11: 21 case 12: 22 bar (2); 23 break; 24 case 0: 25 case 1: 26 case 8: 27 case 13: 28 case 16: 29 bar (3); 30 break; 31 case 14: 32 bar (4); 33 break; 34 default: 35 bar (5); 36 break; 37 } 38 } 39 40 void *fooaddr2 = (void *) foo; -
gcc/testsuite/g++.old-deja/g++.other/comdat4.C
diff -Naur gcc-3.4.3.orig/gcc/testsuite/g++.old-deja/g++.other/comdat4.C gcc-3.4.3/gcc/testsuite/g++.old-deja/g++.other/comdat4.C
old new 1 // PR c++/16276 2 // { dg-do link } 3 // { dg-additional-sources " comdat4-aux.cc" } 4 // { dg-options "-O2" } 5 6 extern void 7 bar (int x); 8 9 inline void 10 foo (int i) 11 { 12 switch (i) 13 { 14 case 3: 15 case 5: 16 case 6: 17 case 9: 18 case 15: 19 bar (1); 20 break; 21 case 2: 22 case 4: 23 case 7: 24 case 10: 25 case 11: 26 case 12: 27 bar (2); 28 break; 29 case 0: 30 case 1: 31 case 8: 32 case 13: 33 case 16: 34 bar (3); 35 break; 36 case 14: 37 bar (4); 38 break; 39 default: 40 bar (5); 41 break; 42 } 43 } 44 45 void *fooaddr = (void *) foo; 46 47 void 48 bar (int x) 49 { 50 __asm __volatile ("" : : "r" (x)); 51 } 52 53 int 54 main (void) 55 { 56 return 0; 57 } -
gcc/varasm.c
diff -Naur gcc-3.4.3.orig/gcc/varasm.c gcc-3.4.3/gcc/varasm.c
old new 535 535 text_section (); 536 536 } 537 537 538 /* Switch to read-only data section associated with function DECL. */ 539 540 void 541 default_function_rodata_section (tree decl) 542 { 543 if (decl != NULL_TREE && DECL_SECTION_NAME (decl)) 544 { 545 const char *name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); 546 547 /* For .gnu.linkonce.t.foo we want to use .gnu.linkonce.r.foo. */ 548 if (DECL_ONE_ONLY (decl) && strncmp (name, ".gnu.linkonce.t.", 16) == 0) 549 { 550 size_t len = strlen (name) + 1; 551 char *rname = alloca (len); 552 553 memcpy (rname, name, len); 554 rname[14] = 'r'; 555 named_section_flags (rname, SECTION_LINKONCE); 556 return; 557 } 558 /* For .text.foo we want to use .rodata.foo. */ 559 else if (flag_function_sections && flag_data_sections 560 && strncmp (name, ".text.", 6) == 0) 561 { 562 size_t len = strlen (name) + 1; 563 char *rname = alloca (len + 2); 564 565 memcpy (rname, ".rodata", 7); 566 memcpy (rname + 7, name + 5, len - 5); 567 named_section_flags (rname, 0); 568 return; 569 } 570 } 571 572 readonly_data_section (); 573 } 574 575 /* Switch to read-only data section associated with function DECL 576 for targets where that section should be always the single 577 readonly data section. */ 578 579 void 580 default_no_function_rodata_section (tree decl ATTRIBUTE_UNUSED) 581 { 582 readonly_data_section (); 583 } 584 538 585 /* Switch to section for variable DECL. RELOC is the same as the 539 586 argument to SELECT_SECTION. */ 540 587
Note:
See TracBrowser
for help on using the repository browser.