Lines Matching defs:relocations
13 void AddRelocation(Elf32_Addr addr, std::vector<Elf32_Rel>* relocations) {
15 relocations->push_back(relocation);
27 std::vector<Elf32_Rel> relocations;
33 codec.Encode(relocations, &packed);
38 AddRelocation(0xf00d0000, &relocations);
41 codec.Encode(relocations, &packed);
46 AddRelocation(0xf00d0004, &relocations);
49 codec.Encode(relocations, &packed);
61 AddRelocation(0xf00d0008, &relocations);
63 // Add three more relocations, 8 byte deltas.
64 AddRelocation(0xf00d0010, &relocations);
65 AddRelocation(0xf00d0018, &relocations);
66 AddRelocation(0xf00d0020, &relocations);
69 codec.Encode(relocations, &packed);
76 // Run of two relocations, 4 byte deltas.
79 // Run of three relocations, 8 byte deltas.
86 std::vector<Elf32_Rel> relocations;
89 codec.Decode(packed, &relocations);
91 EXPECT_EQ(0u, relocations.size());
97 // Run of two relocations, 4 byte deltas.
100 // Run of three relocations, 8 byte deltas.
104 relocations.clear();
105 codec.Decode(packed, &relocations);
107 EXPECT_EQ(6u, relocations.size());
109 EXPECT_TRUE(CheckRelocation(0xc0de0000, relocations[0]));
110 // Two relocations, 4 byte deltas.
111 EXPECT_TRUE(CheckRelocation(0xc0de0004, relocations[1]));
112 EXPECT_TRUE(CheckRelocation(0xc0de0008, relocations[2]));
113 // Three relocations, 8 byte deltas.
114 EXPECT_TRUE(CheckRelocation(0xc0de0010, relocations[3]));
115 EXPECT_TRUE(CheckRelocation(0xc0de0018, relocations[4]));
116 EXPECT_TRUE(CheckRelocation(0xc0de0020, relocations[5]));