create-diff-object: fix __dyndbg section inclusion

__verbose has renamed to __dyndbg since Linux 5.9, commit e5ebffe18e5a
("dyndbg: rename __verbose section to __dyndbg")

Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
This commit is contained in:
WANG Chao 2020-10-27 13:15:40 +08:00
parent 141f57f016
commit aea2cb96d6
1 changed files with 5 additions and 1 deletions

View File

@ -296,8 +296,12 @@ static bool is_dynamic_debug_symbol(struct symbol *sym)
{
if (sym->type == STT_OBJECT && !strcmp(sym->sec->name, "__verbose"))
return true;
if (sym->type == STT_OBJECT && !strcmp(sym->sec->name, "__dyndbg"))
return true;
if (sym->type == STT_SECTION && !strcmp(sym->name, "__verbose"))
return true;
if (sym->type == STT_SECTION && !strcmp(sym->name, "__dyndbg"))
return true;
return false;
}
@ -324,7 +328,7 @@ static int is_special_static(struct symbol *sym)
if (!sym)
return 0;
/* pr_debug() uses static local variables in the __verbose section */
/* pr_debug() uses static local variables in the __verbose or __dyndbg section */
if (is_dynamic_debug_symbol(sym))
return 1;