mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 01:11:01 +08:00
Merge remote-tracking branch 'origin/GP-4446_dev747368_dwarf_global_vars_with_const_value'
This commit is contained in:
@@ -21,6 +21,7 @@ import static ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute.*;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute;
|
||||||
import ghidra.app.util.bin.format.dwarf.expression.*;
|
import ghidra.app.util.bin.format.dwarf.expression.*;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
@@ -308,6 +309,11 @@ public class DWARFVariable {
|
|||||||
|
|
||||||
long res = exprEvaluator.pop();
|
long res = exprEvaluator.pop();
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
if (diea.hasAttribute(DWARFAttribute.DW_AT_const_value)) {
|
||||||
|
// skip without complaining global vars with a const value and bad location expression
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// If the expression evaluated to a static address of '0'.
|
// If the expression evaluated to a static address of '0'.
|
||||||
// This case is probably caused by relocation fixups not being applied to the
|
// This case is probably caused by relocation fixups not being applied to the
|
||||||
// .debug_info section.
|
// .debug_info section.
|
||||||
|
|||||||
Reference in New Issue
Block a user