Merge branch 'ghidra1_PIC30_ElfImportFixes'

This commit is contained in:
ghidra1 2020-05-14 15:33:29 -04:00
commit 305a1ddf98
28 changed files with 904 additions and 317 deletions

View file

@ -265,22 +265,6 @@ public class SleighLanguage implements Language {
return getRegisterManager().getContextBaseRegister();
}
@Override
public List<AddressLabelInfo> getDefaultLabels() {
ArrayList<AddressLabelInfo> list = new ArrayList<>();
Register regs[] = getRegisters();
for (Register reg : regs) {
if (reg.getAddressSpace().isMemorySpace()) {
AddressLabelInfo entry = new AddressLabelInfo(reg.getAddress(), reg.getName(), true,
SourceType.IMPORTED);
list.add(entry);
}
}
list.addAll(getDefaultSymbols());
return list;
}
@Override
public MemoryBlockDefinition[] getDefaultMemoryBlocks() {
return defaultMemoryBlocks;

View file

@ -119,4 +119,15 @@ public final class GhidraLanguagePropertyKeys {
* NOTE: This is an experimental concept which may be removed in the future
*/
public static final String RESET_CONTEXT_ON_UPGRADE = "resetContextOnUpgrade";
/**
* Property to indicate the minimum recommended base address within the default
* data space for placing relocatable data sections. This is intended to
* avoid loading into low memory regions where registers may be defined.
* The default value for ELF will be just beyond the last memory register defined
* within the default data space. This option is only utilized by the
* ELF Loader for Harvard Architecures when loading a relocatable ELF binary
* (i.e., object module) and corresponds to the ELF Loader option: <code>Data Image Base</code>.
*/
public static final String MINIMUM_DATA_IMAGE_BASE = "minimumDataImageBase";
}

View file

@ -226,13 +226,6 @@ public interface Language {
*/
public Register getRegister(Address addr, int size);
/**
* Return the list of labels for well-known locations.
*
* @return AddressLabelPair[] empty array if there are no labels
*/
public List<AddressLabelInfo> getDefaultLabels();
/**
* Get the default program counter register for this language if there is
* one.
@ -254,7 +247,8 @@ public interface Language {
public MemoryBlockDefinition[] getDefaultMemoryBlocks();
/**
* Returns the default symbols for this language.
* Returns the default symbols for this language. This list does not
* contain registers.
* @return the default symbols for this language
*/
public List<AddressLabelInfo> getDefaultSymbols();

View file

@ -585,11 +585,6 @@ class OldLanguage implements Language {
return null;
}
@Override
public List<AddressLabelInfo> getDefaultLabels() {
throw new UnsupportedOperationException("Language for upgrade use only (getDefaultLabels)");
}
@Override
public Register getProgramCounter() {
throw new UnsupportedOperationException(