1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Avoid duplicate symbols of zero size.

This commit is contained in:
Ken Ryall 2009-10-30 20:34:07 +00:00
parent e9a4ea6e19
commit 1cfc169c04

View file

@ -182,7 +182,19 @@ public class ElfBinaryObject extends BinaryObjectAdapter {
protected void addSymbols(Elf.Symbol[] array, int type, List<Symbol> list) {
for (int i = 0; i < array.length; i++) {
list.add(new Symbol(this, array[i].toString(), type, array[i].st_value, array[i].st_size));
// Multiple function symbol entries for the same address are generated
// do not add duplicate symbols with 0 size to the list
boolean duplicateAddressFound = false;
if (type == ISymbol.FUNCTION && array[i].st_size == 0){
for (Symbol s : list) {
if (s.getAddress().equals(array[i].st_value)){
duplicateAddressFound = true;
break;
}
}
}
if (!duplicateAddressFound)
list.add(new Symbol(this, array[i].toString(), type, array[i].st_value, array[i].st_size));
}
}