This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to re-map one lib file of .text section to other sections

I want to map .test section of rts6740.lib to SDR section .what should I do in cmd file ? Below is my map file fragment and cmd file:

.text      0    00812f80    00005c80    
                  00812f80    00000680     rts6740.lib : divd.obj (.text:__divd)
                  00813600    00000580                 : _printfi.obj (.text:__getarg_diouxp)
                  00813b80    00000480                 : _printfi.obj (.text:__setfield)
                  00814000    00000440                 : _printfi.obj (.text:__printfi)
                  00814440    00000300                 : fputs.obj (.text:_fputs)
                  00814740    000002e0                 : _printfi.obj (.text:__pproc_fwp)
                  00814a20    000002c0                 : _printfi.obj (.text:__pproc_fge)
                  00814ce0    000002a0                 : _printfi.obj (.text:_ecvt)
                  00814f80    000002a0                 : _printfi.obj (.text:_fcvt)
                  00815220    00000280                 : memory.obj (.text:_free)
                  008154a0    00000260                 : imath64.obj (.text:__divull)
                  00815700    00000260                 : _printfi.obj (.text:__pconv_e)
                  00815960    00000220                 : _printfi.obj (.text:__pproc_diouxp)
                  00815b80    00000220                 : _printfi.obj (.text:__pproc_str)
                  00815da0    00000200                 : _printfi.obj (.text:__pconv_g)
                  00815fa0    000001c0                 : _printfi.obj (.text:__mcpy)
                  00816160    000001a0                 : imath40.obj (.text:__divul)
                  00816300    000001a0                 : setvbuf.obj (.text:_setvbuf)
                  008164a0    00000180                 : trgdrv.obj (.text:_HOSTrename)
                  00816620    00000180                 : frcmpyd_div.obj (.text:__frcmpyd_div)
                  008167a0    00000180                 : memory.obj (.text:_malloc)
                  00816920    00000140                 : _printfi.obj (.text:__pproc_fflags)
                  00816a60    00000140                 : fputc.obj (.text:_fputc)
                  00816ba0    00000140                 : lowlev.obj (.text:_getdevice)
                  00816ce0    00000120                 : fclose.obj (.text:_fclose)
                  00816e00    00000100                 : trgdrv.obj (.text:_HOSTlseek)
                  00816f00    00000100                 : autoinit.obj (.text:__auto_init)
                  00817000    00000100                 : _printfi.obj (.text:__ltostr)
                  00817100    00000100                 : _io_perm.obj (.text:__wrt_ok)
                  00817200    000000e0                 : trgdrv.obj (.text:_HOSTopen)
                  008172e0    000000e0                 : atoi.obj (.text:_atoi)
                  008173c0    000000e0                 : lowlev.obj (.text:_close)
                  008174a0    000000e0                 : exit.obj (.text:_exit)
                  00817580    000000e0                 : memset.obj (.text:_memset)
                  00817660    000000c0                 : trgdrv.obj (.text:_HOSTread)
                  00817720    000000c0                 : trgdrv.obj (.text:_HOSTunlink)
                  008177e0    000000c0                 : trgdrv.obj (.text:_HOSTwrite)
                  008178a0    000000c0                 : fopen.obj (.text:__cleanup)
                  00817960    000000c0                 : _printfi.obj (.text:__div)
                  00817a20    000000c0                 : divu.obj (.text:__divu)
                  00817ae0    000000c0                 : fflush.obj (.text:__doflush)
                  00817ba0    000000c0                 : fseek.obj (.text:_fseek)
                  00817c60    000000c0                 : lowlev.obj (.text:_lseek)
                  00817d20    000000c0                 : ltoa.obj (.text:_ltoa)
                  00817de0    000000c0                 : lowlev.obj (.text:_write)
                  00817ea0    000000a0                 : trgdrv.obj (.text:_HOSTclose)
                  00817f40    000000a0                 : imath40.obj (.text:__divli)
                  00817fe0    000000a0                 : _printfi.obj (.text:__ecpy)
                  00818080    000000a0                 : _printfi.obj (.text:__fcpy)
                  00818120    000000a0                 : fixdli.obj (.text:__fixdli)
                  008181c0    000000a0                 : _printfi.obj (.text:__pconv_f)
                  00818260    000000a0                 : cpy_tbl.obj (.text:_copy_in)
                  00818300    000000a0                 : lowlev.obj (.text:_finddevice)
                  008183a0    000000a0                 : memcpy64.obj (.text:_memcpy)
                  00818440    000000a0                 : memory.obj (.text:_minsert)
                  008184e0    000000a0                 : memory.obj (.text:_mremove)
                  00818580    00000080                 : fltlid.obj (.text:__fltlid)
                  00818600    00000080                 : llshift.obj (.text:__llshl)
                  00818680    00000080                 : boot.obj (.text:_c_int00)
                  00818700    00000080                 : printf.obj (.text:_printf)
                  00818780    00000080                 : trgmsg.obj (.text:_readmsg)
                  00818800    00000080                 : lowlev.obj (.text:_unlink)
                  00818880    00000060                 : imath64.obj (.text:__subcull)
                  008188e0    00000060                 : memccpy.obj (.text:_memccpy)
                  00818940    00000060                 : trgmsg.obj (.text:_writemsg)
                  008189a0    00000040                 : isinf.obj (.text:___isinf)
                  008189e0    00000040                 : _printfi.obj (.text:___isnan)
                  00818a20    00000040                 : divd.obj (.text:___isnan)
                  00818a60    00000040                 : args_main.obj (.text:__args_main)
                  00818aa0    00000040                 : llshift.obj (.text:__llshru)
                  00818ae0    00000040                 : imath40.obj (.text:__remli)
                  00818b20    00000020                 : negll.obj (.text:__negll)
                  00818b40    00000020                 : _lock.obj (.text:__nop)
                  00818b60    00000020                 : printf.obj (.text:__outc)
                  00818b80    00000020                 : printf.obj (.text:__outs)
                  00818ba0    00000020                 : exit.obj (.text:_abort)
                  00818bc0    00000020                 : remove.obj (.text:_remove)
                  00818be0    00000020     main.obj (.text)

 

 

-stack 0x4000
-heap  0x400

MEMORY
{
 L1P  : o = 0x00E00000,   l = 0x00007FFF//32KB  L1PRAM/cache
 L1D  : o = 0x00F00000,   l = 0x00007FFF//32KB  L1DRAM/cache
 L2   : o = 0x00800000,   l = 0x0003FFFF//256KB L2RAM
 OCR  : o = 0x80000000,   l = 0x001FFFFF//128KB On-chip RAM
 SDR  : o = 0x40000000,   l = 0x1FFFFFFF//512MB EMIFASDRAMdata(CS0)
}

SECTIONS

 .const    > L2    
   .text     >  L2
 .far      > L2
 .fardata  > L2
 .neardata > L2
 .stack    > L2
 .switch   > L2
 .sysmem   > L2
 .cinit > L2
 .stack > L2
 .cio   > L2
 .bss   > L2
}