summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-02 13:08:43 +0000
committerramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-02 13:08:43 +0000
commitc325b1f20272b67e2c13767d64870f76063c4721 (patch)
treed9b1f1a8f2f4536987d59fe6f19159139704b7f7 /gcc/config
parentef17a71ae4f67e4d5a0af39395a6035553d226c9 (diff)
downloadgcc-c325b1f20272b67e2c13767d64870f76063c4721.tar.gz
[AArch64] Use default_elf_asm_named_section instead of special cased hook
Hi, The hook for TARGET_ASM_NAMED_SECTION was defined separately in the backend around the time frame for GCC 4.7 under the assumption that '@' would be used as a comment character in the binutils port. This was indeed true in versions of the AArch64 port that never made it into the FSF tree. However this practice was killed before the binutils port made it upstream. Doing archaeology into various revisions including the first commit of upstream binutils, talking to Marcus about the history of this and actually testing the first commit of binutils, I can confidently say that the upstream binutils port never had any use of '@' as a comment character for AArch64 However we never got rid of the special cased handling in GCC and the duplication of code in the AArch64 backend. This was found when I was playing with Virtual Table verification on ARM and AArch64 and discovered ICEs which were similar but manifested in different places begging the obvious question. Tested on aarch64-none-elf with no regressions. Ok to apply ? Ramana 2015-10-02 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * config/aarch64/aarch64.c (aarch64_elf_asm_named_section): Delete. (TLS_SECTION_ASM_FLAG): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228390 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 034da7c2bf8..d4c5665cf4d 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -10568,80 +10568,6 @@ aarch64_shift_truncation_mask (machine_mode mode)
|| aarch64_vect_struct_mode_p (mode)) ? 0 : (GET_MODE_BITSIZE (mode) - 1);
}
-#ifndef TLS_SECTION_ASM_FLAG
-#define TLS_SECTION_ASM_FLAG 'T'
-#endif
-
-void
-aarch64_elf_asm_named_section (const char *name, unsigned int flags,
- tree decl ATTRIBUTE_UNUSED)
-{
- char flagchars[10], *f = flagchars;
-
- /* If we have already declared this section, we can use an
- abbreviated form to switch back to it -- unless this section is
- part of a COMDAT groups, in which case GAS requires the full
- declaration every time. */
- if (!(HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
- && (flags & SECTION_DECLARED))
- {
- fprintf (asm_out_file, "\t.section\t%s\n", name);
- return;
- }
-
- if (!(flags & SECTION_DEBUG))
- *f++ = 'a';
- if (flags & SECTION_WRITE)
- *f++ = 'w';
- if (flags & SECTION_CODE)
- *f++ = 'x';
- if (flags & SECTION_SMALL)
- *f++ = 's';
- if (flags & SECTION_MERGE)
- *f++ = 'M';
- if (flags & SECTION_STRINGS)
- *f++ = 'S';
- if (flags & SECTION_TLS)
- *f++ = TLS_SECTION_ASM_FLAG;
- if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
- *f++ = 'G';
- *f = '\0';
-
- fprintf (asm_out_file, "\t.section\t%s,\"%s\"", name, flagchars);
-
- if (!(flags & SECTION_NOTYPE))
- {
- const char *type;
- const char *format;
-
- if (flags & SECTION_BSS)
- type = "nobits";
- else
- type = "progbits";
-
-#ifdef TYPE_OPERAND_FMT
- format = "," TYPE_OPERAND_FMT;
-#else
- format = ",@%s";
-#endif
-
- fprintf (asm_out_file, format, type);
-
- if (flags & SECTION_ENTSIZE)
- fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE);
- if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
- {
- if (TREE_CODE (decl) == IDENTIFIER_NODE)
- fprintf (asm_out_file, ",%s,comdat", IDENTIFIER_POINTER (decl));
- else
- fprintf (asm_out_file, ",%s,comdat",
- IDENTIFIER_POINTER (DECL_COMDAT_GROUP (decl)));
- }
- }
-
- putc ('\n', asm_out_file);
-}
-
/* Select a format to encode pointers in exception handling data. */
int
aarch64_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED, int global)