def MoveSegm(ea, to, flags):
"""
Move a segment to a new address
This function moves all information to the new address
It fixes up address sensitive information in the kernel
The total effect is equal to reloading the segment to the target address
@param ea: any address within the segment to move
@param to: new segment start address
@param flags: combination MFS_... constants
@returns: MOVE_SEGM_... error code
"""
seg = idaapi.getseg(ea)
if not seg:
return MOVE_SEGM_PARAM
return idaapi.move_segm(seg, to, flags)
评论列表
文章目录