diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-08-12 15:57:04 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2004-08-12 15:57:04 +0200 |
commit | ab5c8549a48977b865f8ed8dd4bd4e745b1cec75 (patch) | |
tree | fbf89966457df5bcdf83010b92f2c7a1407ea34b /gcc/config | |
parent | 5cf58f28c3a5e69185d70935c5646e5705b16e32 (diff) | |
download | gcc-ab5c8549a48977b865f8ed8dd4bd4e745b1cec75.zip gcc-ab5c8549a48977b865f8ed8dd4bd4e745b1cec75.tar.gz gcc-ab5c8549a48977b865f8ed8dd4bd4e745b1cec75.tar.bz2 |
re PR c++/16276 ([3.4 only] G++ generates local references to linkonce sections)
PR c++/16276
* output.h (default_function_rodata_section,
default_no_function_rodata_section): New prototypes.
* target.h (struct gcc_target): Add asm_out.function_rodata_section.
* target-def.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define.
(TARGET_ASM_OUT): Add it.
* varasm.c (default_function_rodata_section,
default_no_function_rodata_section): New functions.
* final.c (final_scan_insn): Call
targetm.asm_out.function_rodata_section instead of
readonly_data_section.
* config/darwin.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define.
* config/mcore/mcore.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
* config/ip2k/ip2k.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
* config/rs6000/xcoff.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
Likewise.
* config/alpha/alpha.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
* config/i386/cygming.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
Likewise.
* config/i386/i386-interix.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
Likewise.
* config/arm/pe.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
* config/avr/avr.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
* doc/tm.texi (TARGET_ASM_FUNCTION_RODATA_SECTION): Document.
* g++.old-deja/g++.other/comdat4.C: New test.
* g++.old-deja/g++.other/comdat4-aux.cc: New.
From-SVN: r85873
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/alpha/alpha.c | 2 | ||||
-rw-r--r-- | gcc/config/arm/pe.h | 1 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 2 | ||||
-rw-r--r-- | gcc/config/darwin.h | 3 | ||||
-rw-r--r-- | gcc/config/i386/cygming.h | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386-interix.h | 1 | ||||
-rw-r--r-- | gcc/config/ip2k/ip2k.c | 3 | ||||
-rw-r--r-- | gcc/config/mcore/mcore.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/xcoff.h | 1 |
9 files changed, 15 insertions, 1 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 02bfb72..701d4cf 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -10086,6 +10086,8 @@ alpha_init_libfuncs (void) # define TARGET_SECTION_TYPE_FLAGS unicosmk_section_type_flags # undef TARGET_ASM_UNIQUE_SECTION # define TARGET_ASM_UNIQUE_SECTION unicosmk_unique_section +#undef TARGET_ASM_FUNCTION_RODATA_SECTION +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section # undef TARGET_ASM_GLOBALIZE_LABEL # define TARGET_ASM_GLOBALIZE_LABEL hook_void_FILEptr_constcharptr # undef TARGET_MUST_PASS_IN_STACK diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h index 34e9457d7..aa78ff1 100644 --- a/gcc/config/arm/pe.h +++ b/gcc/config/arm/pe.h @@ -85,6 +85,7 @@ #define MULTIPLE_SYMBOL_SPACES #define TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #define SUPPORTS_ONE_ONLY 1 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 092f1da..26d6fdb 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -233,6 +233,8 @@ int avr_case_values_threshold = 30000; #define TARGET_ATTRIBUTE_TABLE avr_attribute_table #undef TARGET_ASM_UNIQUE_SECTION #define TARGET_ASM_UNIQUE_SECTION avr_unique_section +#undef TARGET_ASM_FUNCTION_RODATA_SECTION +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #undef TARGET_INSERT_ATTRIBUTES #define TARGET_INSERT_ATTRIBUTES avr_insert_attributes #undef TARGET_SECTION_TYPE_FLAGS diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 7649830..f7b75f8 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -758,7 +758,8 @@ objc_section_init (void) \ #define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section #undef TARGET_ASM_UNIQUE_SECTION #define TARGET_ASM_UNIQUE_SECTION darwin_unique_section - +#undef TARGET_ASM_FUNCTION_RODATA_SECTION +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \ diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index bc690f7..6b9c722 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -265,6 +265,7 @@ do { \ extern void i386_pe_unique_section (TREE, int); #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #define SUPPORTS_ONE_ONLY 1 diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 4119aa2..971f7cc 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -345,6 +345,7 @@ while (0) extern void i386_pe_unique_section (tree, int); #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #define SUPPORTS_ONE_ONLY 1 #endif /* 0 */ diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c index 7216ff2..4b58fe0 100644 --- a/gcc/config/ip2k/ip2k.c +++ b/gcc/config/ip2k/ip2k.c @@ -101,6 +101,9 @@ const struct attribute_spec ip2k_attribute_table[]; #undef TARGET_ASM_UNIQUE_SECTION #define TARGET_ASM_UNIQUE_SECTION unique_section +#undef TARGET_ASM_FUNCTION_RODATA_SECTION +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section + #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE ip2k_attribute_table diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index 69e05c8..327b9cd 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -172,6 +172,8 @@ static bool mcore_return_in_memory (tree, tree); #define TARGET_ATTRIBUTE_TABLE mcore_attribute_table #undef TARGET_ASM_UNIQUE_SECTION #define TARGET_ASM_UNIQUE_SECTION mcore_unique_section +#undef TARGET_ASM_FUNCTION_RODATA_SECTION +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #undef TARGET_ENCODE_SECTION_INFO #define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info #undef TARGET_STRIP_NAME_ENCODING diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h index d4e056b..e72b5c8 100644 --- a/gcc/config/rs6000/xcoff.h +++ b/gcc/config/rs6000/xcoff.h @@ -172,6 +172,7 @@ toc_section (void) \ #define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section #define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section #define TARGET_ASM_UNIQUE_SECTION rs6000_xcoff_unique_section +#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section #define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding #define TARGET_SECTION_TYPE_FLAGS rs6000_xcoff_section_type_flags |