diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2009-02-02 14:40:55 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2009-02-02 14:40:55 -0500 |
commit | 8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c (patch) | |
tree | da9759151e00221c58cdd9f4de893c0b08753670 /scripts | |
parent | 1ad53a98c927a9b5b1b57288ac0edec562fbcf8d (diff) | |
parent | 45c82b5a770be66845687a7d027c8b52946d59af (diff) |
Merge branch 'master' of /home/shaggy/git/linus-clean/
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 55 | ||||
-rw-r--r-- | scripts/Makefile.modinst | 3 | ||||
-rw-r--r-- | scripts/bootgraph.pl | 46 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 28 | ||||
-rwxr-xr-x | scripts/config | 4 | ||||
-rw-r--r-- | scripts/genksyms/genksyms.c | 21 | ||||
-rw-r--r-- | scripts/genksyms/keywords.c_shipped | 189 | ||||
-rw-r--r-- | scripts/genksyms/keywords.gperf | 2 | ||||
-rw-r--r-- | scripts/kallsyms.c | 21 | ||||
-rw-r--r-- | scripts/markup_oops.pl | 59 | ||||
-rw-r--r-- | scripts/mksysmap | 7 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 17 | ||||
-rw-r--r-- | scripts/strip-symbols | 22 |
13 files changed, 269 insertions, 205 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5d900307de3e..c7de8b39fcf1 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -151,16 +151,16 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< | |||
151 | $(obj)/%.i: $(src)/%.c FORCE | 151 | $(obj)/%.i: $(src)/%.c FORCE |
152 | $(call if_changed_dep,cc_i_c) | 152 | $(call if_changed_dep,cc_i_c) |
153 | 153 | ||
154 | cmd_genksyms = \ | 154 | cmd_gensymtypes = \ |
155 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 155 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
156 | $(GENKSYMS) -T $@ -A -a $(ARCH) \ | 156 | $(GENKSYMS) -T $@ -a $(ARCH) \ |
157 | $(if $(KBUILD_PRESERVE),-p) \ | 157 | $(if $(KBUILD_PRESERVE),-p) \ |
158 | $(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null))) | 158 | $(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null))) |
159 | 159 | ||
160 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | 160 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ |
161 | cmd_cc_symtypes_c = \ | 161 | cmd_cc_symtypes_c = \ |
162 | set -e; \ | 162 | set -e; \ |
163 | $(call cmd_genksyms, true) >/dev/null; \ | 163 | $(call cmd_gensymtypes, true) >/dev/null; \ |
164 | test -s $@ || rm -f $@ | 164 | test -s $@ || rm -f $@ |
165 | 165 | ||
166 | $(obj)/%.symtypes : $(src)/%.c FORCE | 166 | $(obj)/%.symtypes : $(src)/%.c FORCE |
@@ -177,38 +177,28 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | |||
177 | 177 | ||
178 | else | 178 | else |
179 | # When module versioning is enabled the following steps are executed: | 179 | # When module versioning is enabled the following steps are executed: |
180 | # o compile a .tmp_<file>.s from <file>.c | 180 | # o compile a .tmp_<file>.o from <file>.c |
181 | # o if .tmp_<file>.s doesn't contain a __ksymtab version, i.e. does | 181 | # o if .tmp_<file>.o doesn't contain a __ksymtab version, i.e. does |
182 | # not export symbols, we just assemble .tmp_<file>.s to <file>.o and | 182 | # not export symbols, we just rename .tmp_<file>.o to <file>.o and |
183 | # are done. | 183 | # are done. |
184 | # o otherwise, we calculate symbol versions using the good old | 184 | # o otherwise, we calculate symbol versions using the good old |
185 | # genksyms on the preprocessed source and postprocess them in a way | 185 | # genksyms on the preprocessed source and postprocess them in a way |
186 | # that they are usable as assembly source | 186 | # that they are usable as a linker script |
187 | # o assemble <file>.o from .tmp_<file>.s forcing inclusion of directives | 187 | # o generate <file>.o from .tmp_<file>.o using the linker to |
188 | # defining the actual values of __crc_*, followed by objcopy-ing them | 188 | # replace the unresolved symbols __crc_exported_symbol with |
189 | # to force these symbols to be local to permit stripping them later. | 189 | # the actual value of the checksum generated by genksyms |
190 | s_file = $(@D)/.tmp_$(@F:.o=.s) | ||
191 | v_file = $(@D)/.tmp_$(@F:.o=.v) | ||
192 | tmp_o_file = $(@D)/.tmp_$(@F) | ||
193 | no_g_c_flags = $(filter-out -g%,$(c_flags)) | ||
194 | |||
195 | cmd_cc_o_c = $(CC) $(c_flags) -S -o $(s_file) $< | ||
196 | 190 | ||
191 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< | ||
197 | cmd_modversions = \ | 192 | cmd_modversions = \ |
198 | if grep -q __ksymtab $(s_file); then \ | 193 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
199 | if $(call cmd_genksyms, $(KBUILD_SYMTYPES)) > $(v_file) \ | 194 | $(call cmd_gensymtypes, $(KBUILD_SYMTYPES)) \ |
200 | && $(CC) $(no_g_c_flags) -c -Wa,$(v_file) \ | 195 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
201 | -o $(tmp_o_file) $(s_file) \ | 196 | \ |
202 | && $(OBJCOPY) -L '__crc_*' -L '___crc_*' -w \ | 197 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
203 | $(tmp_o_file) $@; \ | 198 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
204 | then \ | 199 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
205 | : ; \ | ||
206 | else \ | ||
207 | rm -f $@; exit 1; \ | ||
208 | fi; \ | ||
209 | else \ | 200 | else \ |
210 | rm -f $(v_file); \ | 201 | mv -f $(@D)/.tmp_$(@F) $@; \ |
211 | $(CC) $(no_g_c_flags) -c -o $@ $(s_file); \ | ||
212 | fi; | 202 | fi; |
213 | endif | 203 | endif |
214 | 204 | ||
@@ -225,12 +215,7 @@ define rule_cc_o_c | |||
225 | $(cmd_record_mcount) \ | 215 | $(cmd_record_mcount) \ |
226 | scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ | 216 | scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ |
227 | $(dot-target).tmp; \ | 217 | $(dot-target).tmp; \ |
228 | if [ -r $(@D)/.tmp_$(@F:.o=.v) ]; then \ | 218 | rm -f $(depfile); \ |
229 | echo >> $(dot-target).tmp; \ | ||
230 | echo '$@: $(GENKSYMS)' >> $(dot-target).tmp; \ | ||
231 | echo '$(GENKSYMS):: ;' >> $(dot-target).tmp; \ | ||
232 | fi; \ | ||
233 | rm -f $(depfile) $(@D)/.tmp_$(@F:.o=.?); \ | ||
234 | mv -f $(dot-target).tmp $(dot-target).cmd | 219 | mv -f $(dot-target).tmp $(dot-target).cmd |
235 | endef | 220 | endef |
236 | 221 | ||
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index a5122dce1264..efa5d940e632 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
@@ -17,8 +17,7 @@ __modinst: $(modules) | |||
17 | @: | 17 | @: |
18 | 18 | ||
19 | quiet_cmd_modules_install = INSTALL $@ | 19 | quiet_cmd_modules_install = INSTALL $@ |
20 | cmd_modules_install = mkdir -p $(2); \ | 20 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) |
21 | $(mod_strip_cmd) $@ $(2)/$(notdir $@) || cp $@ $(2) | ||
22 | 21 | ||
23 | # Modules built outside the kernel source tree go into extra by default | 22 | # Modules built outside the kernel source tree go into extra by default |
24 | INSTALL_MOD_DIR ?= extra | 23 | INSTALL_MOD_DIR ?= extra |
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index 0a498e33b30b..b0246307aac4 100644 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl | |||
@@ -41,11 +41,13 @@ use strict; | |||
41 | 41 | ||
42 | my %start; | 42 | my %start; |
43 | my %end; | 43 | my %end; |
44 | my %type; | ||
44 | my $done = 0; | 45 | my $done = 0; |
45 | my $maxtime = 0; | 46 | my $maxtime = 0; |
46 | my $firsttime = 100; | 47 | my $firsttime = 100; |
47 | my $count = 0; | 48 | my $count = 0; |
48 | my %pids; | 49 | my %pids; |
50 | my %pidctr; | ||
49 | 51 | ||
50 | while (<>) { | 52 | while (<>) { |
51 | my $line = $_; | 53 | my $line = $_; |
@@ -53,6 +55,7 @@ while (<>) { | |||
53 | my $func = $2; | 55 | my $func = $2; |
54 | if ($done == 0) { | 56 | if ($done == 0) { |
55 | $start{$func} = $1; | 57 | $start{$func} = $1; |
58 | $type{$func} = 0; | ||
56 | if ($1 < $firsttime) { | 59 | if ($1 < $firsttime) { |
57 | $firsttime = $1; | 60 | $firsttime = $1; |
58 | } | 61 | } |
@@ -63,12 +66,40 @@ while (<>) { | |||
63 | $count = $count + 1; | 66 | $count = $count + 1; |
64 | } | 67 | } |
65 | 68 | ||
69 | if ($line =~ /([0-9\.]+)\] async_waiting @ ([0-9]+)/) { | ||
70 | my $pid = $2; | ||
71 | my $func; | ||
72 | if (!defined($pidctr{$pid})) { | ||
73 | $func = "wait_" . $pid . "_1"; | ||
74 | $pidctr{$pid} = 1; | ||
75 | } else { | ||
76 | $pidctr{$pid} = $pidctr{$pid} + 1; | ||
77 | $func = "wait_" . $pid . "_" . $pidctr{$pid}; | ||
78 | } | ||
79 | if ($done == 0) { | ||
80 | $start{$func} = $1; | ||
81 | $type{$func} = 1; | ||
82 | if ($1 < $firsttime) { | ||
83 | $firsttime = $1; | ||
84 | } | ||
85 | } | ||
86 | $pids{$func} = $pid; | ||
87 | $count = $count + 1; | ||
88 | } | ||
89 | |||
66 | if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) { | 90 | if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) { |
67 | if ($done == 0) { | 91 | if ($done == 0) { |
68 | $end{$2} = $1; | 92 | $end{$2} = $1; |
69 | $maxtime = $1; | 93 | $maxtime = $1; |
70 | } | 94 | } |
71 | } | 95 | } |
96 | |||
97 | if ($line =~ /([0-9\.]+)\] async_continuing @ ([0-9]+)/) { | ||
98 | my $pid = $2; | ||
99 | my $func = "wait_" . $pid . "_" . $pidctr{$pid}; | ||
100 | $end{$func} = $1; | ||
101 | $maxtime = $1; | ||
102 | } | ||
72 | if ($line =~ /Write protecting the/) { | 103 | if ($line =~ /Write protecting the/) { |
73 | $done = 1; | 104 | $done = 1; |
74 | } | 105 | } |
@@ -105,6 +136,8 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0 | |||
105 | $styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; | 136 | $styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; |
106 | $styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; | 137 | $styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; |
107 | 138 | ||
139 | my $style_wait = "fill:rgb(128,128,128);fill-opacity:0.5;stroke-width:0;stroke:rgb(0,0,0)"; | ||
140 | |||
108 | my $mult = 1950.0 / ($maxtime - $firsttime); | 141 | my $mult = 1950.0 / ($maxtime - $firsttime); |
109 | my $threshold2 = ($maxtime - $firsttime) / 120.0; | 142 | my $threshold2 = ($maxtime - $firsttime) / 120.0; |
110 | my $threshold = $threshold2/10; | 143 | my $threshold = $threshold2/10; |
@@ -139,11 +172,16 @@ foreach my $key (@initcalls) { | |||
139 | $stylecounter = 0; | 172 | $stylecounter = 0; |
140 | }; | 173 | }; |
141 | 174 | ||
142 | print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n"; | 175 | if ($type{$key} == 1) { |
143 | if ($duration >= $threshold2) { | 176 | $y = $y + 15; |
144 | print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n"; | 177 | print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"115\" style=\"$style_wait\"/>\n"; |
145 | } else { | 178 | } else { |
146 | print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n"; | 179 | print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n"; |
180 | if ($duration >= $threshold2) { | ||
181 | print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n"; | ||
182 | } else { | ||
183 | print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n"; | ||
184 | } | ||
147 | } | 185 | } |
148 | } | 186 | } |
149 | } | 187 | } |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7bed4ed2c519..45eb0ae98eba 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -10,7 +10,7 @@ use strict; | |||
10 | my $P = $0; | 10 | my $P = $0; |
11 | $P =~ s@.*/@@g; | 11 | $P =~ s@.*/@@g; |
12 | 12 | ||
13 | my $V = '0.26'; | 13 | my $V = '0.27'; |
14 | 14 | ||
15 | use Getopt::Long qw(:config no_auto_abbrev); | 15 | use Getopt::Long qw(:config no_auto_abbrev); |
16 | 16 | ||
@@ -411,13 +411,15 @@ sub ctx_statement_block { | |||
411 | 411 | ||
412 | my $type = ''; | 412 | my $type = ''; |
413 | my $level = 0; | 413 | my $level = 0; |
414 | my @stack = ([$type, $level]); | 414 | my @stack = (); |
415 | my $p; | 415 | my $p; |
416 | my $c; | 416 | my $c; |
417 | my $len = 0; | 417 | my $len = 0; |
418 | 418 | ||
419 | my $remainder; | 419 | my $remainder; |
420 | while (1) { | 420 | while (1) { |
421 | @stack = (['', 0]) if ($#stack == -1); | ||
422 | |||
421 | #warn "CSB: blk<$blk> remain<$remain>\n"; | 423 | #warn "CSB: blk<$blk> remain<$remain>\n"; |
422 | # If we are about to drop off the end, pull in more | 424 | # If we are about to drop off the end, pull in more |
423 | # context. | 425 | # context. |
@@ -1663,7 +1665,7 @@ sub process { | |||
1663 | # Should not end with a space. | 1665 | # Should not end with a space. |
1664 | $to =~ s/\s+$//; | 1666 | $to =~ s/\s+$//; |
1665 | # '*'s should not have spaces between. | 1667 | # '*'s should not have spaces between. |
1666 | while ($to =~ s/(.)\s\*/$1\*/) { | 1668 | while ($to =~ s/\*\s+\*/\*\*/) { |
1667 | } | 1669 | } |
1668 | 1670 | ||
1669 | #print "from<$from> to<$to>\n"; | 1671 | #print "from<$from> to<$to>\n"; |
@@ -1678,7 +1680,7 @@ sub process { | |||
1678 | # Should not end with a space. | 1680 | # Should not end with a space. |
1679 | $to =~ s/\s+$//; | 1681 | $to =~ s/\s+$//; |
1680 | # '*'s should not have spaces between. | 1682 | # '*'s should not have spaces between. |
1681 | while ($to =~ s/(.)\s\*/$1\*/) { | 1683 | while ($to =~ s/\*\s+\*/\*\*/) { |
1682 | } | 1684 | } |
1683 | # Modifiers should have spaces. | 1685 | # Modifiers should have spaces. |
1684 | $to =~ s/(\b$Modifier$)/$1 /; | 1686 | $to =~ s/(\b$Modifier$)/$1 /; |
@@ -2014,7 +2016,11 @@ sub process { | |||
2014 | 2016 | ||
2015 | # Flatten any parentheses | 2017 | # Flatten any parentheses |
2016 | $value =~ s/\)\(/\) \(/g; | 2018 | $value =~ s/\)\(/\) \(/g; |
2017 | while ($value !~ /(?:$Ident|-?$Constant)\s*$Compare\s*(?:$Ident|-?$Constant)/ && $value =~ s/\([^\(\)]*\)/1/) { | 2019 | while ($value =~ s/\[[^\{\}]*\]/1/ || |
2020 | $value !~ /(?:$Ident|-?$Constant)\s* | ||
2021 | $Compare\s* | ||
2022 | (?:$Ident|-?$Constant)/x && | ||
2023 | $value =~ s/\([^\(\)]*\)/1/) { | ||
2018 | } | 2024 | } |
2019 | 2025 | ||
2020 | if ($value =~ /^(?:$Ident|-?$Constant)$/) { | 2026 | if ($value =~ /^(?:$Ident|-?$Constant)$/) { |
@@ -2102,6 +2108,11 @@ sub process { | |||
2102 | ERROR("trailing statements should be on next line\n" . $herecurr); | 2108 | ERROR("trailing statements should be on next line\n" . $herecurr); |
2103 | } | 2109 | } |
2104 | } | 2110 | } |
2111 | # if should not continue a brace | ||
2112 | if ($line =~ /}\s*if\b/) { | ||
2113 | ERROR("trailing statements should be on next line\n" . | ||
2114 | $herecurr); | ||
2115 | } | ||
2105 | # case and default should not have general statements after them | 2116 | # case and default should not have general statements after them |
2106 | if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && | 2117 | if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && |
2107 | $line !~ /\G(?: | 2118 | $line !~ /\G(?: |
@@ -2516,9 +2527,10 @@ sub process { | |||
2516 | WARN("please use device_initcall() instead of __initcall()\n" . $herecurr); | 2527 | WARN("please use device_initcall() instead of __initcall()\n" . $herecurr); |
2517 | } | 2528 | } |
2518 | # check for struct file_operations, ensure they are const. | 2529 | # check for struct file_operations, ensure they are const. |
2519 | if ($line =~ /\bstruct\s+file_operations\b/ && | 2530 | if ($line !~ /\bconst\b/ && |
2520 | $line !~ /\bconst\b/) { | 2531 | $line =~ /\bstruct\s+(file_operations|seq_operations)\b/) { |
2521 | WARN("struct file_operations should normally be const\n" . $herecurr); | 2532 | WARN("struct $1 should normally be const\n" . |
2533 | $herecurr); | ||
2522 | } | 2534 | } |
2523 | 2535 | ||
2524 | # use of NR_CPUS is usually wrong | 2536 | # use of NR_CPUS is usually wrong |
diff --git a/scripts/config b/scripts/config index 68b9761cdc38..db6084b78a10 100755 --- a/scripts/config +++ b/scripts/config | |||
@@ -60,6 +60,10 @@ else | |||
60 | FN=.config | 60 | FN=.config |
61 | fi | 61 | fi |
62 | 62 | ||
63 | if [ "$1" = "" ] ; then | ||
64 | usage | ||
65 | fi | ||
66 | |||
63 | while [ "$1" != "" ] ; do | 67 | while [ "$1" != "" ] ; do |
64 | CMD="$1" | 68 | CMD="$1" |
65 | shift | 69 | shift |
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index f8bb4cabd62d..3a8297b5184c 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
@@ -43,7 +43,7 @@ int cur_line = 1; | |||
43 | char *cur_filename; | 43 | char *cur_filename; |
44 | 44 | ||
45 | static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, | 45 | static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, |
46 | flag_preserve, flag_warnings, flag_asm; | 46 | flag_preserve, flag_warnings; |
47 | static const char *arch = ""; | 47 | static const char *arch = ""; |
48 | static const char *mod_prefix = ""; | 48 | static const char *mod_prefix = ""; |
49 | 49 | ||
@@ -610,11 +610,8 @@ void export_symbol(const char *name) | |||
610 | if (flag_dump_defs) | 610 | if (flag_dump_defs) |
611 | fputs(">\n", debugfile); | 611 | fputs(">\n", debugfile); |
612 | 612 | ||
613 | /* Used as assembly source or a linker script. */ | 613 | /* Used as a linker script. */ |
614 | printf(flag_asm | 614 | printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc); |
615 | ? ".equiv %s__crc_%s, %#08lx\n" | ||
616 | : "%s__crc_%s = %#08lx ;\n", | ||
617 | mod_prefix, name, crc); | ||
618 | } | 615 | } |
619 | } | 616 | } |
620 | 617 | ||
@@ -651,10 +648,9 @@ void error_with_pos(const char *fmt, ...) | |||
651 | 648 | ||
652 | static void genksyms_usage(void) | 649 | static void genksyms_usage(void) |
653 | { | 650 | { |
654 | fputs("Usage:\n" "genksyms [-aAdDTwqhV] > /path/to/.tmp_obj.ver\n" "\n" | 651 | fputs("Usage:\n" "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n" "\n" |
655 | #ifdef __GNU_LIBRARY__ | 652 | #ifdef __GNU_LIBRARY__ |
656 | " -a, --arch Select architecture\n" | 653 | " -a, --arch Select architecture\n" |
657 | " -A, --asm Generate assembly rather than linker script\n" | ||
658 | " -d, --debug Increment the debug level (repeatable)\n" | 654 | " -d, --debug Increment the debug level (repeatable)\n" |
659 | " -D, --dump Dump expanded symbol defs (for debugging only)\n" | 655 | " -D, --dump Dump expanded symbol defs (for debugging only)\n" |
660 | " -r, --reference file Read reference symbols from a file\n" | 656 | " -r, --reference file Read reference symbols from a file\n" |
@@ -666,7 +662,6 @@ static void genksyms_usage(void) | |||
666 | " -V, --version Print the release version\n" | 662 | " -V, --version Print the release version\n" |
667 | #else /* __GNU_LIBRARY__ */ | 663 | #else /* __GNU_LIBRARY__ */ |
668 | " -a Select architecture\n" | 664 | " -a Select architecture\n" |
669 | " -A Generate assembly rather than linker script\n" | ||
670 | " -d Increment the debug level (repeatable)\n" | 665 | " -d Increment the debug level (repeatable)\n" |
671 | " -D Dump expanded symbol defs (for debugging only)\n" | 666 | " -D Dump expanded symbol defs (for debugging only)\n" |
672 | " -r file Read reference symbols from a file\n" | 667 | " -r file Read reference symbols from a file\n" |
@@ -688,7 +683,6 @@ int main(int argc, char **argv) | |||
688 | #ifdef __GNU_LIBRARY__ | 683 | #ifdef __GNU_LIBRARY__ |
689 | struct option long_opts[] = { | 684 | struct option long_opts[] = { |
690 | {"arch", 1, 0, 'a'}, | 685 | {"arch", 1, 0, 'a'}, |
691 | {"asm", 0, 0, 'A'}, | ||
692 | {"debug", 0, 0, 'd'}, | 686 | {"debug", 0, 0, 'd'}, |
693 | {"warnings", 0, 0, 'w'}, | 687 | {"warnings", 0, 0, 'w'}, |
694 | {"quiet", 0, 0, 'q'}, | 688 | {"quiet", 0, 0, 'q'}, |
@@ -701,10 +695,10 @@ int main(int argc, char **argv) | |||
701 | {0, 0, 0, 0} | 695 | {0, 0, 0, 0} |
702 | }; | 696 | }; |
703 | 697 | ||
704 | while ((o = getopt_long(argc, argv, "a:dwqVADr:T:ph", | 698 | while ((o = getopt_long(argc, argv, "a:dwqVDr:T:ph", |
705 | &long_opts[0], NULL)) != EOF) | 699 | &long_opts[0], NULL)) != EOF) |
706 | #else /* __GNU_LIBRARY__ */ | 700 | #else /* __GNU_LIBRARY__ */ |
707 | while ((o = getopt(argc, argv, "a:dwqVADr:T:ph")) != EOF) | 701 | while ((o = getopt(argc, argv, "a:dwqVDr:T:ph")) != EOF) |
708 | #endif /* __GNU_LIBRARY__ */ | 702 | #endif /* __GNU_LIBRARY__ */ |
709 | switch (o) { | 703 | switch (o) { |
710 | case 'a': | 704 | case 'a': |
@@ -722,9 +716,6 @@ int main(int argc, char **argv) | |||
722 | case 'V': | 716 | case 'V': |
723 | fputs("genksyms version 2.5.60\n", stderr); | 717 | fputs("genksyms version 2.5.60\n", stderr); |
724 | break; | 718 | break; |
725 | case 'A': | ||
726 | flag_asm = 1; | ||
727 | break; | ||
728 | case 'D': | 719 | case 'D': |
729 | flag_dump_defs = 1; | 720 | flag_dump_defs = 1; |
730 | break; | 721 | break; |
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.c_shipped index 83484fe93ede..971e0113ae7a 100644 --- a/scripts/genksyms/keywords.c_shipped +++ b/scripts/genksyms/keywords.c_shipped | |||
@@ -1,4 +1,4 @@ | |||
1 | /* ANSI-C code produced by gperf version 3.0.1 */ | 1 | /* ANSI-C code produced by gperf version 3.0.2 */ |
2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ | 2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ |
3 | 3 | ||
4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #line 3 "scripts/genksyms/keywords.gperf" | 33 | #line 3 "scripts/genksyms/keywords.gperf" |
34 | struct resword { const char *name; int token; }; | 34 | struct resword { const char *name; int token; }; |
35 | /* maximum key range = 64, duplicates = 0 */ | 35 | /* maximum key range = 62, duplicates = 0 */ |
36 | 36 | ||
37 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
38 | __inline | 38 | __inline |
@@ -46,32 +46,32 @@ is_reserved_hash (register const char *str, register unsigned int len) | |||
46 | { | 46 | { |
47 | static const unsigned char asso_values[] = | 47 | static const unsigned char asso_values[] = |
48 | { | 48 | { |
49 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 49 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
50 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 50 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
51 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 51 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
52 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 52 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
53 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 53 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
54 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 54 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
55 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, | 55 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 5, |
56 | 67, 67, 67, 67, 67, 67, 15, 67, 67, 67, | 56 | 65, 65, 65, 65, 65, 65, 35, 65, 65, 65, |
57 | 0, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 57 | 0, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
58 | 67, 67, 67, 67, 67, 0, 67, 0, 67, 5, | 58 | 65, 65, 65, 65, 65, 0, 65, 0, 65, 5, |
59 | 25, 20, 15, 30, 67, 15, 67, 67, 10, 0, | 59 | 20, 15, 10, 30, 65, 15, 65, 65, 20, 0, |
60 | 10, 40, 20, 67, 10, 5, 0, 10, 15, 67, | 60 | 10, 35, 20, 65, 10, 5, 0, 10, 5, 65, |
61 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 61 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
62 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 62 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
63 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 63 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
64 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 64 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
65 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 65 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
66 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 66 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
67 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 67 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
68 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 68 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
69 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 69 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
70 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 70 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
71 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 71 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
72 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 72 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
73 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, | 73 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, |
74 | 67, 67, 67, 67, 67, 67 | 74 | 65, 65, 65, 65, 65, 65 |
75 | }; | 75 | }; |
76 | return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; | 76 | return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; |
77 | } | 77 | } |
@@ -84,119 +84,116 @@ is_reserved_word (register const char *str, register unsigned int len) | |||
84 | { | 84 | { |
85 | enum | 85 | enum |
86 | { | 86 | { |
87 | TOTAL_KEYWORDS = 45, | 87 | TOTAL_KEYWORDS = 43, |
88 | MIN_WORD_LENGTH = 3, | 88 | MIN_WORD_LENGTH = 3, |
89 | MAX_WORD_LENGTH = 24, | 89 | MAX_WORD_LENGTH = 24, |
90 | MIN_HASH_VALUE = 3, | 90 | MIN_HASH_VALUE = 3, |
91 | MAX_HASH_VALUE = 66 | 91 | MAX_HASH_VALUE = 64 |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static const struct resword wordlist[] = | 94 | static const struct resword wordlist[] = |
95 | { | 95 | { |
96 | {""}, {""}, {""}, | 96 | {""}, {""}, {""}, |
97 | #line 28 "scripts/genksyms/keywords.gperf" | 97 | #line 26 "scripts/genksyms/keywords.gperf" |
98 | {"asm", ASM_KEYW}, | 98 | {"asm", ASM_KEYW}, |
99 | {""}, | 99 | {""}, |
100 | #line 10 "scripts/genksyms/keywords.gperf" | 100 | #line 8 "scripts/genksyms/keywords.gperf" |
101 | {"__asm", ASM_KEYW}, | 101 | {"__asm", ASM_KEYW}, |
102 | {""}, | 102 | {""}, |
103 | #line 11 "scripts/genksyms/keywords.gperf" | 103 | #line 9 "scripts/genksyms/keywords.gperf" |
104 | {"__asm__", ASM_KEYW}, | 104 | {"__asm__", ASM_KEYW}, |
105 | {""}, {""}, | 105 | {""}, {""}, |
106 | #line 54 "scripts/genksyms/keywords.gperf" | 106 | #line 52 "scripts/genksyms/keywords.gperf" |
107 | {"__typeof__", TYPEOF_KEYW}, | 107 | {"__typeof__", TYPEOF_KEYW}, |
108 | {""}, | 108 | {""}, |
109 | #line 14 "scripts/genksyms/keywords.gperf" | 109 | #line 12 "scripts/genksyms/keywords.gperf" |
110 | {"__const", CONST_KEYW}, | 110 | {"__const", CONST_KEYW}, |
111 | #line 13 "scripts/genksyms/keywords.gperf" | 111 | #line 11 "scripts/genksyms/keywords.gperf" |
112 | {"__attribute__", ATTRIBUTE_KEYW}, | 112 | {"__attribute__", ATTRIBUTE_KEYW}, |
113 | #line 15 "scripts/genksyms/keywords.gperf" | 113 | #line 13 "scripts/genksyms/keywords.gperf" |
114 | {"__const__", CONST_KEYW}, | 114 | {"__const__", CONST_KEYW}, |
115 | #line 20 "scripts/genksyms/keywords.gperf" | 115 | #line 18 "scripts/genksyms/keywords.gperf" |
116 | {"__signed__", SIGNED_KEYW}, | 116 | {"__signed__", SIGNED_KEYW}, |
117 | #line 46 "scripts/genksyms/keywords.gperf" | 117 | #line 44 "scripts/genksyms/keywords.gperf" |
118 | {"static", STATIC_KEYW}, | 118 | {"static", STATIC_KEYW}, |
119 | {""}, | 119 | #line 20 "scripts/genksyms/keywords.gperf" |
120 | #line 41 "scripts/genksyms/keywords.gperf" | 120 | {"__volatile__", VOLATILE_KEYW}, |
121 | #line 39 "scripts/genksyms/keywords.gperf" | ||
121 | {"int", INT_KEYW}, | 122 | {"int", INT_KEYW}, |
122 | #line 34 "scripts/genksyms/keywords.gperf" | 123 | #line 32 "scripts/genksyms/keywords.gperf" |
123 | {"char", CHAR_KEYW}, | 124 | {"char", CHAR_KEYW}, |
124 | #line 35 "scripts/genksyms/keywords.gperf" | 125 | #line 33 "scripts/genksyms/keywords.gperf" |
125 | {"const", CONST_KEYW}, | 126 | {"const", CONST_KEYW}, |
126 | #line 47 "scripts/genksyms/keywords.gperf" | 127 | #line 45 "scripts/genksyms/keywords.gperf" |
127 | {"struct", STRUCT_KEYW}, | 128 | {"struct", STRUCT_KEYW}, |
128 | #line 26 "scripts/genksyms/keywords.gperf" | 129 | #line 24 "scripts/genksyms/keywords.gperf" |
129 | {"__restrict__", RESTRICT_KEYW}, | 130 | {"__restrict__", RESTRICT_KEYW}, |
130 | #line 27 "scripts/genksyms/keywords.gperf" | ||
131 | {"restrict", RESTRICT_KEYW}, | ||
132 | #line 7 "scripts/genksyms/keywords.gperf" | ||
133 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, | ||
134 | #line 18 "scripts/genksyms/keywords.gperf" | ||
135 | {"__inline__", INLINE_KEYW}, | ||
136 | {""}, | ||
137 | #line 22 "scripts/genksyms/keywords.gperf" | ||
138 | {"__volatile__", VOLATILE_KEYW}, | ||
139 | #line 5 "scripts/genksyms/keywords.gperf" | ||
140 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, | ||
141 | #line 25 "scripts/genksyms/keywords.gperf" | 131 | #line 25 "scripts/genksyms/keywords.gperf" |
132 | {"restrict", RESTRICT_KEYW}, | ||
133 | #line 23 "scripts/genksyms/keywords.gperf" | ||
142 | {"_restrict", RESTRICT_KEYW}, | 134 | {"_restrict", RESTRICT_KEYW}, |
143 | {""}, | ||
144 | #line 12 "scripts/genksyms/keywords.gperf" | ||
145 | {"__attribute", ATTRIBUTE_KEYW}, | ||
146 | #line 6 "scripts/genksyms/keywords.gperf" | ||
147 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, | ||
148 | #line 16 "scripts/genksyms/keywords.gperf" | 135 | #line 16 "scripts/genksyms/keywords.gperf" |
136 | {"__inline__", INLINE_KEYW}, | ||
137 | #line 10 "scripts/genksyms/keywords.gperf" | ||
138 | {"__attribute", ATTRIBUTE_KEYW}, | ||
139 | {""}, | ||
140 | #line 14 "scripts/genksyms/keywords.gperf" | ||
149 | {"__extension__", EXTENSION_KEYW}, | 141 | {"__extension__", EXTENSION_KEYW}, |
150 | #line 37 "scripts/genksyms/keywords.gperf" | 142 | #line 35 "scripts/genksyms/keywords.gperf" |
151 | {"enum", ENUM_KEYW}, | 143 | {"enum", ENUM_KEYW}, |
152 | #line 8 "scripts/genksyms/keywords.gperf" | 144 | #line 19 "scripts/genksyms/keywords.gperf" |
153 | {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, | 145 | {"__volatile", VOLATILE_KEYW}, |
154 | #line 38 "scripts/genksyms/keywords.gperf" | 146 | #line 36 "scripts/genksyms/keywords.gperf" |
155 | {"extern", EXTERN_KEYW}, | 147 | {"extern", EXTERN_KEYW}, |
156 | {""}, | 148 | {""}, |
157 | #line 19 "scripts/genksyms/keywords.gperf" | 149 | #line 17 "scripts/genksyms/keywords.gperf" |
158 | {"__signed", SIGNED_KEYW}, | 150 | {"__signed", SIGNED_KEYW}, |
159 | #line 9 "scripts/genksyms/keywords.gperf" | 151 | #line 7 "scripts/genksyms/keywords.gperf" |
160 | {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, | 152 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, |
161 | #line 49 "scripts/genksyms/keywords.gperf" | 153 | {""}, |
162 | {"union", UNION_KEYW}, | 154 | #line 51 "scripts/genksyms/keywords.gperf" |
163 | #line 53 "scripts/genksyms/keywords.gperf" | ||
164 | {"typeof", TYPEOF_KEYW}, | 155 | {"typeof", TYPEOF_KEYW}, |
165 | #line 48 "scripts/genksyms/keywords.gperf" | 156 | #line 46 "scripts/genksyms/keywords.gperf" |
166 | {"typedef", TYPEDEF_KEYW}, | 157 | {"typedef", TYPEDEF_KEYW}, |
167 | #line 17 "scripts/genksyms/keywords.gperf" | 158 | #line 15 "scripts/genksyms/keywords.gperf" |
168 | {"__inline", INLINE_KEYW}, | 159 | {"__inline", INLINE_KEYW}, |
169 | #line 33 "scripts/genksyms/keywords.gperf" | 160 | #line 31 "scripts/genksyms/keywords.gperf" |
170 | {"auto", AUTO_KEYW}, | 161 | {"auto", AUTO_KEYW}, |
171 | #line 21 "scripts/genksyms/keywords.gperf" | 162 | #line 47 "scripts/genksyms/keywords.gperf" |
172 | {"__volatile", VOLATILE_KEYW}, | 163 | {"union", UNION_KEYW}, |
173 | {""}, {""}, | 164 | {""}, {""}, |
174 | #line 50 "scripts/genksyms/keywords.gperf" | 165 | #line 48 "scripts/genksyms/keywords.gperf" |
175 | {"unsigned", UNSIGNED_KEYW}, | 166 | {"unsigned", UNSIGNED_KEYW}, |
176 | {""}, | 167 | #line 49 "scripts/genksyms/keywords.gperf" |
177 | #line 44 "scripts/genksyms/keywords.gperf" | 168 | {"void", VOID_KEYW}, |
169 | #line 42 "scripts/genksyms/keywords.gperf" | ||
178 | {"short", SHORT_KEYW}, | 170 | {"short", SHORT_KEYW}, |
179 | #line 40 "scripts/genksyms/keywords.gperf" | 171 | {""}, {""}, |
172 | #line 50 "scripts/genksyms/keywords.gperf" | ||
173 | {"volatile", VOLATILE_KEYW}, | ||
174 | {""}, | ||
175 | #line 37 "scripts/genksyms/keywords.gperf" | ||
176 | {"float", FLOAT_KEYW}, | ||
177 | #line 34 "scripts/genksyms/keywords.gperf" | ||
178 | {"double", DOUBLE_KEYW}, | ||
179 | {""}, | ||
180 | #line 5 "scripts/genksyms/keywords.gperf" | ||
181 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, | ||
182 | {""}, {""}, | ||
183 | #line 38 "scripts/genksyms/keywords.gperf" | ||
180 | {"inline", INLINE_KEYW}, | 184 | {"inline", INLINE_KEYW}, |
185 | #line 6 "scripts/genksyms/keywords.gperf" | ||
186 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, | ||
187 | #line 41 "scripts/genksyms/keywords.gperf" | ||
188 | {"register", REGISTER_KEYW}, | ||
181 | {""}, | 189 | {""}, |
182 | #line 52 "scripts/genksyms/keywords.gperf" | 190 | #line 22 "scripts/genksyms/keywords.gperf" |
183 | {"volatile", VOLATILE_KEYW}, | ||
184 | #line 42 "scripts/genksyms/keywords.gperf" | ||
185 | {"long", LONG_KEYW}, | ||
186 | #line 24 "scripts/genksyms/keywords.gperf" | ||
187 | {"_Bool", BOOL_KEYW}, | 191 | {"_Bool", BOOL_KEYW}, |
188 | {""}, {""}, | ||
189 | #line 43 "scripts/genksyms/keywords.gperf" | 192 | #line 43 "scripts/genksyms/keywords.gperf" |
190 | {"register", REGISTER_KEYW}, | 193 | {"signed", SIGNED_KEYW}, |
191 | #line 51 "scripts/genksyms/keywords.gperf" | 194 | {""}, {""}, |
192 | {"void", VOID_KEYW}, | 195 | #line 40 "scripts/genksyms/keywords.gperf" |
193 | #line 39 "scripts/genksyms/keywords.gperf" | 196 | {"long", LONG_KEYW} |
194 | {"float", FLOAT_KEYW}, | ||
195 | #line 36 "scripts/genksyms/keywords.gperf" | ||
196 | {"double", DOUBLE_KEYW}, | ||
197 | {""}, {""}, {""}, {""}, | ||
198 | #line 45 "scripts/genksyms/keywords.gperf" | ||
199 | {"signed", SIGNED_KEYW} | ||
200 | }; | 197 | }; |
201 | 198 | ||
202 | if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) | 199 | if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) |
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf index 8abe7ab8d88f..5ef3733225fb 100644 --- a/scripts/genksyms/keywords.gperf +++ b/scripts/genksyms/keywords.gperf | |||
@@ -5,8 +5,6 @@ struct resword { const char *name; int token; } | |||
5 | EXPORT_SYMBOL, EXPORT_SYMBOL_KEYW | 5 | EXPORT_SYMBOL, EXPORT_SYMBOL_KEYW |
6 | EXPORT_SYMBOL_GPL, EXPORT_SYMBOL_KEYW | 6 | EXPORT_SYMBOL_GPL, EXPORT_SYMBOL_KEYW |
7 | EXPORT_SYMBOL_GPL_FUTURE, EXPORT_SYMBOL_KEYW | 7 | EXPORT_SYMBOL_GPL_FUTURE, EXPORT_SYMBOL_KEYW |
8 | EXPORT_UNUSED_SYMBOL, EXPORT_SYMBOL_KEYW | ||
9 | EXPORT_UNUSED_SYMBOL_GPL, EXPORT_SYMBOL_KEYW | ||
10 | __asm, ASM_KEYW | 8 | __asm, ASM_KEYW |
11 | __asm__, ASM_KEYW | 9 | __asm__, ASM_KEYW |
12 | __attribute, ATTRIBUTE_KEYW | 10 | __attribute, ATTRIBUTE_KEYW |
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 92758120a767..ad2434b26970 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -130,9 +130,18 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
130 | static int symbol_valid(struct sym_entry *s) | 130 | static int symbol_valid(struct sym_entry *s) |
131 | { | 131 | { |
132 | /* Symbols which vary between passes. Passes 1 and 2 must have | 132 | /* Symbols which vary between passes. Passes 1 and 2 must have |
133 | * identical symbol lists. | 133 | * identical symbol lists. The kallsyms_* symbols below are only added |
134 | * after pass 1, they would be included in pass 2 when --all-symbols is | ||
135 | * specified so exclude them to get a stable symbol list. | ||
134 | */ | 136 | */ |
135 | static char *special_symbols[] = { | 137 | static char *special_symbols[] = { |
138 | "kallsyms_addresses", | ||
139 | "kallsyms_num_syms", | ||
140 | "kallsyms_names", | ||
141 | "kallsyms_markers", | ||
142 | "kallsyms_token_table", | ||
143 | "kallsyms_token_index", | ||
144 | |||
136 | /* Exclude linker generated symbols which vary between passes */ | 145 | /* Exclude linker generated symbols which vary between passes */ |
137 | "_SDA_BASE_", /* ppc */ | 146 | "_SDA_BASE_", /* ppc */ |
138 | "_SDA2_BASE_", /* ppc */ | 147 | "_SDA2_BASE_", /* ppc */ |
@@ -164,9 +173,7 @@ static int symbol_valid(struct sym_entry *s) | |||
164 | } | 173 | } |
165 | 174 | ||
166 | /* Exclude symbols which vary between passes. */ | 175 | /* Exclude symbols which vary between passes. */ |
167 | if (strstr((char *)s->sym + offset, "_compiled.") || | 176 | if (strstr((char *)s->sym + offset, "_compiled.")) |
168 | strncmp((char*)s->sym + offset, "__compound_literal.", 19) == 0 || | ||
169 | strncmp((char*)s->sym + offset, "__compound_literal$", 19) == 0) | ||
170 | return 0; | 177 | return 0; |
171 | 178 | ||
172 | for (i = 0; special_symbols[i]; i++) | 179 | for (i = 0; special_symbols[i]; i++) |
@@ -543,10 +550,8 @@ int main(int argc, char **argv) | |||
543 | usage(); | 550 | usage(); |
544 | 551 | ||
545 | read_map(stdin); | 552 | read_map(stdin); |
546 | if (table_cnt) { | 553 | sort_symbols(); |
547 | sort_symbols(); | 554 | optimize_token_table(); |
548 | optimize_token_table(); | ||
549 | } | ||
550 | write_src(); | 555 | write_src(); |
551 | 556 | ||
552 | return 0; | 557 | return 0; |
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index 700a7a654a3f..d40449cafa84 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/perl -w |
2 | 2 | ||
3 | use File::Basename; | ||
4 | |||
3 | # Copyright 2008, Intel Corporation | 5 | # Copyright 2008, Intel Corporation |
4 | # | 6 | # |
5 | # This file is part of the Linux kernel | 7 | # This file is part of the Linux kernel |
@@ -13,23 +15,41 @@ | |||
13 | 15 | ||
14 | 16 | ||
15 | my $vmlinux_name = $ARGV[0]; | 17 | my $vmlinux_name = $ARGV[0]; |
16 | 18 | if (!defined($vmlinux_name)) { | |
19 | my $kerver = `uname -r`; | ||
20 | chomp($kerver); | ||
21 | $vmlinux_name = "/lib/modules/$kerver/build/vmlinux"; | ||
22 | print "No vmlinux specified, assuming $vmlinux_name\n"; | ||
23 | } | ||
24 | my $filename = $vmlinux_name; | ||
17 | # | 25 | # |
18 | # Step 1: Parse the oops to find the EIP value | 26 | # Step 1: Parse the oops to find the EIP value |
19 | # | 27 | # |
20 | 28 | ||
21 | my $target = "0"; | 29 | my $target = "0"; |
30 | my $function; | ||
31 | my $module = ""; | ||
32 | my $func_offset; | ||
33 | my $vmaoffset = 0; | ||
34 | |||
22 | while (<STDIN>) { | 35 | while (<STDIN>) { |
23 | if ($_ =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) { | 36 | my $line = $_; |
37 | if ($line =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) { | ||
24 | $target = $1; | 38 | $target = $1; |
25 | } | 39 | } |
26 | } | 40 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { |
41 | $function = $1; | ||
42 | $func_offset = $2; | ||
43 | } | ||
27 | 44 | ||
28 | if ($target =~ /^f8/) { | 45 | # check if it's a module |
29 | print "This script does not work on modules ... \n"; | 46 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) { |
30 | exit; | 47 | $module = $3; |
48 | } | ||
31 | } | 49 | } |
32 | 50 | ||
51 | my $decodestart = hex($target) - hex($func_offset); | ||
52 | my $decodestop = $decodestart + 8192; | ||
33 | if ($target eq "0") { | 53 | if ($target eq "0") { |
34 | print "No oops found!\n"; | 54 | print "No oops found!\n"; |
35 | print "Usage: \n"; | 55 | print "Usage: \n"; |
@@ -37,6 +57,29 @@ if ($target eq "0") { | |||
37 | exit; | 57 | exit; |
38 | } | 58 | } |
39 | 59 | ||
60 | # if it's a module, we need to find the .ko file and calculate a load offset | ||
61 | if ($module ne "") { | ||
62 | my $dir = dirname($filename); | ||
63 | $dir = $dir . "/"; | ||
64 | my $mod = $module . ".ko"; | ||
65 | my $modulefile = `find $dir -name $mod | head -1`; | ||
66 | chomp($modulefile); | ||
67 | $filename = $modulefile; | ||
68 | if ($filename eq "") { | ||
69 | print "Module .ko file for $module not found. Aborting\n"; | ||
70 | exit; | ||
71 | } | ||
72 | # ok so we found the module, now we need to calculate the vma offset | ||
73 | open(FILE, "objdump -dS $filename |") || die "Cannot start objdump"; | ||
74 | while (<FILE>) { | ||
75 | if ($_ =~ /^([0-9a-f]+) \<$function\>\:/) { | ||
76 | my $fu = $1; | ||
77 | $vmaoffset = hex($target) - hex($fu) - hex($func_offset); | ||
78 | } | ||
79 | } | ||
80 | close(FILE); | ||
81 | } | ||
82 | |||
40 | my $counter = 0; | 83 | my $counter = 0; |
41 | my $state = 0; | 84 | my $state = 0; |
42 | my $center = 0; | 85 | my $center = 0; |
@@ -59,9 +102,7 @@ sub InRange { | |||
59 | # first, parse the input into the lines array, but to keep size down, | 102 | # first, parse the input into the lines array, but to keep size down, |
60 | # we only do this for 4Kb around the sweet spot | 103 | # we only do this for 4Kb around the sweet spot |
61 | 104 | ||
62 | my $filename; | 105 | open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump"; |
63 | |||
64 | open(FILE, "objdump -dS $vmlinux_name |") || die "Cannot start objdump"; | ||
65 | 106 | ||
66 | while (<FILE>) { | 107 | while (<FILE>) { |
67 | my $line = $_; | 108 | my $line = $_; |
diff --git a/scripts/mksysmap b/scripts/mksysmap index 1db316a3712b..6e133a0bae7a 100644 --- a/scripts/mksysmap +++ b/scripts/mksysmap | |||
@@ -37,6 +37,9 @@ | |||
37 | 37 | ||
38 | # readprofile starts reading symbols when _stext is found, and | 38 | # readprofile starts reading symbols when _stext is found, and |
39 | # continue until it finds a symbol which is not either of 'T', 't', | 39 | # continue until it finds a symbol which is not either of 'T', 't', |
40 | # 'W' or 'w'. | 40 | # 'W' or 'w'. __crc_ are 'A' and placed in the middle |
41 | # so we just ignore them to let readprofile continue to work. | ||
42 | # (At least sparc64 has __crc_ in the middle). | ||
43 | |||
44 | $NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 | ||
41 | 45 | ||
42 | $NM -n $1 | grep -v '\( [aNUw] \)\|\( \$[adt]\)' > $2 | ||
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index d4dc222a74f3..491b8b1b6abf 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -366,11 +366,17 @@ static void do_pnp_device_entry(void *symval, unsigned long size, | |||
366 | 366 | ||
367 | for (i = 0; i < count; i++) { | 367 | for (i = 0; i < count; i++) { |
368 | const char *id = (char *)devs[i].id; | 368 | const char *id = (char *)devs[i].id; |
369 | char acpi_id[sizeof(devs[0].id)]; | ||
370 | int j; | ||
369 | 371 | ||
370 | buf_printf(&mod->dev_table_buf, | 372 | buf_printf(&mod->dev_table_buf, |
371 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | 373 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); |
374 | |||
375 | /* fix broken pnp bus lowercasing */ | ||
376 | for (j = 0; j < sizeof(acpi_id); j++) | ||
377 | acpi_id[j] = toupper(id[j]); | ||
372 | buf_printf(&mod->dev_table_buf, | 378 | buf_printf(&mod->dev_table_buf, |
373 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | 379 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); |
374 | } | 380 | } |
375 | } | 381 | } |
376 | 382 | ||
@@ -416,10 +422,17 @@ static void do_pnp_card_entries(void *symval, unsigned long size, | |||
416 | 422 | ||
417 | /* add an individual alias for every device entry */ | 423 | /* add an individual alias for every device entry */ |
418 | if (!dup) { | 424 | if (!dup) { |
425 | char acpi_id[sizeof(card->devs[0].id)]; | ||
426 | int k; | ||
427 | |||
419 | buf_printf(&mod->dev_table_buf, | 428 | buf_printf(&mod->dev_table_buf, |
420 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | 429 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); |
430 | |||
431 | /* fix broken pnp bus lowercasing */ | ||
432 | for (k = 0; k < sizeof(acpi_id); k++) | ||
433 | acpi_id[k] = toupper(id[k]); | ||
421 | buf_printf(&mod->dev_table_buf, | 434 | buf_printf(&mod->dev_table_buf, |
422 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | 435 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); |
423 | } | 436 | } |
424 | } | 437 | } |
425 | } | 438 | } |
diff --git a/scripts/strip-symbols b/scripts/strip-symbols deleted file mode 100644 index 29ee8c1a014b..000000000000 --- a/scripts/strip-symbols +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | <*> | ||
2 | *.h | ||
3 | __compound_literal[$.][0-9]* | ||
4 | __crc_[a-zA-Z_]* | ||
5 | __exitcall_[a-zA-Z_]* | ||
6 | __func__[$.][0-9]* | ||
7 | __FUNCTION__[$.][0-9]* | ||
8 | gcc[0-9]_compiled[$.] | ||
9 | __initcall_[a-zA-Z_]* | ||
10 | __kcrctab_[a-zA-Z_]* | ||
11 | __kstrtab_[a-zA-Z_]* | ||
12 | __ksymtab_[a-zA-Z_]* | ||
13 | __mod_[a-zA-Z_]*[0-9] | ||
14 | __module_depends | ||
15 | __param_[a-zA-Z_]* | ||
16 | __pci_fixup_*PCI_ANY_IDPCI_ANY_ID* | ||
17 | __pci_fixup_*PCI_ANY_IDPCI_DEVICE_ID_* | ||
18 | __pci_fixup_*PCI_VENDOR_ID_*PCI_ANY_ID* | ||
19 | __pci_fixup_*PCI_VENDOR_ID_*PCI_DEVICE_ID_* | ||
20 | __PRETTY_FUNCTION__[$.][0-9]* | ||
21 | __setup_[a-zA-Z_]* | ||
22 | ____versions | ||