diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3624b15195..af0945f6799 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-27 Joseph Myers + + * config/mips/mips.c (mips_declare_object_name) + [USE_GNU_UNIQUE_OBJECT]: Support use of gnu_unique_object. + 2020-01-27 Martin Liska PR gcov-profile/93403 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index dae189ed20d..513fc5fe295 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -9775,7 +9775,14 @@ mips_declare_object_name (FILE *stream, const char *name, tree decl ATTRIBUTE_UNUSED) { #ifdef ASM_OUTPUT_TYPE_DIRECTIVE - ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "object"); +#ifdef USE_GNU_UNIQUE_OBJECT + /* As in elfos.h. */ + if (USE_GNU_UNIQUE_OBJECT && DECL_ONE_ONLY (decl) + && (!DECL_ARTIFICIAL (decl) || !TREE_READONLY (decl))) + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "gnu_unique_object"); + else +#endif + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "object"); #endif size_directive_output = 0;