code_seg
Last updated
Last updated
The code_seg pragma directive is used to specify the segment within the .text section in which the specified function should be stored. These sections can then be ordered using e.g .text$a
.
This is possible because the linker takes the section names and splits them at the first dollar sign, the value after it is then used to sort the sections which facilitates the alphabetical ordering.
This can be useful for when specifiying functions in order to determine the end of a file. For example: see "User Defined Reflective Loader (UDRL)".