am 2bb93482: Merge "Exit normally when relocations are already packed."
* commit '2bb93482a7793640205ade2f7316db5b3f5cac19': Exit normally when relocations are already packed.
This commit is contained in:
commit
71abd9cc2f
@ -618,8 +618,8 @@ bool ElfFile<ELF>::PackTypedRelocations(std::vector<typename ELF::Rela>* relocat
|
|||||||
typedef typename ELF::Rela Rela;
|
typedef typename ELF::Rela Rela;
|
||||||
|
|
||||||
if (has_android_relocations_) {
|
if (has_android_relocations_) {
|
||||||
LOG(ERROR) << "Relocation table is already packed";
|
LOG(INFO) << "Relocation table is already packed";
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no relocations then we have nothing packable. Perhaps
|
// If no relocations then we have nothing packable. Perhaps
|
||||||
|
@ -103,8 +103,8 @@ template <typename ELF>
|
|||||||
static void ProcessUnpack(FILE* relocs_so, FILE* packed_relocs_so) {
|
static void ProcessUnpack(FILE* relocs_so, FILE* packed_relocs_so) {
|
||||||
relocation_packer::ElfFile<ELF> elf_file(fileno(packed_relocs_so));
|
relocation_packer::ElfFile<ELF> elf_file(fileno(packed_relocs_so));
|
||||||
|
|
||||||
// Ensure packing fails (already packed).
|
// Ensure packing already packed elf-file does not fail the build.
|
||||||
EXPECT_FALSE(elf_file.PackRelocations());
|
EXPECT_TRUE(elf_file.PackRelocations());
|
||||||
|
|
||||||
// Unpack golden relocations, and check files are now identical.
|
// Unpack golden relocations, and check files are now identical.
|
||||||
EXPECT_TRUE(elf_file.UnpackRelocations());
|
EXPECT_TRUE(elf_file.UnpackRelocations());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user