History

Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2

Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h

Ingo Molnar committed 17 years ago

Commit 6e15cf02 parents be0ea69 60db564465 files · +17559 −17715Browse files

Showing the changes to scripts (6 of 465 files). Show all

Unified · Split

6 files
  1. scripts/Makefile.lib +14 −0
  2. scripts/bin_size +10 −0
  3. scripts/gcc-x86_32-has-stack-protector.sh +8 −0
  4. scripts/gcc-x86_64-has-stack-protector.sh +4 −2
  5. scripts/gen_initramfs_list.sh +12 −6
  6. scripts/mod/modpost.c +4 −1
scripts/Makefile.lib+14−0
@@ -186,3 +186,17 @@ quiet_cmd_gzip = GZIP $@ · 185 unmodified lines
186cmd_gzip = gzip -f -9 < $< > $@186cmd_gzip = gzip -f -9 < $< > $@
187 187
188 188
189# Bzip2
190# ---------------------------------------------------------------------------
191
192# Bzip2 does not include size in file... so we have to fake that
193size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
194
195quiet_cmd_bzip2 = BZIP2 $@
196cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
197
198# Lzma
199# ---------------------------------------------------------------------------
200
201quiet_cmd_lzma = LZMA $@
202cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
scripts/bin_size+10−0
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3if [ $# = 0 ] ; then
4 echo Usage: $0 file
5fi
6
7size_dec=`stat -c "%s" $1`
8size_hex_echo_string=`printf "%08x" $size_dec |
9 sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
10/bin/echo -ne $size_hex_echo_string
scripts/gcc-x86_32-has-stack-protector.sh+8−0
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then
5 echo y
6else
7 echo n
8fi
scripts/gcc-x86_64-has-stack-protector.sh+4−2
@@ -1,6 +1,8 @@
1#!/bin/sh1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $1 -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then4if [ "$?" -eq "0" ] ; then
5 echo $25 echo y
6else
7 echo n
6fi8fi
scripts/gen_initramfs_list.sh+12−6
@@ -5,7 +5,7 @@ · 4 unmodified lines
5# Released under the terms of the GNU GPL5# Released under the terms of the GNU GPL
6#6#
7# Generate a cpio packed initramfs. It uses gen_init_cpio to generate7# Generate a cpio packed initramfs. It uses gen_init_cpio to generate
8# the cpio archive, and gzip to pack it.8# the cpio archive, and then compresses it.
9# The script may also be used to generate the inputfile used for gen_init_cpio9# The script may also be used to generate the inputfile used for gen_init_cpio
10# This script assumes that gen_init_cpio is located in usr/ directory10# This script assumes that gen_init_cpio is located in usr/ directory
11 11
@@ -16,8 +16,8 @@ usage() { · 4 unmodified lines
16cat << EOF16cat << EOF
17Usage:17Usage:
18$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...18$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
19 -o <file> Create gzipped initramfs file named <file> using19 -o <file> Create compressed initramfs file named <file> using
20 gen_init_cpio and gzip20 gen_init_cpio and compressor depending on the extension
21 -u <uid> User ID to map to user ID 0 (root).21 -u <uid> User ID to map to user ID 0 (root).
22 <uid> is only meaningful if <cpio_source> is a22 <uid> is only meaningful if <cpio_source> is a
23 directory. "squash" forces all files to uid 0.23 directory. "squash" forces all files to uid 0.
@@ -225,6 +225,7 @@ cpio_list= · 201 unmodified lines
225output="/dev/stdout"225output="/dev/stdout"
226output_file=""226output_file=""
227is_cpio_compressed=227is_cpio_compressed=
228compr="gzip -9 -f"
228 229
229arg="$1"230arg="$1"
230case "$arg" in231case "$arg" in
@@ -233,11 +234,15 @@ case "$arg" in · 2 unmodified lines
233 echo "deps_initramfs := \\"234 echo "deps_initramfs := \\"
234 shift235 shift
235 ;;236 ;;
236 "-o") # generate gzipped cpio image named $1237 "-o") # generate compressed cpio image named $1
237 shift238 shift
238 output_file="$1"239 output_file="$1"
239 cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"240 cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"
240 output=${cpio_list}241 output=${cpio_list}
242 echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f"
243 echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f"
244 echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
245 echo "$output_file" | grep -q "\.cpio$" && compr="cat"
241 shift246 shift
242 ;;247 ;;
243esac248esac
@@ -274,7 +279,7 @@ while [ $# -gt 0 ]; do · 30 unmodified lines
274 esac279 esac
275done280done
276 281
277# If output_file is set we will generate cpio archive and gzip it282# If output_file is set we will generate cpio archive and compress it
278# we are carefull to delete tmp files283# we are carefull to delete tmp files
279if [ ! -z ${output_file} ]; then284if [ ! -z ${output_file} ]; then
280 if [ -z ${cpio_file} ]; then285 if [ -z ${cpio_file} ]; then
@@ -287,7 +292,8 @@ if [ ! -z ${output_file} ]; then · 6 unmodified lines
287 if [ "${is_cpio_compressed}" = "compressed" ]; then292 if [ "${is_cpio_compressed}" = "compressed" ]; then
288 cat ${cpio_tfile} > ${output_file}293 cat ${cpio_tfile} > ${output_file}
289 else294 else
290 cat ${cpio_tfile} | gzip -f -9 - > ${output_file}295 (cat ${cpio_tfile} | ${compr} - > ${output_file}) \
296 || (rm -f ${output_file} ; false)
291 fi297 fi
292 [ -z ${cpio_file} ] && rm ${cpio_tfile}298 [ -z ${cpio_file} ] && rm ${cpio_tfile}
293fi299fi
scripts/mod/modpost.c+4−1
@@ -415,8 +415,9 @@ static int parse_elf(struct elf_info *info, const char *filename) · 414 unmodified lines
415 const char *secstrings415 const char *secstrings
416 = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;416 = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
417 const char *secname;417 const char *secname;
418 int nobits = sechdrs[i].sh_type == SHT_NOBITS;
418 419
419 if (sechdrs[i].sh_offset > info->size) {420 if (!nobits && sechdrs[i].sh_offset > info->size) {
420 fatal("%s is truncated. sechdrs[i].sh_offset=%lu > "421 fatal("%s is truncated. sechdrs[i].sh_offset=%lu > "
421 "sizeof(*hrd)=%zu\n", filename,422 "sizeof(*hrd)=%zu\n", filename,
422 (unsigned long)sechdrs[i].sh_offset,423 (unsigned long)sechdrs[i].sh_offset,
@@ -425,6 +426,8 @@ static int parse_elf(struct elf_info *info, const char *filename) · 2 unmodified lines
425 }426 }
426 secname = secstrings + sechdrs[i].sh_name;427 secname = secstrings + sechdrs[i].sh_name;
427 if (strcmp(secname, ".modinfo") == 0) {428 if (strcmp(secname, ".modinfo") == 0) {
429 if (nobits)
430 fatal("%s has NOBITS .modinfo\n", filename);
428 info->modinfo = (void *)hdr + sechdrs[i].sh_offset;431 info->modinfo = (void *)hdr + sechdrs[i].sh_offset;
429 info->modinfo_len = sechdrs[i].sh_size;432 info->modinfo_len = sechdrs[i].sh_size;
430 } else if (strcmp(secname, "__ksymtab") == 0)433 } else if (strcmp(secname, "__ksymtab") == 0)