'Resolve a dependency in a binary. Uses the "externs object" (project.loader.extern_object) to
allocate an address for a new symbol in the binary, and then tells the loader to re-perform
the relocation process, taking into account the new symbol.
:param symbol_name: The name of the dependency to resolve.
:param obj:         The thing with which to satisfy the dependency.
:param kwargs:      If you provide a SimProcedure for the hook, these are the keyword
arguments that will be passed to the procedure\'s `run` method
eventually.
:returns:           The address of the new symbol.
:rtype:             int'

def hook_symbol(self, symbol_name, obj, kwargs=None):

    if (type(obj) in (int, long)):
        l.info('Instructing    the    loader    to    re-point    symbol    %s    at    address    %#x', symbol_name, obj)
        self.loader.provide_symbol(self.loader.extern_object, symbol_name, AT.from_mva(obj, self.loader.extern_object).to_rva())
        return obj
    sym = self.loader.find_symbol(symbol_name)
    if (sym is None):
        l.error('Could    not    find    symbol    %s', symbol_name)
        return None
    (hook_addr, _) = self._simos.prepare_function_symbol(symbol_name, basic_addr=sym.rebased_addr)
    if self.is_hooked(hook_addr):
        l.warning('Re-hooking    symbol    %s', symbol_name)
        self.unhook(hook_addr)
    self.hook(hook_addr, obj, kwargs=kwargs)
    return hook_addr
