From 5e57f5e2a2f0f9b39951e03a081ad7d7ebaa163b Mon Sep 17 00:00:00 2001 From: Matthew Khouzam Date: Thu, 2 Apr 2020 18:23:02 -0400 Subject: [PATCH] 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 --- .../utils/org/eclipse/cdt/utils/elf/Elf.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java index e224cd92332..af21ed3c1cc 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java @@ -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;