372
|
1 " Vim syntax file
|
11062
|
2 " Language: ld(1) script
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
372
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn keyword ldTodo contained TODO FIXME XXX NOTE
|
|
14
|
|
15 syn region ldComment start='/\*' end='\*/' contains=ldTodo,@Spell
|
|
16
|
|
17 syn region ldFileName start=+"+ end=+"+
|
|
18
|
375
|
19 syn keyword ldPreProc SECTIONS MEMORY OVERLAY PHDRS VERSION INCLUDE
|
372
|
20 syn match ldPreProc '\<VERS_\d\+\.\d\+'
|
|
21
|
|
22 syn keyword ldFunction ABSOLUTE ADDR ALIGN BLOCK DATA_SEGMENT_ALIGN
|
|
23 \ DATA_SEGMENT_END DATA_SEGMENT_RELRO_END DEFINED
|
|
24 \ LOADADDR MAX MIN NEXT SIZEOF SIZEOF_HEADERS
|
|
25 \ sizeof_headers
|
|
26
|
375
|
27 syn keyword ldKeyword ENTRY INPUT GROUP OUTPUT
|
372
|
28 \ SEARCH_DIR STARTUP OUTPUT_FORMAT TARGET
|
|
29 \ ASSERT EXTERN FORCE_COMMON_ALLOCATION
|
|
30 \ INHIBIT_COMMON_ALLOCATION NOCROSSREFS OUTPUT_ARCH
|
|
31 \ PROVIDE EXCLUDE_FILE SORT KEEP FILL
|
|
32 \ CREATE_OBJECT_SYMBOLS CONSTRUCTORS SUBALIGN
|
|
33 \ FILEHDR AT __asm__ ABSOLUTE
|
|
34
|
|
35 syn keyword ldDataType BYTE SHORT LONG QUAD SQUAD
|
|
36 syn keyword ldOutputType NOLOAD DSECT COPY INFO OVERLAY
|
|
37 syn keyword ldPTType PT_NULL PT_LOAD PT_DYNAMIC PT_INTERP
|
|
38 \ PT_NOTE PT_SHLIB PT_PHDR
|
|
39
|
|
40 syn keyword ldSpecial COMMON
|
|
41 syn match ldSpecial '/DISCARD/'
|
|
42
|
|
43 syn keyword ldIdentifier ORIGIN LENGTH
|
|
44
|
|
45 syn match ldSpecSections '\.'
|
|
46 syn match ldSections '\.\S\+'
|
|
47 syn match ldSpecSections '\.\%(text\|data\|bss\|symver\)\>'
|
|
48
|
|
49 syn match ldNumber display '\<0[xX]\x\+\>'
|
|
50 syn match ldNumber display '\d\+[KM]\>' contains=ldNumberMult
|
18186
|
51 syn match ldNumberMult display '\(\d\+\)\@<=[KM]\>'
|
372
|
52 syn match ldOctal contained display '\<0\o\+\>'
|
|
53 \ contains=ldOctalZero
|
|
54 syn match ldOctalZero contained display '\<0'
|
|
55 syn match ldOctalError contained display '\<0\o*[89]\d*\>'
|
|
56
|
|
57
|
|
58 hi def link ldTodo Todo
|
|
59 hi def link ldComment Comment
|
|
60 hi def link ldFileName String
|
|
61 hi def link ldPreProc PreProc
|
|
62 hi def link ldFunction Identifier
|
|
63 hi def link ldKeyword Keyword
|
|
64 hi def link ldType Type
|
|
65 hi def link ldDataType ldType
|
|
66 hi def link ldOutputType ldType
|
|
67 hi def link ldPTType ldType
|
|
68 hi def link ldSpecial Special
|
|
69 hi def link ldIdentifier Identifier
|
|
70 hi def link ldSections Constant
|
|
71 hi def link ldSpecSections Special
|
|
72 hi def link ldNumber Number
|
|
73 hi def link ldNumberMult PreProc
|
|
74 hi def link ldOctal ldNumber
|
|
75 hi def link ldOctalZero PreProc
|
|
76 hi def link ldOctalError Error
|
|
77
|
|
78 let b:current_syntax = "ld"
|
|
79
|
|
80 let &cpo = s:cpo_save
|
|
81 unlet s:cpo_save
|