Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is each function within module assigned to 1 segment in .lin file ?

I have one question about the following in .lin file:
* .lin means linker command file

--------------
RAMSIZE(256)
XDATA(...)

Code (
...
?PR?*?A
?PR?A
?PR?main?A
...
)
--------------


A is module name.

Q1: I found "not" every function in module A is assigned to 1 segment in .lin file. Is it correct ?

Q2: I think code ?PR?*?A has covered all the functions in module A. But why other 2 appear ? Can I mark them ?

Parents Reply Children
  • 1. In Keil C guide it said:
    Each function in a source module is assigned a separate code segment using the ?PR?function_name?module_name naming convention.

    Ex. ?PR?ERROR_CHECK?SAMPLE

    This is the reason why I said "assigned to 1"

    2. "other 2 appear" means:
    if ?PR?*?A means "all functions" within A.c, then:

    why do we still need the following 2 code segments in .lin:

    ?PR?A
    ?PR?main?A

    Regards,