mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 12:11:55 +00:00
Merge remote-tracking branch 'origin/GP-2166_ryanmkurtz_tls'
(Closes #4285)
This commit is contained in:
commit
91e5259018
@ -69,9 +69,9 @@ public class TLSDataDirectory extends DataDirectory {
|
||||
createDirectoryBookmark(program, addr);
|
||||
PeUtils.createData(program, addr, tls.toDataType(), log);
|
||||
|
||||
// Markup TLS callback functions
|
||||
// Markup TLS callback functions and index
|
||||
AddressSpace space = program.getImageBase().getAddressSpace();
|
||||
if (tls.getAddressOfCallBacks() != 0) {
|
||||
AddressSpace space = program.getImageBase().getAddressSpace();
|
||||
DataType pointerDataType = PointerDataType.dataType.clone(program.getDataTypeManager());
|
||||
try {
|
||||
for (int i = 0; i < 20; i++) { // cap # of TLS callbacks as a precaution (1 is the norm)
|
||||
@ -93,6 +93,16 @@ public class TLSDataDirectory extends DataDirectory {
|
||||
log.appendMsg("TLS", "Failed to markup TLS callback functions: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
if (tls.getAddressOfIndex() != 0) {
|
||||
try {
|
||||
Address indexPtrAddr = space.getAddress(tls.getAddressOfIndex());
|
||||
program.getSymbolTable()
|
||||
.createLabel(indexPtrAddr, "_tls_index", SourceType.IMPORTED);
|
||||
}
|
||||
catch (InvalidInputException e) {
|
||||
log.appendMsg("TLS", "Failed to markup TLS index: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user