================
@@ -556,6 +556,28 @@ static bool GetOsFromOSABI(unsigned char osabi_byte,
   return ostype != llvm::Triple::OSType::UnknownOS;
 }
 
+/// Read the bytes for the section headers from the ELF object file data.
+static DataExtractor GetSectionHeadersFromELFData(
+  const elf::ELFHeader &header, const DataExtractor &object_data) {
+  DataExtractor sh_data;
+  const elf_off sh_offset = header.e_shoff;
+  const size_t sh_size = header.GetSectionHeaderByteSize();
+  sh_data.SetData(object_data, sh_offset, sh_size);
+  return sh_data;
----------------
labath wrote:

```suggestion
  return DataExtractor(object_data, header.e_shoff, 
header.GetSectionHeaderByteSize());
```

https://github.com/llvm/llvm-project/pull/129166
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to