The following psects reside in program memory.
checksum
-mchecksum
option. See Checksum Option for
more information. The checksum value is added after the linker has executed so you
will not see the contents of this psect in the assembly list file, nor specific
information in the map file. Do not change the default linker options relating to
this psect. cinit
config
const
const
and string literals which are not modifiable. Used when the
total amount of const
data in a program exceeds 64k. This psect can
be linked anywhere within a program memory page, provided it does not interfere with
the requirements of other psects.eeprom
(PIC18: eeprom_data
)end_init
main()
function.idata
idloc
init
cinit
define the runtime startup code. If no
interrupt code is defined, the Reset vector code can “fall through” into this psect.
It is recommended that the linker options for this psect are not changed.intcode
and intcodelo
intentry
intcode
psects.
This psect must be linked at the
interrupt vector. Do not change the default linker options relating to this psect.
See the -mcodeoffset
option Codeoffset Option if
you want to move code when using a bootloader.ivt0xn
n
for devices that use interrupt vector tables or that
are operating in legacy mode, see Writing an Interrupt Service Routine.jmp_tab
maintext
main()
function. The code for main()
is segregated as it contains the
program entry point. Do not change the default linker options relating to this psect
as the runtime startup code can “fall through” into this psect.mediumconst
const
and string literals. Used when the total amount of
const
data in a program exceeds 255 bytes, but is less than 64k.
This psect can be linked anywhere in the lower 64k of program memory, provided it
does not interfere with the requirements of other psects. For PIC18 devices, the
location of the psect must be above the highest RAM address.powerup
reset_vec
-mcodeoffset
option Codeoffset Option, if
you want to move code when using a bootloader.reset_wrap
smallconst
const
and string literals. Used when the total amount of const
data in a
program is less than 255 bytes.
This psect can be linked anywhere in the program
memory, provided it does not cross a 0x100 boundary and it does not interfere with
the requirements of other psects. For PIC18 devices, the location of the psect must
be above the highest RAM address.strings
const
objects.
It also includes
all unnamed string literals.
This psect can be linked anywhere in the program
memory, provided it does not cross a 0x100 boundary or interfere with the
requirements of other psects.stringtextn
stringtextn
psects (where
n
is a decimal number) are used for const
objects when compiling for Enhanced Mid-range devices. These psects can be linked
anywhere in the program memory, provided they do not interfere with the requirements
of other psects.textn
n
is a decimal number)
contain all other executable code that does not require a special link location.
These psects can be linked anywhere within any program memory page, and provided they
do not interfere with the requirements of other psects. Note that the compiler
imposes pseudo page boundaries on some PIC18 devices to work around published errata.
Check the default CODE
linker class for the presence of pages, and
their size, in the executable memory.temp
xxx_text
xxx
will be the assembly symbol associated with
the function. For example if the function rv()
is made absolute,
code associated with it will appear in the psect called _rv_text
.
As these psects are already placed at the address indicated in the C source code, the
linker options that position them should not be changed.xxx_const
const
objects that has been made
absolute; i.e., placed at an address. xxx
will be the
assembly symbol associated with the object. For example, if the array
nba
is made absolute, values stored in this array will appear in
the psect called _nba_const
. As these psects are already placed at
the address indicated in the C source code, the linker options that position them
should not be changed.