Keil Logo

Using Wildcards

The LX51 Linker allows you to specify wildcards when specifying segment names in the SEGMENTS directive. An obvious benefit of wildcards is the ability to locate all segments from a single source module without specifying every individual segment name.

LX51 myfile.obj SEGMENTS (?PR?*?myfile (C:0x1000))

There are numerous special-purpose applications where locating segments with wildcards is desirable.  For example, you may use wildcards to locate groups of segments into a 2 KByte block. Then, you may use ACALL and AJMP instructions (rather than LCALL and LJMP) for function calls within this group.


  • The asterisk (*) is the only wildcard allowed and only one wildcard is possible.
  • Wildcards are not allowed with the LAST parameter of the SEGMENTS directive.
  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.