📄 install
字号:
Unpack the ksymoops tar.gz file (silly me, you already did that :).Edit the Makefile to set any defaults you want.makeas root, make installTo compile and link ksymoops, you need bfd.h, libbfd and libiberty. Onmost systems, these are all part of the binutils package so installingbinutils is all that is required. On Debian systems, bfd.h (at least)is in a separate package, binutils-dev.Some people have reported problems building ksymoops, with unresolvedreferences in libbfd (htab_create, htab_find_slot_with_hash). Tryhttp://www.cs.helsinki.fi/linux/linux-kernel/2002-13/0196.html first,if that does not work, contact the binutils maintainers. This is not aksymoops problem, ksymoops only uses libbfd. Any unresolved referencesfrom libbfd are a binutils problem.Some distributions get binutils and libbfd/libiberty out of sync duringthe upgrade, and break the link of ksymoops. This has been reported onSlackware 8.[01] but other distributions may get it wrong as well. Tryinstalling a clean binutils.Building ksymoops for cross compile and debugging=================================================When you are building a kernel using a cross compiler, it may be useful tobuild a dedicated version of ksymoops for this cross compile environment.It is not necessary to do so, you can always use the native ksymoops withsuitable options (e.g. the e, t and a flags), together with environmentvariables KSYMOOPS_NM and KSYMOOPS_OBJDUMP. It may be more convenient tobuild a special version of ksymoops and install it along with the other crosscompile tools.At build time you can specify the CROSS, BFD_PREFIX, DEF_TARGET and DEF_ARCHoptions to make. For example, make BFD_PREFIX=/usr/mips64-linux \ DEF_TARGET='\"elf64-bigmips\"' \ DEF_ARCH='\"mips:8000\"' \ CROSS=mips64-linux-will build ksymoops -* using bfd files from /usr/mips64-linux/include and /usr/mips64-linux/lib (BFD_PREFIX)* the default value for -t will be "elf64-bigmips" (DEF_TARGET)* the default value for -a will be "mips:8000" (DEF_ARCH)* the result will be installed as /usr/bin/mips64-linux-ksymoops (CROSS)* it will default to using /usr/bin/mips64-linux-{nm,objdump} (INSTALL_PREFIX, /bin and CROSS).Any variable starting with DEF_ takes a string value. These variables gothrough two levels of expansion, shell (use '...' to avoid shell expansion),and make commands (prefix " with \ to preserve " characters).Building ksymoops for cross-debugging only==========================================(Or how to get to get away with not having a cross-compiler and still useksymoops on a non-native kernel/crashfile).When building and installing your host binutils, pass '--enable-targets=all' toconfigure or at least enable the targets you want to debug in addition to yourhost target. Using the 'all' route means you only need a single binutils onyour system to debug targets supported by binutils. To check that you havethis done right, run nm or objdump with '-H' and look for 'supported targets'.It should list the targets that you are interested in.After this, build ksymoops as you would normally.As an example of usage:ksymoops -v vmlinux -K -L -O -m System.map -t elf32-tradlittlemips -a mips <inputWhere vmlinux and System.map are from your cross-compiled kernel tree, and your-t/-a options are set appropriately.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -