首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >英勇求购libc6-dbg

英勇求购libc6-dbg
EN

Stack Overflow用户
提问于 2017-11-17 19:28:32
回答 2查看 3.7K关注 0票数 6

我已经看过了与这个错误有关的答案。然而,我的问题是,一旦我有了libc的首次亮相,我应该放置这个库的位置是什么?

我已经为我的目标环境下载了val研读和交叉编译。我尝试了以下所有不同的组合:

  1. 我将libc放在/lib中,并在/lib/debug中进行了调试
  2. 将调试器重命名为libc.debug
  3. 导出VALGRIND_LIB以包括/lib、/lib/debug

最后但并非最不重要的是,下面是实际错误:

代码语言:javascript
复制
==29946== Memcheck, a memory error detector
==29946== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==29946== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==29946== Command: /bin/my_prog
==29946==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strcmp
valgrind:  in an object with soname matching:   ld-linux-armhf.so.3
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-armhf.so.3
valgrind:
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:
valgrind:  Cannot continue -- exiting now.  Sorry.
EN

回答 2

Stack Overflow用户

发布于 2018-11-20 02:23:31

我遇到了同样的问题,下面是我如何解决的问题:

用调试版本替换ld-xx.so in /lib路径。

这是我的案子。我正在使用Yocto构建rootfs,所以将poky/build/tmp/work/xxxx/glibc/2.26-r0/image/lib/ld-2.26.so从构建路径复制到Linux路径/lib,以取代发布版构建的原始/lib/ld-2.26.so(and ld-linux-armhf.so.3)

做完这件事后,瓦兰干得很好。

警告:在运行中的系统上交换加载程序的可能会阻塞它!这些步骤有效:

  • 将新加载程序上载到/lib之外的路径
  • 将新加载程序标记为可执行文件(chmod 755)
  • 收到(不许动!)旧装载机
  • 将新加载程序复制到/lib
票数 2
EN

Stack Overflow用户

发布于 2018-06-30 06:49:20

如果目标是glibc,则需要确保动态加载程序( dynamic,/lib/ld-linux-armhf.so.3)中不剥离.symtab。瓦兰德需要这些符号才能发挥作用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47357952

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档