The Cosmic compiler uses a *.prm file with a special syntax for the linker. This compiler uses a linker parameter file with a *.prm file extension. The syntax is not the same format, but most things are straightforward to port. For this compiler, you must declare the RAM or ROM areas in the SEGMENTS ... END block and place the sections into the SEGMENTS in the PLACEMENT...END block.
Make sure that you use all segments declared in your application (through #pragma DATA_SEG, #pragma CONST_SEG, and #pragma CODE_SEG) in the PLACEMENT block of the Linker prm file.
Check the linker warnings or errors carefully. They may indicate needed adjustments or corrections in your application. For example, you may have allocated the vectors in the linker *.prm file (using VECTOR or ADDRESS syntax) and also allocated them in the application itself (with the #pragma CONST_SEG or with the @address syntax). Allocating objects twice is an error, so allocate these objects one way or the other, but not both.
Consult the map file produced by the linker to ensure that everything is allocated correctly.
Remember that the linker is a smart linker. This means the linker does not link unused or unreferenced objects to the application (the Cosmic linker may link unused or unreferenced objects). The application may need to link to these objects for some reason even though the linker does not. To link objects to the application even when unused, use the ENTRIES ... END block in the Linker *.prm file:
ENTRIES /* the following objects or variables need to be linked even if not referenced by the application */
_vectab ApplHeader FlashEraseTable
END