Home | History | Annotate | Download | only in src

Lines Matching defs:relocations

30 // android packed relocations section.
185 // Notes of the dynamic relocations, packed relocations, and .dynamic
246 // Loading failed if we could not identify the relocations type.
248 LOG(ERROR) << "No relocations sections found";
252 LOG(ERROR) << "Multiple relocations sections with different types found, "
547 // DT_RELSZ or DT_RELASZ indicate the overall size of relocations.
675 // Remove relative entries from dynamic relocations and write as packed
676 // data into android packed relocations.
685 // Retrieve the current dynamic relocations section data.
688 std::vector<typename ELF::Rela> relocations;
691 // Convert data to a vector of relocations.
694 data->d_size / sizeof(typename ELF::Rel), &relocations);
695 VLOG(1) << "Relocations : REL";
697 // Convert data to a vector of relocations with addends.
699 relocations = std::vector<typename ELF::Rela>(
701 relocations_base + data->d_size / sizeof(relocations[0]));
703 VLOG(1) << "Relocations : RELA";
708 return PackTypedRelocations(&relocations);
713 bool ElfFile<ELF>::PackTypedRelocations(std::vector<typename ELF::Rela>* relocations) {
721 // If no relocations then we have nothing packable. Perhaps
723 if (relocations->empty()) {
724 LOG(ERROR) << "No relocations found";
730 const size_t initial_bytes = relocations->size() * rel_size;
736 // Pack relocations: dry run to estimate memory savings.
737 packer.PackRelocations(*relocations, &packed);
742 VLOG(1) << "Too few relocations to pack";
747 // dynamic relocations. We have to adjust relocation addresses to
759 VLOG(1) << "Too few relocations to pack after alignment";
764 VLOG(1) << "Packing relocations saves no space";
781 CHECK(unpacked.size() == relocations->size());
783 &relocations->at(0),
786 // Rewrite the current dynamic relocations section with packed one then shrink it to size.
795 // relocations.
823 // Find packed relative relocations in the packed android relocations
824 // section, unpack them, and rewrite the dynamic relocations section to
835 // Retrieve the current packed android relocations section data.
850 LOG(INFO) << "Relocations : " << (relocations_type_ == REL ? "REL" : "RELA");
852 LOG(ERROR) << "Packed relocations not found (not packed?)";
862 // Unpack the data to re-materialize the relative relocations.
874 // Retrieve the current dynamic relocations section data.
877 LOG(INFO) << "Relocations : " << unpacked_relocations.size() << " entries";
880 // relocations section as we hold as unpacked relative relocations, then
885 // Unless padded, pre-apply relative relocations to account for the
893 // Rewrite the current dynamic relocations section with unpacked version of
894 // relocations.
910 // Rewrite .dynamic to remove two tags describing packed android relocations.