1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

Bug 561788 - Remove useless field in Elf

The syms field is only set and never read outside of getSections.
It can safely be removed.

Change-Id: I40be61c4d6fab0131bd47134fc444b4306f8b322
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
This commit is contained in:
Matthew Khouzam 2020-04-02 18:23:02 -04:00 committed by Alexander Fedorov
parent ab1c2b0889
commit 5e57f5e2a2

View file

@ -50,7 +50,6 @@ public class Elf {
protected String file;
protected byte[] section_strtab;
private int syms = 0;
private Symbol[] symbols;
private Symbol[] symtab_symbols;
private Section symtab_sym;
@ -1069,10 +1068,6 @@ public class Elf {
default:
throw new IOException("Unknown ELF class " + ehdr.e_ident[ELFhdr.EI_CLASS]); //$NON-NLS-1$
}
if (sections[i].sh_type == Section.SHT_SYMTAB)
syms = i;
if (syms == 0 && sections[i].sh_type == Section.SHT_DYNSYM)
syms = i;
}
}
return sections;