Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Khouzam2020-04-02 22:11:32 +0000
committerAlexander Fedorov2020-04-10 17:57:14 +0000
commit1561c18f495aad1beed538376c4b628524f2c065 (patch)
tree950d9c0dbcbd8185fde4f34e4d2578f537f600cf /core
parent5e57f5e2a2f0f9b39951e03a081ad7d7ebaa163b (diff)
downloadorg.eclipse.cdt-1561c18f495aad1beed538376c4b628524f2c065.tar.gz
org.eclipse.cdt-1561c18f495aad1beed538376c4b628524f2c065.tar.xz
org.eclipse.cdt-1561c18f495aad1beed538376c4b628524f2c065.zip
Bug 561787 - Make Elf parser names inline with java coding style
Replace under_score with camelCase for private non-api fields Change-Id: Ica0dece19aaaf79d979588266f4c9552ea6d1224 Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java44
1 files changed, 23 insertions, 21 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 af21ed3c1cc..89a60e1a269 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
@@ -51,11 +51,13 @@ public class Elf {
protected byte[] section_strtab;
private Symbol[] symbols;
- private Symbol[] symtab_symbols;
- private Section symtab_sym;
- private Symbol[] dynsym_symbols;
- private Section dynsym_sym;
- private boolean sections_mapped; // Have sections been mapped? Used to clean up properly in Elf.Dispose.
+ /** .symtab section */
+ private Symbol[] symbolsTable;
+ private Section symbolsTableSection;
+ /** .dynSym section */
+ private Symbol[] dynamicSymbols;
+ private Section dynamicSymbolSection;
+ private boolean areSectionsMapped; // Have sections been mapped? Used to clean up properly in Elf.Dispose.
protected String EMPTY_STRING = ""; //$NON-NLS-1$
@@ -331,7 +333,7 @@ public class Elf {
*/
public ByteBuffer mapSectionData() throws IOException {
makeSureNotCompressed();
- sections_mapped = true;
+ areSectionsMapped = true;
return efile.getChannel().map(MapMode.READ_ONLY, sh_offset, sh_size).load().asReadOnlyBuffer();
}
@@ -973,7 +975,7 @@ public class Elf {
efile = null;
// ensure the mappings get cleaned up
- if (sections_mapped)
+ if (areSectionsMapped)
System.gc();
}
} catch (IOException e) {
@@ -1126,28 +1128,28 @@ public class Elf {
if (symbols == null) {
Section section[] = getSections(Section.SHT_SYMTAB);
if (section.length > 0) {
- symtab_sym = section[0];
- symtab_symbols = loadSymbolsBySection(section[0]);
+ symbolsTableSection = section[0];
+ symbolsTable = loadSymbolsBySection(section[0]);
} else {
- symtab_sym = null;
- symtab_symbols = new Symbol[0];
+ symbolsTableSection = null;
+ symbolsTable = new Symbol[0];
}
section = getSections(Section.SHT_DYNSYM);
if (section.length > 0) {
- dynsym_sym = section[0];
- dynsym_symbols = loadSymbolsBySection(section[0]);
+ dynamicSymbolSection = section[0];
+ dynamicSymbols = loadSymbolsBySection(section[0]);
} else {
- dynsym_sym = null;
- dynsym_symbols = new Symbol[0];
+ dynamicSymbolSection = null;
+ dynamicSymbols = new Symbol[0];
}
- if (symtab_sym != null) {
+ if (symbolsTableSection != null) {
// sym = symtab_sym;
- symbols = symtab_symbols;
- } else if (dynsym_sym != null) {
+ symbols = symbolsTable;
+ } else if (dynamicSymbolSection != null) {
// sym = dynsym_sym;
- symbols = dynsym_symbols;
+ symbols = dynamicSymbols;
}
}
}
@@ -1157,11 +1159,11 @@ public class Elf {
}
public Symbol[] getDynamicSymbols() {
- return dynsym_symbols;
+ return dynamicSymbols;
}
public Symbol[] getSymtabSymbols() {
- return symtab_symbols;
+ return symbolsTable;
}
/* return the address of the function that address is in */

Back to the top