@@ -781,7 +781,7 @@ ByteOrder ObjectFileELF::GetByteOrder() const {
781781}
782782
783783uint32_t ObjectFileELF::GetAddressByteSize () const {
784- return m_data. GetAddressByteSize ();
784+ return m_data_nsp-> GetAddressByteSize ();
785785}
786786
787787AddressClass ObjectFileELF::GetAddressClass (addr_t file_addr) {
@@ -822,7 +822,7 @@ size_t ObjectFileELF::SectionIndex(const SectionHeaderCollConstIter &I) const {
822822
823823bool ObjectFileELF::ParseHeader () {
824824 lldb::offset_t offset = 0 ;
825- return m_header.Parse (m_data , &offset);
825+ return m_header.Parse (*m_data_nsp. get () , &offset);
826826}
827827
828828UUID ObjectFileELF::GetUUID () {
@@ -840,7 +840,7 @@ UUID ObjectFileELF::GetUUID() {
840840 return UUID ();
841841
842842 core_notes_crc =
843- CalculateELFNotesSegmentsCRC32 (m_program_headers, m_data );
843+ CalculateELFNotesSegmentsCRC32 (m_program_headers, *m_data_nsp. get () );
844844
845845 if (core_notes_crc) {
846846 // Use 8 bytes - first 4 bytes for *magic* prefix, mainly to make it
@@ -851,7 +851,7 @@ UUID ObjectFileELF::GetUUID() {
851851 }
852852 } else {
853853 if (!m_gnu_debuglink_crc)
854- m_gnu_debuglink_crc = calc_crc32 (0 , m_data );
854+ m_gnu_debuglink_crc = calc_crc32 (0 , *m_data_nsp. get () );
855855 if (m_gnu_debuglink_crc) {
856856 // Use 4 bytes of crc from the .gnu_debuglink section.
857857 u32le data (m_gnu_debuglink_crc);
@@ -1037,7 +1037,8 @@ size_t ObjectFileELF::GetProgramHeaderInfo(ProgramHeaderColl &program_headers,
10371037
10381038// ParseProgramHeaders
10391039bool ObjectFileELF::ParseProgramHeaders () {
1040- return GetProgramHeaderInfo (m_program_headers, m_data, m_header) != 0 ;
1040+ return GetProgramHeaderInfo (m_program_headers, *m_data_nsp.get (), m_header) !=
1041+ 0 ;
10411042}
10421043
10431044lldb_private::Status
@@ -1627,8 +1628,8 @@ ObjectFileELF::StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const {
16271628
16281629// ParseSectionHeaders
16291630size_t ObjectFileELF::ParseSectionHeaders () {
1630- return GetSectionHeaderInfo (m_section_headers, m_data , m_header, m_uuid ,
1631- m_gnu_debuglink_file, m_gnu_debuglink_crc,
1631+ return GetSectionHeaderInfo (m_section_headers, *m_data_nsp. get () , m_header,
1632+ m_uuid, m_gnu_debuglink_file, m_gnu_debuglink_crc,
16321633 m_arch_spec);
16331634}
16341635
@@ -3600,7 +3601,8 @@ ArchSpec ObjectFileELF::GetArchitecture() {
36003601 if (H.p_type != PT_NOTE || H.p_offset == 0 || H.p_filesz == 0 )
36013602 continue ;
36023603 DataExtractor data;
3603- if (data.SetData (m_data, H.p_offset , H.p_filesz ) == H.p_filesz ) {
3604+ if (data.SetData (*m_data_nsp.get (), H.p_offset , H.p_filesz ) ==
3605+ H.p_filesz ) {
36043606 UUID uuid;
36053607 RefineModuleDetailsFromNote (data, m_arch_spec, uuid);
36063608 }
@@ -3755,10 +3757,10 @@ llvm::ArrayRef<ELFProgramHeader> ObjectFileELF::ProgramHeaders() {
37553757}
37563758
37573759DataExtractor ObjectFileELF::GetSegmentData (const ELFProgramHeader &H) {
3758- // Try and read the program header from our cached m_data which can come from
3759- // the file on disk being mmap'ed or from the initial part of the ELF file we
3760- // read from memory and cached.
3761- DataExtractor data = DataExtractor (m_data , H.p_offset , H.p_filesz );
3760+ // Try and read the program header from our cached m_data_nsp which can come
3761+ // from the file on disk being mmap'ed or from the initial part of the ELF
3762+ // file we read from memory and cached.
3763+ DataExtractor data = DataExtractor (*m_data_nsp. get () , H.p_offset , H.p_filesz );
37623764 if (data.GetByteSize () == H.p_filesz )
37633765 return data;
37643766 if (IsInMemory ()) {
0 commit comments