diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2015-04-24 12:39:14 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2015-04-24 12:39:14 -0700 |
commit | b0b9338ff8655394311aeef77e2b795e6d8a453d (patch) | |
tree | 471604b6ffae83c31bd73a856f560654f3332b7f /tools | |
parent | 6c63ee41ac5a246fb46c51753cd4d50ccae0dd8f (diff) | |
download | bionic-b0b9338ff8655394311aeef77e2b795e6d8a453d.zip bionic-b0b9338ff8655394311aeef77e2b795e6d8a453d.tar.gz bionic-b0b9338ff8655394311aeef77e2b795e6d8a453d.tar.bz2 |
Exit normally when relocations are already packed.
Bug: http://b/18051137
Change-Id: Idfffac5fe965e3cdeabe6d3b2dcd8c275c6ae5df
Diffstat (limited to 'tools')
-rw-r--r-- | tools/relocation_packer/src/elf_file.cc | 4 | ||||
-rw-r--r-- | tools/relocation_packer/src/elf_file_unittest.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/relocation_packer/src/elf_file.cc b/tools/relocation_packer/src/elf_file.cc index fb74233..c8ddde6 100644 --- a/tools/relocation_packer/src/elf_file.cc +++ b/tools/relocation_packer/src/elf_file.cc @@ -618,8 +618,8 @@ bool ElfFile<ELF>::PackTypedRelocations(std::vector<typename ELF::Rela>* 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 5271eef..32f7968 100644 --- a/tools/relocation_packer/src/elf_file_unittest.cc +++ b/tools/relocation_packer/src/elf_file_unittest.cc @@ -103,8 +103,8 @@ template <typename ELF> static void ProcessUnpack(FILE* relocs_so, FILE* packed_relocs_so) { relocation_packer::ElfFile<ELF> 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()); |