Mercurial > emacs
annotate lisp/progmodes/ld-script.el @ 83619:5da6a46ddbd6
* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here.
* termhooks.h (union display_info): Add mac_display_info.
* term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD
is defined.
* macterm.h (struct mac_display_info): Add terminal.
* w32term.c (w32_initialize): Make static.
* macterm.c (XTset_terminal_modes): Add a terminal parameter.
(XTreset_terminal_modes): Likewise.
(x_clear_frame): Add a frame parameter.
(note_mouse_movement): Get rif from the frame.
(mac_term_init): Initialize the terminal.
(mac_initialize): Make static and move terminal initialization ...
(mac_create_terminal): ... in this new function.
* macmenu.c: Reorder includes.
(Fx_popup_menu): Use terminal specific mouse_position_hook.
* macfns.c (x_set_mouse_color): Get rif from the frame.
(x_set_tool_bar_lines): Don't use updating_frame.
(mac_window): Add 2 new parameters for consistency with other
systems.
(Fx_create_frame): Fix doc string. Rename the parameter.
(Fx_create_frame): Set the frame parameters following what is done
in X11 and w32.
(Fx_open_connection): Remove window-system check.
(start_hourglass): Likewise.
(x_create_tip_frame): Get the keyboard from the terminal.
* w32fns.c (Fx_create_frame): Use kboard from the terminal.
* term/mac-win.el: Provide mac-win.
(mac-initialized): New variable.
(mac-initialize-window-system): New function. Move global setup
here.
(handle-args-function-alist, frame-creation-function-alist):
(window-system-initialization-alist): Add mac entries.
* loadup.el: Load mac-win on a Mac.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 19 May 2007 19:08:02 +0000 |
parents | e3694f1cb928 |
children | c1ec1c8a8d2e 95d0cdf160ea |
rev | line source |
---|---|
52304 | 1 ;;; ld-script.el --- GNU linker script editing mode for Emacs |
2 | |
75347 | 3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
68773
dc49655f57ae
Update copyright for 2006.
Nick Roberts <nickrob@snap.net.nz>
parents:
68177
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
52304 | 5 |
6 ;; Author: Masatake YAMATO<jet@gyve.org> | |
7 ;; Keywords: languages, faces | |
8 | |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
10 |
52304 | 11 ;; This program is free software; you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; This program is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with this program; see the file COPYING. If not, write to the | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
52304 | 25 |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
26 ;;; Commentary: |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
27 |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
28 ;; Major mode for editing GNU linker (ld) scripts. |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
29 |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
30 ;;; Code: |
52304 | 31 |
32 ;; Custom | |
33 (defgroup ld-script nil | |
34 "GNU linker script code editing commands for Emacs." | |
35 :prefix "ld-script-" | |
36 :group 'languages) | |
37 | |
63459
fe2fc708f3ef
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419
Miles Bader <miles@gnu.org>
parents:
52563
diff
changeset
|
38 (defvar ld-script-location-counter-face 'ld-script-location-counter) |
fe2fc708f3ef
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419
Miles Bader <miles@gnu.org>
parents:
52563
diff
changeset
|
39 (defface ld-script-location-counter |
68177
7341c6ea5e74
(auto-mode-alist): Use \' rather than $.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68162
diff
changeset
|
40 '((t :weight bold :inherit font-lock-builtin-face)) |
52304 | 41 "Face for location counter in GNU ld script." |
42 :group 'ld-script) | |
43 | |
44 ;; Syntax rules | |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
45 (defvar ld-script-mode-syntax-table |
52304 | 46 (let ((st (make-syntax-table))) |
47 (modify-syntax-entry ?\ "-" st) | |
48 (modify-syntax-entry ?{ "(}" st) | |
49 (modify-syntax-entry ?} "){" st) | |
50 (modify-syntax-entry ?\( "()" st) | |
51 (modify-syntax-entry ?\) ")(" st) | |
52 (modify-syntax-entry ?\[ "(]" st) | |
53 (modify-syntax-entry ?\] ")[" st) | |
54 (modify-syntax-entry ?_ "w" st) | |
55 (modify-syntax-entry ?. "_" st) | |
56 (modify-syntax-entry ?\\ "\\" st) | |
57 (modify-syntax-entry ?: "." st) | |
58 (modify-syntax-entry ?, "." st) | |
59 (modify-syntax-entry ?? "." st) | |
60 (modify-syntax-entry ?= "." st) | |
61 (modify-syntax-entry ?* ". 23" st) | |
62 (modify-syntax-entry ?/ ". 14" st) | |
63 (modify-syntax-entry ?+ "." st) | |
64 (modify-syntax-entry ?- "." st) | |
65 (modify-syntax-entry ?! "." st) | |
66 (modify-syntax-entry ?~ "." st) | |
67 (modify-syntax-entry ?% "." st) | |
68 (modify-syntax-entry ?< "." st) | |
69 (modify-syntax-entry ?> "." st) | |
70 (modify-syntax-entry ?& "." st) | |
71 (modify-syntax-entry ?| "." st) | |
72 (modify-syntax-entry ?\" "\"" st) | |
73 st) | |
74 "Syntax table used while in `ld-script-mode'.") | |
75 | |
76 ;; Font lock keywords | |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
77 ;; (The section number comes from ld's info.) |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
78 (defvar ld-script-keywords |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
79 '( |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
80 ;; 3.4.1 Setting the Entry Point |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
81 "ENTRY" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
82 ;; 3.4.2 Commands Dealing with Files |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
83 "INCLUDE" "INPUT" "GROUP" "AS_NEEDED" "OUTPUT" "SEARCH_DIR" "STARTUP" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
84 ;; 3.4.3 Commands Dealing with Object File Formats |
52304 | 85 "OUTPUT_FORMAT" "TARGET" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
86 ;; 3.4.3 Other Linker Script Commands |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
87 "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
88 "INHIBIT_COMMON_ALLOCATION" "NOCROSSREFS" "OUTPUT_ARCH" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
89 ;; 3.5.2 PROVIDE |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
90 "PROVIDE" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
91 ;; 3.5.3 PROVIDE_HIDDEN |
74557
a7d759873ecf
(ld-script-keywords): Fix a typo.
Masatake YAMATO <jet@gyve.org>
parents:
72117
diff
changeset
|
92 "PROVIDE_HIDDEN" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
93 ;; 3.6 SECTIONS Command |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
94 "SECTIONS" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
95 ;; 3.6.4.2 Input Section Wildcard Patterns |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
96 "SORT" "SORT_BY_NAME" "SORT_BY_ALIGNMENT" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
97 ;; 3.6.4.3 Input Section for Common Symbols |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
98 "COMMON" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
99 ;; 3.6.4.4 Input Section and Garbage Collection |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
100 "KEEP" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
101 ;; 3.6.5 Output Section Data |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
102 "BYTE" "SHORT" "LONG" "QUAD" "SQUAD" "FILL" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
103 ;; 3.6.6 Output Section Keywords |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
104 "CREATE_OBJECT_SYMBOLS" "CONSTRUCTORS" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
105 "__CTOR_LIST__" "__CTOR_END__" "__DTOR_LIST__" "__DTOR_END__" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
106 ;; 3.6.7 Output Section Discarding |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
107 ;; See `ld-script-font-lock-keywords' |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
108 ;; 3.6.8.1 Output Section Type |
52304 | 109 "NOLOAD" "DSECT" "COPY" "INFO" "OVERLAY" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
110 ;; 3.6.8.2 Output Section LMA |
52304 | 111 "AT" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
112 ;; 3.6.8.4 Forced Input Alignment |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
113 "SUBALIGN" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
114 ;; 3.6.8.6 Output Section Phdr |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
115 ":PHDR" |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
116 ;; 3.7 MEMORY Command |
52304 | 117 "MEMORY" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
118 ;; 3.8 PHDRS Command |
52304 | 119 "PHDRS" "FILEHDR" "FLAGS" |
120 "PT_NULL" "PT_LOAD" "PT_DYNAMIC" "PT_INTERP" "PT_NONE" "PT_SHLIB" "PT_PHDR" | |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
121 ;; 3.9 VERSION Command |
52304 | 122 "VERSION") |
123 "Keywords used of GNU ld script.") | |
124 | |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
125 ;; 3.10.8 Builtin Functions |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
126 (defvar ld-script-builtins |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
127 '("ABSOLUTE" |
52304 | 128 "ADDR" |
129 "ALIGN" | |
130 "BLOCK" | |
66613
11e1b8967398
(ld-script-builtins): Add more words: "DATA_SEGMENT_ALIGN",
Masatake YAMATO <jet@gyve.org>
parents:
64993
diff
changeset
|
131 "DATA_SEGMENT_ALIGN" |
11e1b8967398
(ld-script-builtins): Add more words: "DATA_SEGMENT_ALIGN",
Masatake YAMATO <jet@gyve.org>
parents:
64993
diff
changeset
|
132 "DATA_SEGMENT_END" |
11e1b8967398
(ld-script-builtins): Add more words: "DATA_SEGMENT_ALIGN",
Masatake YAMATO <jet@gyve.org>
parents:
64993
diff
changeset
|
133 "DATA_SEGMENT_RELRO_END" |
52304 | 134 "DEFINED" |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
135 "LENGTH" "len" "l" |
52304 | 136 "LOADADDR" |
137 "MAX" | |
138 "MIN" | |
139 "NEXT" | |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
140 "ORIGIN" "org" "o" |
66613
11e1b8967398
(ld-script-builtins): Add more words: "DATA_SEGMENT_ALIGN",
Masatake YAMATO <jet@gyve.org>
parents:
64993
diff
changeset
|
141 "SEGMENT_START" |
52304 | 142 "SIZEOF" |
143 "SIZEOF_HEADERS" | |
144 "sizeof_headers") | |
145 "Builtin functions of GNU ld script.") | |
146 | |
147 (defvar ld-script-font-lock-keywords | |
68134
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
148 (append |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
149 `((,(regexp-opt ld-script-keywords 'words) |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
150 1 font-lock-keyword-face) |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
151 (,(regexp-opt ld-script-builtins 'words) |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
152 1 font-lock-builtin-face) |
72117
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
153 ;; 3.6.7 Output Section Discarding |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
154 ;; 3.6.4.1 Input Section Basics |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
155 ;; 3.6.8.6 Output Section Phdr |
25da237ef5a9
(ld-script-keywords) (ld-script-font-lock-keywords, ld-script-builtins): Update keywords and add comments.
Masatake YAMATO <jet@gyve.org>
parents:
68773
diff
changeset
|
156 ("/DISCARD/\\|EXCLUDE_FILE\\|:NONE" . font-lock-warning-face) |
68134
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
157 ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face) |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
158 ) |
48bf79d0aede
2006-01-06 Masatake YAMATO <jet@gyve.org>
Masatake YAMATO <jet@gyve.org>
parents:
68072
diff
changeset
|
159 cpp-font-lock-keywords) |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
160 "Default font-lock-keywords for `ld-script-mode'.") |
52304 | 161 |
68148
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
162 ;; Linux-2.6.9 uses some different suffix for linker scripts: |
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
163 ;; "ld", "lds", "lds.S", "lds.in", "ld.script", and "ld.script.balo". |
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
164 ;; eCos uses "ld" and "ldi". |
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
165 ;; Netbsd uses "ldscript.*". |
52304 | 166 ;;;###autoload |
68148
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
167 (add-to-list 'auto-mode-alist '("\\.ld[si]?\\>" . ld-script-mode)) |
68177
7341c6ea5e74
(auto-mode-alist): Use \' rather than $.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68162
diff
changeset
|
168 (add-to-list 'auto-mode-alist '("ld\\.?script\\>" . ld-script-mode)) |
68148
df4b9089ebe1
* progmodes/ld-script.el (auto-mode-alist): Support suffix conventions used in netbsd and eCos.
Masatake YAMATO <jet@gyve.org>
parents:
68134
diff
changeset
|
169 |
68072
eb21ba2b7c0b
(auto-mode-alist): Recognize linker scripts whose file-name extensions are
Eli Zaretskii <eliz@gnu.org>
parents:
66613
diff
changeset
|
170 ;;;###autoload |
68177
7341c6ea5e74
(auto-mode-alist): Use \' rather than $.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68162
diff
changeset
|
171 (add-to-list 'auto-mode-alist '("\\.x[bdsru]?[cn]?\\'" . ld-script-mode)) |
52304 | 172 |
173 ;;;###autoload | |
174 (define-derived-mode ld-script-mode nil "LD-Script" | |
175 "A major mode to edit GNU ld script files" | |
176 (set (make-local-variable 'comment-start) "/* ") | |
177 (set (make-local-variable 'comment-end) " */") | |
68177
7341c6ea5e74
(auto-mode-alist): Use \' rather than $.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68162
diff
changeset
|
178 (set (make-local-variable 'font-lock-defaults) |
7341c6ea5e74
(auto-mode-alist): Use \' rather than $.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68162
diff
changeset
|
179 '(ld-script-font-lock-keywords nil))) |
52304 | 180 |
52563
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
181 (provide 'ld-script) |
2cb7c7b883e5
Add Commentary section, minor cleanup of file header.
John Paul Wallington <jpw@pobox.com>
parents:
52401
diff
changeset
|
182 |
68162 | 183 ;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593 |
52304 | 184 ;;; ld-script.el ends here |