def base_rel_pointer(node=None, parent=None, attr_index=None, rawdata=None,
    new_value=None, **kwargs):
    """
    Pointer getter/setter for getting and setting pointers
    relative to the base_address in the xbe_image_header.
    """
    path = kwargs.get('p_path')
    if parent is None:
        raise KeyError('Cannot get or set base address relative ' +
            'pointers without the parent.')
    if path == '':
        raise KeyError('Cannot get or set base address relative ' +
            'pointers without a path to the pointer.')
    this_tag = parent.get_root()
    base_addr = this_tag.data.xbe_image_header.base_address
    if new_value is None:
        return parent.get_neighbor(path) - base_addr
    return parent.set_neighbor(path, new_value + base_addr)
