• Home
  • Raw
  • Download

Lines Matching refs:elf

153   std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_));  in SinglePtLoad()  local
170 ASSERT_TRUE(elf->Init(&load_bias)); in SinglePtLoad()
173 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in SinglePtLoad()
191 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in MultipleExecutablePtLoads() local
226 ASSERT_TRUE(elf->Init(&load_bias)); in MultipleExecutablePtLoads()
229 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in MultipleExecutablePtLoads()
258 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr() local
293 ASSERT_TRUE(elf->Init(&load_bias)); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr()
296 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr()
327 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in NonExecutablePtLoads() local
362 ASSERT_TRUE(elf->Init(&load_bias)); in NonExecutablePtLoads()
365 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in NonExecutablePtLoads()
384 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in ManyPhdrs() local
434 ASSERT_TRUE(elf->Init(&load_bias)); in ManyPhdrs()
437 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in ManyPhdrs()
552 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in Soname() local
555 ASSERT_TRUE(elf->Init(&load_bias)); in Soname()
558 ASSERT_EQ("fake_soname.so", elf->GetSoname()); in Soname()
573 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in SonameAfterDtNull() local
576 ASSERT_TRUE(elf->Init(&load_bias)); in SonameAfterDtNull()
579 ASSERT_EQ("", elf->GetSoname()); in SonameAfterDtNull()
594 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in SonameSize() local
597 ASSERT_TRUE(elf->Init(&load_bias)); in SonameSize()
600 ASSERT_EQ("", elf->GetSoname()); in SonameSize()
617 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_)); in SonameMissingMap() local
620 ASSERT_TRUE(elf->Init(&load_bias)); in SonameMissingMap()
623 ASSERT_EQ("", elf->GetSoname()); in SonameMissingMap()
638 ElfType elf(&memory_); in InitHeadersEhFrameTest() local
640 elf.FakeSetEhFrameOffset(0x10000); in InitHeadersEhFrameTest()
641 elf.FakeSetEhFrameSize(0); in InitHeadersEhFrameTest()
642 elf.FakeSetDebugFrameOffset(0); in InitHeadersEhFrameTest()
643 elf.FakeSetDebugFrameSize(0); in InitHeadersEhFrameTest()
650 elf.InitHeaders(0); in InitHeadersEhFrameTest()
652 EXPECT_FALSE(elf.eh_frame() == nullptr); in InitHeadersEhFrameTest()
653 EXPECT_TRUE(elf.debug_frame() == nullptr); in InitHeadersEhFrameTest()
666 ElfType elf(&memory_); in InitHeadersDebugFrame() local
668 elf.FakeSetEhFrameOffset(0); in InitHeadersDebugFrame()
669 elf.FakeSetEhFrameSize(0); in InitHeadersDebugFrame()
670 elf.FakeSetDebugFrameOffset(0x5000); in InitHeadersDebugFrame()
671 elf.FakeSetDebugFrameSize(0x200); in InitHeadersDebugFrame()
682 elf.InitHeaders(0); in InitHeadersDebugFrame()
684 EXPECT_TRUE(elf.eh_frame() == nullptr); in InitHeadersDebugFrame()
685 EXPECT_FALSE(elf.debug_frame() == nullptr); in InitHeadersDebugFrame()
698 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in InitProgramHeadersMalformed() local
707 ASSERT_TRUE(elf->Init(&load_bias)); in InitProgramHeadersMalformed()
721 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in InitSectionHeadersMalformed() local
730 ASSERT_TRUE(elf->Init(&load_bias)); in InitSectionHeadersMalformed()
744 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in InitSectionHeadersMalformedSymData() local
796 ASSERT_TRUE(elf->Init(&load_bias)); in InitSectionHeadersMalformedSymData()
798 EXPECT_EQ(0U, elf->debug_frame_offset()); in InitSectionHeadersMalformedSymData()
799 EXPECT_EQ(0U, elf->debug_frame_size()); in InitSectionHeadersMalformedSymData()
800 EXPECT_EQ(0U, elf->gnu_debugdata_offset()); in InitSectionHeadersMalformedSymData()
801 EXPECT_EQ(0U, elf->gnu_debugdata_size()); in InitSectionHeadersMalformedSymData()
805 ASSERT_FALSE(elf->GetFunctionName(0x90010, &name, &name_offset)); in InitSectionHeadersMalformedSymData()
818 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in InitSectionHeaders() local
869 ASSERT_TRUE(elf->Init(&load_bias)); in InitSectionHeaders()
871 EXPECT_EQ(0U, elf->debug_frame_offset()); in InitSectionHeaders()
872 EXPECT_EQ(0U, elf->debug_frame_size()); in InitSectionHeaders()
873 EXPECT_EQ(0U, elf->gnu_debugdata_offset()); in InitSectionHeaders()
874 EXPECT_EQ(0U, elf->gnu_debugdata_size()); in InitSectionHeaders()
879 ASSERT_TRUE(elf->GetFunctionName(0x90010, &name, &name_offset)); in InitSectionHeaders()
882 ASSERT_TRUE(elf->GetFunctionName(0xd0020, &name, &name_offset)); in InitSectionHeaders()
905 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in InitSectionHeadersOffsets() local
986 ASSERT_TRUE(elf->Init(&load_bias)); in InitSectionHeadersOffsets()
988 EXPECT_EQ(0x6000U, elf->debug_frame_offset()); in InitSectionHeadersOffsets()
989 EXPECT_EQ(0x500U, elf->debug_frame_size()); in InitSectionHeadersOffsets()
990 EXPECT_EQ(0x5000U, elf->gnu_debugdata_offset()); in InitSectionHeadersOffsets()
991 EXPECT_EQ(0x800U, elf->gnu_debugdata_size()); in InitSectionHeadersOffsets()
992 EXPECT_EQ(0x7000U, elf->eh_frame_offset()); in InitSectionHeadersOffsets()
993 EXPECT_EQ(0x800U, elf->eh_frame_size()); in InitSectionHeadersOffsets()
994 EXPECT_EQ(0xa000U, elf->eh_frame_hdr_offset()); in InitSectionHeadersOffsets()
995 EXPECT_EQ(0xf00U, elf->eh_frame_hdr_size()); in InitSectionHeadersOffsets()
996 EXPECT_EQ(0xb000U, elf->gnu_build_id_offset()); in InitSectionHeadersOffsets()
997 EXPECT_EQ(0xf00U, elf->gnu_build_id_size()); in InitSectionHeadersOffsets()
1009 std::unique_ptr<ElfInterface> elf(new ElfInterface32(&memory_)); in TEST_F() local
1026 ASSERT_TRUE(elf->Init(&load_bias)); in TEST_F()
1028 EXPECT_TRUE(elf->IsValidPc(0)); in TEST_F()
1029 EXPECT_TRUE(elf->IsValidPc(0x5000)); in TEST_F()
1030 EXPECT_TRUE(elf->IsValidPc(0xffff)); in TEST_F()
1031 EXPECT_FALSE(elf->IsValidPc(0x10000)); in TEST_F()
1035 std::unique_ptr<ElfInterface> elf(new ElfInterface32(&memory_)); in TEST_F() local
1052 ASSERT_TRUE(elf->Init(&load_bias)); in TEST_F()
1054 EXPECT_FALSE(elf->IsValidPc(0)); in TEST_F()
1055 EXPECT_FALSE(elf->IsValidPc(0x1000)); in TEST_F()
1056 EXPECT_FALSE(elf->IsValidPc(0x1fff)); in TEST_F()
1057 EXPECT_TRUE(elf->IsValidPc(0x2000)); in TEST_F()
1058 EXPECT_TRUE(elf->IsValidPc(0x5000)); in TEST_F()
1059 EXPECT_TRUE(elf->IsValidPc(0x11fff)); in TEST_F()
1060 EXPECT_FALSE(elf->IsValidPc(0x12000)); in TEST_F()
1064 std::unique_ptr<ElfInterface> elf(new ElfInterface32(&memory_)); in TEST_F() local
1109 ASSERT_TRUE(elf->Init(&load_bias)); in TEST_F()
1110 elf->InitHeaders(0); in TEST_F()
1112 EXPECT_FALSE(elf->IsValidPc(0)); in TEST_F()
1113 EXPECT_FALSE(elf->IsValidPc(0x20ff)); in TEST_F()
1114 EXPECT_TRUE(elf->IsValidPc(0x2100)); in TEST_F()
1115 EXPECT_TRUE(elf->IsValidPc(0x2200)); in TEST_F()
1116 EXPECT_TRUE(elf->IsValidPc(0x22ff)); in TEST_F()
1117 EXPECT_FALSE(elf->IsValidPc(0x2300)); in TEST_F()
1121 std::unique_ptr<ElfInterface> elf(new ElfInterface32(&memory_)); in TEST_F() local
1166 ASSERT_TRUE(elf->Init(&load_bias)); in TEST_F()
1167 elf->InitHeaders(0); in TEST_F()
1169 EXPECT_FALSE(elf->IsValidPc(0)); in TEST_F()
1170 EXPECT_FALSE(elf->IsValidPc(0x27ff)); in TEST_F()
1171 EXPECT_TRUE(elf->IsValidPc(0x2800)); in TEST_F()
1172 EXPECT_TRUE(elf->IsValidPc(0x2900)); in TEST_F()
1173 EXPECT_TRUE(elf->IsValidPc(0x29ff)); in TEST_F()
1174 EXPECT_FALSE(elf->IsValidPc(0x2a00)); in TEST_F()
1179 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in BuildID() local
1227 ASSERT_TRUE(elf->Init(&load_bias)); in BuildID()
1228 ASSERT_EQ("BUILDID", elf->GetBuildID()); in BuildID()
1233 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in BuildIDTwoNotes() local
1292 ASSERT_TRUE(elf->Init(&load_bias)); in BuildIDTwoNotes()
1293 ASSERT_EQ("BUILDID", elf->GetBuildID()); in BuildIDTwoNotes()
1298 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in BuildIDSectionTooSmallForName() local
1346 ASSERT_TRUE(elf->Init(&load_bias)); in BuildIDSectionTooSmallForName()
1347 ASSERT_EQ("", elf->GetBuildID()); in BuildIDSectionTooSmallForName()
1352 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in BuildIDSectionTooSmallForDesc() local
1400 ASSERT_TRUE(elf->Init(&load_bias)); in BuildIDSectionTooSmallForDesc()
1401 ASSERT_EQ("", elf->GetBuildID()); in BuildIDSectionTooSmallForDesc()
1406 std::unique_ptr<ElfInterfaceType> elf(new ElfInterfaceType(&memory_)); in BuildIDSectionTooSmallForHeader() local
1454 ASSERT_TRUE(elf->Init(&load_bias)); in BuildIDSectionTooSmallForHeader()
1455 ASSERT_EQ("", elf->GetBuildID()); in BuildIDSectionTooSmallForHeader()