detect .rodata.* bundled sections

Detect .rodata.* bundled sections so that .rodata.__func__.* relocation
references can be converted to refer to their corresponding object
symbols.

Fixes the following error:

    kpatch_correlate_static_local_variables: 830: static local variable __func__.49968 not used
This commit is contained in:
Josh Poimboeuf 2014-07-31 23:42:07 -05:00
parent f1775ec73d
commit 1bb9b81db1

View File

@ -403,6 +403,11 @@ int is_bundleable(struct symbol *sym)
!strcmp(sym->sec->name + 6, sym->name))
return 1;
if (sym->type == STT_OBJECT &&
!strncmp(sym->sec->name, ".rodata.",8) &&
!strcmp(sym->sec->name + 8, sym->name))
return 1;
if (sym->type == STT_OBJECT &&
!strncmp(sym->sec->name, ".bss.",5) &&
!strcmp(sym->sec->name + 5, sym->name))