[Lldb-commits] [lldb] [lldb] Add function to tell if a section is a GOT section (PR #165936)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 4 10:15:33 PST 2025


================
@@ -5936,6 +5922,20 @@ Section *ObjectFileMachO::GetMachHeaderSection() {
   return nullptr;
 }
 
+bool ObjectFileMachO::IsGOTSection(const lldb_private::Section &section) const {
+  assert(section.GetObjectFile() == this && "Wrong object file!");
+  SectionSP segment = section.GetParent();
+  if (!segment)
+    return false;
+
+  bool is_data_const_got =
+      segment->GetName() == "__DATA_CONST" && section.GetName() == "__got";
+  bool is_auth_const_ptr =
----------------
bulbazord wrote:

Suggestion: `const` these two.

https://github.com/llvm/llvm-project/pull/165936


More information about the lldb-commits mailing list