mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
970c8fbdd5
1 changed files with 3 additions and 4 deletions
|
@ -1606,14 +1606,13 @@ public class ElfHeader implements StructConverter {
|
||||||
* @return the section header that contains the address
|
* @return the section header that contains the address
|
||||||
*/
|
*/
|
||||||
public ElfSectionHeader getSectionLoadHeaderContaining(long address) {
|
public ElfSectionHeader getSectionLoadHeaderContaining(long address) {
|
||||||
// FIXME: verify
|
|
||||||
for (ElfSectionHeader sectionHeader : sectionHeaders) {
|
for (ElfSectionHeader sectionHeader : sectionHeaders) {
|
||||||
if (!sectionHeader.isAlloc()) {
|
if (!sectionHeader.isAlloc()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
long start = sectionHeader.getAddress();
|
long start = sectionHeader.getAddress();
|
||||||
long end = start + sectionHeader.getSize();
|
long end = start + sectionHeader.getSize();
|
||||||
if (start <= address && address <= end) {
|
if (start <= address && address < end) {
|
||||||
return sectionHeader;
|
return sectionHeader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue