diff options
author | Dominique d'Humieres <dominiq@lps.ens.fr> | 2017-07-03 17:53:56 +0200 |
---|---|---|
committer | Dominique d'Humieres <dominiq@gcc.gnu.org> | 2017-07-03 17:53:56 +0200 |
commit | be58770875623c5c92a4b6af7027c67568d4c061 (patch) | |
tree | 50426aea3b51007f83df1bbde21a22032592da7a /gcc | |
parent | 57c49199f0942a6fb5d1b59551098a6c8faf3899 (diff) | |
download | gcc-be58770875623c5c92a4b6af7027c67568d4c061.zip gcc-be58770875623c5c92a4b6af7027c67568d4c061.tar.gz gcc-be58770875623c5c92a4b6af7027c67568d4c061.tar.bz2 |
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 <dominiq@lps.ens.fr>
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/darwin.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 349eb60..8671c4d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr> + + 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 <nathan@acm.org> * hash-table.h (hash_table_mod1): Fix indentation. diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 8e6e25a..4010ed3 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); } |