Latest available version: IDA and decompilers v8.2.230124sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
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
     ea    - any address within the segment to move
     to    - new segment start address
     flags - combination MFS_... constants
returns: MOVE_SEGM_... error code

long move_segm(long ea, long to, long flags);

#define MSF_SILENT 0x0001 // don't display a "please wait" box on the screen #define MSF_NOFIX 0x0002 // don't call the loader to fix relocations #define MSF_LDKEEP 0x0004 // keep the loader in the memory (optimization) #define MSF_FIXONCE 0x0008 // valid for rebase_program(): call loader only once #define MSF_NETDELTA 0x0010 // change inf.netdelta if possible #define MSF_PRIORITY 0x0020 // loader segments will overwrite any existing debugger segments when moved. #define MSF_NETNODES 0x0080 // move netnodes instead of changing inf.netdelta (this is slower)

#define MOVE_SEGM_OK 0 // all ok #define MOVE_SEGM_PARAM -1 // The specified segment does not exist #define MOVE_SEGM_ROOM -2 // Not enough free room at the target address #define MOVE_SEGM_IDP -3 // IDP module forbids moving the segment #define MOVE_SEGM_CHUNK -4 // Too many chunks are defined, can't move #define MOVE_SEGM_LOADER -5 // The segment has been moved but the loader complained #define MOVE_SEGM_ODD -6 // Can't move segments by an odd number of bytes #define MOVE_SEGM_ORPHAN -7 // Orphan bytes hinder segment movement

Index | Previous topic | Next topic