diff options
author | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2020-09-09 15:43:57 +0300 |
---|---|---|
committer | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2020-09-09 15:43:57 +0300 |
commit | 67106aa67ee934e88ff72bc9c2c102ec66c3eede (patch) | |
tree | a1bfc8a2c43c07ca62aca300313fe17d8b3698ae | |
parent | 7655ff9b754569fc6c7725022620274f42195f7c (diff) | |
download | gcc-sandbox/akazmin/attr_section_fix.tar.gz gcc-sandbox/akazmin/attr_section_fix.tar.bz2 gcc-sandbox/akazmin/attr_section_fix.zip |
Fixed section conflict for variable with section attributesandbox/akazmin/attr_section_fix
Annobin support commit 566cac3772f34e1add8a81190a5f09db145c5a8d
breaks the logic for function section detection.
This commit just restore the original behaviour.
Change-Id: Ide9be892f3f285e4b3e6a8905e1666ab35dad185
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
-rw-r--r-- | gcc/varasm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 98251d68c59..55962d9382d 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -625,7 +625,10 @@ default_function_section (tree decl, enum node_frequency freq, const char * suffix; suffix = default_function_section_suffix (freq, startup, exit); - return get_named_text_section (decl, ACONCAT((".text", suffix, NULL)), NULL); + if (suffix) + return get_named_text_section (decl, ACONCAT((".text", suffix, NULL)), NULL); + + return NULL; } /* Return the section for function DECL. |