Lines Matching defs:relocations
14 void AddRelocation(ELF::Addr addr, std::vector<ELF::Rel>* relocations) {
18 relocations->push_back(relocation);
32 std::vector<ELF::Rel> relocations;
38 codec.Encode(relocations, &packed);
43 AddRelocation(0xf00d0000, &relocations);
46 codec.Encode(relocations, &packed);
51 AddRelocation(0xf00d0004, &relocations);
54 codec.Encode(relocations, &packed);
66 AddRelocation(0xf00d0008, &relocations);
68 // Add three more relocations, 8 byte deltas.
69 AddRelocation(0xf00d0010, &relocations);
70 AddRelocation(0xf00d0018, &relocations);
71 AddRelocation(0xf00d0020, &relocations);
74 codec.Encode(relocations, &packed);
81 // Run of two relocations, 4 byte deltas.
84 // Run of three relocations, 8 byte deltas.
91 std::vector<ELF::Rel> relocations;
94 codec.Decode(packed, &relocations);
96 EXPECT_EQ(0, relocations.size());
102 // Run of two relocations, 4 byte deltas.
105 // Run of three relocations, 8 byte deltas.
109 relocations.clear();
110 codec.Decode(packed, &relocations);
112 EXPECT_EQ(6, relocations.size());
114 EXPECT_TRUE(CheckRelocation(0xc0de0000, relocations[0]));
115 // Two relocations, 4 byte deltas.
116 EXPECT_TRUE(CheckRelocation(0xc0de0004, relocations[1]));
117 EXPECT_TRUE(CheckRelocation(0xc0de0008, relocations[2]));
118 // Three relocations, 8 byte deltas.
119 EXPECT_TRUE(CheckRelocation(0xc0de0010, relocations[3]));
120 EXPECT_TRUE(CheckRelocation(0xc0de0018, relocations[4]));
121 EXPECT_TRUE(CheckRelocation(0xc0de0020, relocations[5]));