aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mksysmap
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /scripts/mksysmap
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'scripts/mksysmap')
-rw-r--r--scripts/mksysmap44
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/mksysmap b/scripts/mksysmap
new file mode 100644
index 00000000000..a6430e05972
--- /dev/null
+++ b/scripts/mksysmap
@@ -0,0 +1,44 @@
1#!/bin/sh -x
2# Based on the vmlinux file create the System.map file
3# System.map is used by module-init tools and some debugging
4# tools to retreive the actual addresses of symbols in the kernel.
5#
6# Usage
7# mksysmap vmlinux System.map
8
9
10#####
11# Generate System.map (actual filename passed as second argument)
12
13# $NM produces the following output:
14# f0081e80 T alloc_vfsmnt
15
16# The second row specify the type of the symbol:
17# A = Absolute
18# B = Uninitialised data (.bss)
19# C = Comon symbol
20# D = Initialised data
21# G = Initialised data for small objects
22# I = Indirect reference to another symbol
23# N = Debugging symbol
24# R = Read only
25# S = Uninitialised data for small objects
26# T = Text code symbol
27# U = Undefined symbol
28# V = Weak symbol
29# W = Weak symbol
30# Corresponding small letters are local symbols
31
32# For System.map filter away:
33# a - local absolute symbols
34# U - undefined global symbols
35# w - local weak symbols
36
37# readprofile starts reading symbols when _stext is found, and
38# continue until it finds a symbol which is not either of 'T', 't',
39# 'W' or 'w'. __crc_ are 'A' and placed in the middle
40# so we just ignore them to let readprofile continue to work.
41# (At least sparc64 has __crc_ in the middle).
42
43$NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
44