tools/android/elf_compression/elf_headers.py
def PatchData(self, data):
    """Patches the given data array to reflect all changes made to the header.

    This method doesn't completely rewrite the data, instead it patches
    inplace. Not only the ElfHeader is patched but all of its ProgramHeader
    as well.

    The important limitation is that this method doesn't take changes of sizes
    and offsets into account. As example, if new ProgramHeader is added, this
    method will override whatever data is located under its placement so the
    user has to move the headers to the end beforehand or the user mustn't
    change header's size.

    Args:
      data: bytearray. The data array to be patched.
    """
    elf_bytes = self.ToBytes()
    data[:len(elf_bytes)] = elf_bytes
    self._PatchProgramHeaders(data)
    self._PatchSectionHeaders(data)
Patches the given data array to reflect all changes made to the header.

    This method doesn't completely rewrite the data, instead it patches
    inplace. Not only the ElfHeader is patched but all of its ProgramHeader
    as well.

    The important limitation is that this method doesn't take changes of sizes
    and offsets into account. As example, if new ProgramHeader is added, this
    method will override whatever data is located under its placement so the
    user has to move the headers to the end beforehand or the user mustn't
    change header's size.

    Args:
      data: bytearray. The data array to be patched.
    
Patches the given data array to reflect all changes made to the header.
This method doesn't completely rewrite the data, instead it patches
inplace. Not only the ElfHeader is patched but all of its ProgramHeader
as well.

The important limitation is that this method doesn't take changes of sizes
and offsets into account. As example, if new ProgramHeader is added, this
method will override whatever data is located under its placement so the
user has to move the headers to the end beforehand or the user mustn't
change header's size.
Patches the given data array to reflect all changes made to the header . This method doesn ' t completely rewrite the data instead it patches inplace . Not only the ElfHeader is patched but all of its ProgramHeader as well . The important limitation is that this method doesn ' t take changes of sizes and offsets into account . As example if new ProgramHeader is added this method will override whatever data is located under its placement so the user has to move the headers to the end beforehand or the user mustn ' t change header ' s size .
def PatchData(self, data):
    elf_bytes = self.ToBytes()
    data[:len(elf_bytes)] = elf_bytes
    self._PatchProgramHeaders(data)
    self._PatchSectionHeaders(data)
def PatchData ( self , data ) : elf_bytes = self . ToBytes ( ) data [ : len ( elf_bytes ) ] = elf_bytes self . _PatchProgramHeaders ( data ) self . _PatchSectionHeaders ( data )
Patches the given data array to reflect all changes made to the header.
Patches the given data array to reflect all changes made to the header .
"""Patches the given data array to reflect all changes made to the header.

    This method doesn't completely rewrite the data, instead it patches
    inplace. Not only the ElfHeader is patched but all of its ProgramHeader
    as well.

    The important limitation is that this method doesn't take changes of sizes
    and offsets into account. As example, if new ProgramHeader is added, this
    method will override whatever data is located under its placement so the
    user has to move the headers to the end beforehand or the user mustn't
    change header's size.

    Args:
      data: bytearray. The data array to be patched.
    """
self
data
bytearray. The data array to be patched.
bytearray . The data array to be patched .