1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Bug 561788 - Convert fields into variables in Elf

The fields are not used outside of the loadSymbols section,
and they are written before being read, so they should be safely
inlineable.

Change-Id: I68388227074d80ace283395b48c88c59700dd9da
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
This commit is contained in:
Matthew Khouzam 2020-04-02 18:29:17 -04:00
parent bcd1b5b71b
commit c70484d11e

View file

@ -53,10 +53,8 @@ public class Elf {
private Symbol[] symbols; private Symbol[] symbols;
/** .symtab section */ /** .symtab section */
private Symbol[] symbolsTable; private Symbol[] symbolsTable;
private Section symbolsTableSection;
/** .dynSym section */ /** .dynSym section */
private Symbol[] dynamicSymbols; private Symbol[] dynamicSymbols;
private Section dynamicSymbolSection;
private boolean areSectionsMapped; // Have sections been mapped? Used to clean up properly in Elf.Dispose. private boolean areSectionsMapped; // Have sections been mapped? Used to clean up properly in Elf.Dispose.
protected String EMPTY_STRING = ""; //$NON-NLS-1$ protected String EMPTY_STRING = ""; //$NON-NLS-1$
@ -1125,6 +1123,8 @@ public class Elf {
} }
public void loadSymbols() throws IOException { public void loadSymbols() throws IOException {
Section symbolsTableSection = null;
Section dynamicSymbolSection = null;
if (symbols == null) { if (symbols == null) {
Section section[] = getSections(Section.SHT_SYMTAB); Section section[] = getSections(Section.SHT_SYMTAB);
if (section.length > 0) { if (section.length > 0) {