Keil Logo

C51: Removing Linker Warning L16 (Uncalled Segment)


Information in this article applies to:

  • C51, All Versions

QUESTION

I have some unused functions in my program which generate linker warnings.

Because the functions enterdata and myfunc are not used, the following warning is generated:

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?ENTERDATA?X

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?MYFUNC?X

I know that the data overlaying is incomplete and might be inefficient, but is there some way to remove these Linker warnings?

ANSWER

Yes, you may use the Linker OVERLAY directive.

This directive allows you to add dummy calls, and the Linker thinks that the function is called. The following command removes the linker warnings:

OVERLAY (* ! (enterdata, myfunc))

µVision allows you to enter the OVERLAY directive under Project - Options for Target - Lx51 Misc - Overlay:

* ! (enterdata, myfunc)

MORE INFORMATION

  • Refer to OVERLAY in the BL51 User's Guide.

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.