Lines Matching defs:relocations

14 void AddRelocation(ELF::Addr addr, std::vector<ELF::Rel>* relocations) {
18 relocations->push_back(relocation);
29 std::vector<ELF::Rela>* relocations) {
34 relocations->push_back(relocation);
51 std::vector<ELF::Rel> relocations;
57 AddRelocation(0xd1ce0000, &relocations);
58 // Two more relocations, 4 byte deltas.
59 AddRelocation(0xd1ce0004, &relocations);
60 AddRelocation(0xd1ce0008, &relocations);
61 // Three more relocations, 8 byte deltas.
62 AddRelocation(0xd1ce0010, &relocations);
63 AddRelocation(0xd1ce0018, &relocations);
64 AddRelocation(0xd1ce0020, &relocations);
67 packer.PackRelativeRelocations(relocations, &packed);
83 // Run of two relocations, 4 byte deltas.
86 // Run of three relocations, 8 byte deltas.
96 std::vector<ELF::Rel> relocations;
113 // Run of two relocations, 4 byte deltas.
116 // Run of three relocations, 8 byte deltas.
123 relocations.clear();
124 packer.UnpackRelativeRelocations(packed, &relocations);
126 EXPECT_EQ(6, relocations.size());
128 EXPECT_TRUE(CheckRelocation(0xd1ce0000, relocations[0]));
129 // Two relocations, 4 byte deltas.
130 EXPECT_TRUE(CheckRelocation(0xd1ce0004, relocations[1]));
131 EXPECT_TRUE(CheckRelocation(0xd1ce0008, relocations[2]));
132 // Three relocations, 8 byte deltas.
133 EXPECT_TRUE(CheckRelocation(0xd1ce0010, relocations[3]));
134 EXPECT_TRUE(CheckRelocation(0xd1ce0018, relocations[4]));
135 EXPECT_TRUE(CheckRelocation(0xd1ce0020, relocations[5]));
139 std::vector<ELF::Rela> relocations;
145 AddRelocation(0xd1ce0000, 10000, &relocations);
146 // Two more relocations, 4 byte offset deltas, 12 byte addend deltas.
147 AddRelocation(0xd1ce0004, 10012, &relocations);
148 AddRelocation(0xd1ce0008, 10024, &relocations);
149 // Three more relocations, 8 byte deltas, -24 byte addend deltas.
150 AddRelocation(0xd1ce0010, 10000, &relocations);
151 AddRelocation(0xd1ce0018, 9976, &relocations);
152 AddRelocation(0xd1ce0020, 9952, &relocations);
155 packer.PackRelativeRelocations(relocations, &packed);
196 std::vector<ELF::Rela> relocations;
235 relocations.clear();
236 packer.UnpackRelativeRelocations(packed, &relocations);
238 EXPECT_EQ(6, relocations.size());
240 EXPECT_TRUE(CheckRelocation(0xd1ce0000, 10000, relocations[0]));
241 // Two more relocations, 4 byte offset deltas, 12 byte addend deltas.
242 EXPECT_TRUE(CheckRelocation(0xd1ce0004, 10012, relocations[1]));
243 EXPECT_TRUE(CheckRelocation(0xd1ce0008, 10024, relocations[2]));
244 // Three more relocations, 8 byte offset deltas, -24 byte addend deltas.
245 EXPECT_TRUE(CheckRelocation(0xd1ce0010, 10000, relocations[3]));
246 EXPECT_TRUE(CheckRelocation(0xd1ce0018, 9976, relocations[4]));
247 EXPECT_TRUE(CheckRelocation(0xd1ce0020, 9952, relocations[5]));