| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<!-- GNU LD Linker Script syntax highlighter --> |
| 4 |
<language name="GNU Linker Script" section="Scripts" extensions="*.ld" version="6" kateversion="5.0" author="Lyle Putnam ([email protected])" license=""> |
| 5 |
<highlighting> |
| 6 |
<list name="keywords"> |
| 7 |
<item>AT</item> |
| 8 |
<item>ENTRY</item> |
| 9 |
<item>INPUT</item> |
| 10 |
<item>GROUP</item> |
| 11 |
<item>OUTPUT</item> |
| 12 |
<item>OUTPUT_ARCH</item> |
| 13 |
<item>OUTPUT_FORMAT</item> |
| 14 |
<item>SEARCH_DIR</item> |
| 15 |
<item>STARTUP</item> |
| 16 |
<item>TARGET</item> |
| 17 |
</list> |
| 18 |
<list name="functions"> |
| 19 |
<item>ABSOLUTE</item> |
| 20 |
<item>ADDR</item> |
| 21 |
<item>ALIGN</item> |
| 22 |
<item>DATA_SEGMENT_ALIGN</item> |
| 23 |
<item>DATA_SEGMENT_END</item> |
| 24 |
<item>DATA_SEGMENT_RELRO_END</item> |
| 25 |
<item>DEFINED</item> |
| 26 |
<item>LOADADDR</item> |
| 27 |
<item>MAX</item> |
| 28 |
<item>MIN</item> |
| 29 |
<item>NEXT</item> |
| 30 |
<item>SIZEOF</item> |
| 31 |
<item>SIZEOF_HEADERS</item> |
| 32 |
</list> |
| 33 |
<list name="commands"> |
| 34 |
<item>SECTIONS</item> |
| 35 |
<item>MEMORY</item> |
| 36 |
</list> |
| 37 |
<contexts> |
| 38 |
<context name="Normal" attribute="Normal Text" lineEndContext="#stay"> |
| 39 |
<keyword attribute="Keyword" context="#stay" String="keywords" /> |
| 40 |
<keyword attribute="Function" context="#stay" String="functions" /> |
| 41 |
<keyword attribute="Command" context="#stay" String="commands" /> |
| 42 |
<HlCOct attribute="Number" context="#stay" /> |
| 43 |
<HlCHex attribute="Number" context="#stay" /> |
| 44 |
<!-- Base 10 Integers may be suffixed with K, M or G to indicate size --> |
| 45 |
<Int attribute="Number" context="Int Suffixes"/> |
| 46 |
<!-- "COMMON" and "/DISCARD/" are special section targets --> |
| 47 |
<RegExpr attribute="Section Name" context="#stay" String="\.[\-_0-9a-zA-Z]+|(?:COMMON|\/DISCARD\/)" /> |
| 48 |
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Block" /> |
| 49 |
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Block" /> |
| 50 |
<Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="Comment" /> |
| 51 |
<DetectChar attribute="String" context="string" char=""" /> |
| 52 |
</context> |
| 53 |
<context name="Int Suffixes" attribute="Number" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> |
| 54 |
<AnyChar attribute="Number" context="#pop" String="KMGkmg" /> |
| 55 |
</context> |
| 56 |
<context name="comment" attribute="Comment" lineEndContext="#stay"> |
| 57 |
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" /> |
| 58 |
<DetectSpaces /> |
| 59 |
<IncludeRules context="##Comments" /> |
| 60 |
</context> |
| 61 |
<context name="string" attribute="String" lineEndContext="#stay"> |
| 62 |
<DetectChar attribute="String" context="#pop" char=""" /> |
| 63 |
</context> |
| 64 |
</contexts> |
| 65 |
<itemDatas> |
| 66 |
<itemData name="Normal Text" defStyleNum="dsNormal" /> |
| 67 |
<itemData name="Keyword" defStyleNum="dsKeyword" /> |
| 68 |
<itemData name="Function" defStyleNum="dsFunction" /> |
| 69 |
<itemData name="Comment" defStyleNum="dsComment" /> |
| 70 |
<itemData name="Section Name" defStyleNum="dsChar" /> |
| 71 |
<itemData name="Command" defStyleNum="dsKeyword" /> |
| 72 |
<itemData name="Number" defStyleNum="dsBaseN" /> |
| 73 |
<itemData name="String" defStyleNum="dsString" /> |
| 74 |
</itemDatas> |
| 75 |
</highlighting> |
| 76 |
<general> |
| 77 |
<comments> |
| 78 |
<comment name="multiLine" start="/*" end="*/" region="Comment" /> |
| 79 |
<!-- I don't think GNU LD scripts have single-line comments --> |
| 80 |
</comments> |
| 81 |
<keywords casesensitive="1" /> |
| 82 |
</general> |
| 83 |
</language> |
| 84 |
<!-- kate: replace-tabs on; tab-width 4; indent-width 4; --> |