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