symtab_read(): fix SECTION detection in symtab_read

symtab_read has been checking a wrong field for "SECTION". Switch the
field from "bind" to "type".

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2018-09-12 15:57:26 +02:00
parent f3ff4043fc
commit f7cfe25e8a

View File

@ -206,7 +206,7 @@ static void symtab_read(struct lookup_table *table, char *path)
if (sscanf(line, "%*s %lx %lu %s %s %*s %s %s\n",
&value, &size, type, bind, ndx, name) != 6 ||
!strcmp(ndx, "UNDEF") ||
!strcmp(bind, "SECTION"))
!strcmp(type, "SECTION"))
continue;
table->obj_nr++;
@ -223,7 +223,7 @@ static void symtab_read(struct lookup_table *table, char *path)
if (sscanf(line, "%*s %lx %lu %s %s %*s %s %s\n",
&value, &size, type, bind, ndx, name) != 6 ||
!strcmp(ndx, "UNDEF") ||
!strcmp(bind, "SECTION"))
!strcmp(type, "SECTION"))
continue;
table->obj_syms[i].value = value;