diff --git a/tools/relocation_packer/src/elf_file.cc b/tools/relocation_packer/src/elf_file.cc index fb74233d2..c8ddde6ca 100644 --- a/tools/relocation_packer/src/elf_file.cc +++ b/tools/relocation_packer/src/elf_file.cc @@ -618,8 +618,8 @@ bool ElfFile::PackTypedRelocations(std::vector* relocat typedef typename ELF::Rela Rela; if (has_android_relocations_) { - LOG(ERROR) << "Relocation table is already packed"; - return false; + LOG(INFO) << "Relocation table is already packed"; + return true; } // If no relocations then we have nothing packable. Perhaps diff --git a/tools/relocation_packer/src/elf_file_unittest.cc b/tools/relocation_packer/src/elf_file_unittest.cc index 5271eef87..32f79683f 100644 --- a/tools/relocation_packer/src/elf_file_unittest.cc +++ b/tools/relocation_packer/src/elf_file_unittest.cc @@ -103,8 +103,8 @@ template static void ProcessUnpack(FILE* relocs_so, FILE* packed_relocs_so) { relocation_packer::ElfFile elf_file(fileno(packed_relocs_so)); - // Ensure packing fails (already packed). - EXPECT_FALSE(elf_file.PackRelocations()); + // Ensure packing already packed elf-file does not fail the build. + EXPECT_TRUE(elf_file.PackRelocations()); // Unpack golden relocations, and check files are now identical. EXPECT_TRUE(elf_file.UnpackRelocations());