From: Dominique d'Humieres Date: Mon, 3 Jul 2017 15:53:56 +0000 (+0200) Subject: re PR bootstrap/81033 (there are cases where ld64 is not able to determine correct... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be58770875623c5c92a4b6af7027c67568d4c061;p=gcc.git re PR bootstrap/81033 (there are cases where ld64 is not able to determine correct atom boundaries from the output GCC currently produces) 2017-07-03 Dominique d'Humieres PR target/81033 * config/darwin.c (darwin_function_switched_text_sections): Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw in two pieces, and suppress the use of buf. From-SVN: r249926 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 349eb6094ab..8671c4d1b63 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-07-03 Dominique d'Humieres + + PR target/81033 + * config/darwin.c (darwin_function_switched_text_sections): + Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw + in two pieces, and suppress the use of buf. + 2017-07-03 Nathan Sidwell * hash-table.h (hash_table_mod1): Fix indentation. diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 8e6e25ab7f5..4010ed31e48 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3683,11 +3683,9 @@ default_function_sections: void darwin_function_switched_text_sections (FILE *fp, tree decl, bool new_is_cold) { - char buf[128]; - snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_", - IDENTIFIER_POINTER (DECL_NAME (decl))); /* Make sure we pick up all the relevant quotes etc. */ - assemble_name_raw (fp, (const char *) buf); + assemble_name_raw (fp, new_is_cold?"__cold_sect_of_":"__hot_sect_of_"); + assemble_name_raw (fp, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); fputs (":\n", fp); }