https://stackoverflow.com/questions/31333337/how-can-i-get-the-source-code-path-file-names-from-an-elf-filecompired-with

readelf holds the key, but you don't want to dump strings willy-nilly. Use the -wi option to properly format the info.
For example, create a shell script thus:

readelf -wi $1 | grep -B1 DW_AT_comp_dir | \
awk '/DW_AT_name/{name = $NF; getline; print $NF"/"name}'

which further summarizes the output of readelf -wi.

how can i get the source code path && file names from an ELF file(compired with -g)?的更多相关文章

  1. How to build the Robotics Library from source code on Windows

    The Robotics Library is an open source C++ library for robot kinematics, motion planning and control ...

  2. view class source code with JAD plugin in Eclipse

    The default class viewer doesn't decompile the class file so you cannot open and check the source co ...

  3. convert source code files to pdf format in python

    import os import sys def find_file(root_dir, type): dirs_pool = [root_dir] dest_pool = [] def scan_d ...

  4. 用source code编译安装Xdebug

    1. Unpack the tarball: tar -xzf xdebug-2.2.x.tgz.  Note that you do not need to unpack the tarball i ...

  5. 3 Ways of JDK Source Code Attachment in Eclipse---reference

    You wanna look at a JVM class while you are coding and you cannot. Here is the solution. First of al ...

  6. Indenting source code

    Artistic Style 1.15.3 A Free , Fast and Small Automatic Formatterfor C , C++ , C# , Java Source Code ...

  7. [转]Native Java Bytecode Debugging without Source Code

    link from:http://www.crowdstrike.com/blog/native-java-bytecode-debugging-without-source-code/index.h ...

  8. Learning from the CakePHP source code - Part I

    最近开始痛定思痛,研究cakephp的源码. 成长的路上从来没有捷径,没有小聪明. 只有傻傻的努力,你才能听到到成长的声音. 下面这篇文章虽然过时了,但是还是可以看到作者的精神,仿佛与作者隔着时空的交 ...

  9. Learning English From Android Source Code:1

    英语在软件行业的重要作用不言自明,尤其是做国际项目和写国际软件,好的英语表达是项目顺利进行的必要条件.纵观眼下的IT行业.可以流利的与国外客户英文口语交流的程序猿占比并非非常高.要想去国际接轨,语言这 ...

随机推荐

  1. python post get请求

    安装 Requests pip install requests import requests requests.get('https://github.com/timeline.json') 使用 ...

  2. 【BZOJ】3538: [Usaco2014 Open]Dueling GPS(spfa)

    http://www.lydsy.com/JudgeOnline/problem.php?id=3538 题意不要理解错QAQ,是说当前边(u,v)且u到n的最短距离中包含这条边,那么这条边就不警告. ...

  3. jquery js 动态加载 js文件

    jquery方法 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww ...

  4. centos6.5安装apache2

    参考 http://my.oschina.net/u/593517/blog/340289 http://blog.csdn.net/hkmaike/article/details/9732177

  5. Android--推断文本文件编码

    方法1:利用windows文本文件编码特点. windows下.Unicode.Unicode big endian和UTF-8编码的txt文件的开头会多出几个字节,各自是FF.FE(Unicode) ...

  6. ie tbody table 兼容方法

    IE6-IE9中tbody的innerHTML不能赋值,重现代码如下 Js代码 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 ...

  7. 房间WIFI信号不好怎么办?——无线路由桥接(WDS)

    背景 1.无线路由在客厅,房间的WIFI信号很差,只有1-2格,虽说是100M的网速,但是从客厅到房间要经过3道墙!电脑的无线接收功能一般都很一般,网速不好理所当然. 2.弄一根网线从客厅连接起来很傻 ...

  8. Ubuntu使用yah3c连接校园网

    虽然网上有,但是我还是把这当作学习的一个过程记录下来,以备不时之需. 刚开始总是以为要上校园网就要用inode,所以总是百度谷歌不到方法,后来才知道yah3c不等同于inode,二者应该是并行的关系. ...

  9. iOS-.pch如何使用

    今天我们要说的是.pch这个文件 我相信大家并不陌生,因为如果是新手开发工程师 总会被它搞得总报错误. 那么我们要知道.pch到底是干什么的,说白了就是一个预编译文件,在运行程序之前,要对头文件等一些 ...

  10. vs git .vs12.suo

    GIT无法自动忽略SUO文件的解决方法 最近发现一个巨烦人的问题,项目里明明已经通过gitignore忽略了.suo文件,但是每次git pull的时候总是还得到.suo文件冲突的提示,也就是说git ...