bin utilities related
objdump
-S,
如果有源程序的话,将源程序与汇编代码混合在一起。
使用该选项时,输入的目标文件需要有调试信息,即用gcc -g生成的目标文件才可以,因为,调试信息中才有源程序信息。
--adjust-vma=offset
对于a.out,似乎没有编码节的地址,因此,dump出来的节内容都是从0开始。用该方法可以将ram起始地址作为偏移,加到节内容地址上。
When dumping information, first add offset to all the section addresses. This is useful if the section addresses do not correspond to the symbol table, which can happen when putting sections at particular addresses when using a format which can not represent section addresses, such as a.out.
objcopy
-O bfdname
--output-target=bfdname
Write the output file using the object format bfdname. See Target Selection, for more information.
设置输出文件为bfdname格式。可以使用objdump -i查看支持的目标文件,如下,其中包括binary
sparc-elf-objdump -i
BFD header file version 2.13.2.1
elf32-sparc
(header big endian, data big endian)
sparc
a.out-sunos-big
(header big endian, data big endian)
sparc
elf32-little
(header little endian, data little endian)
sparc
elf32-big
(header big endian, data big endian)
sparc
srec
(header endianness unknown, data endianness unknown)
sparc
symbolsrec
(header endianness unknown, data endianness unknown)
sparc
tekhex
(header endianness unknown, data endianness unknown)
sparc
binary
(header endianness unknown, data endianness unknown)
sparc
ihex
(header endianness unknown, data endianness unknown)
sparc
该选项可以直接将text,data,bss段都拷贝出来,似乎不需要单独的拷贝各个段。
上面和下面三句效果一样?
sparc-elf-objcopy -O binary -j .text main.elf main.text
sparc-elf-objcopy -O binary -j .data main.elf main.data
sparc-elf-objcopy -O binary -j .bss main.elf main.bss
关于BFD
The BFD data files are related to GNU Binutils. BFD file is a Binary File Descriptor Data. The Binary File Descriptor library (BFD) is the GNU Project's main mechanism for the portable manipulation of object files in a variety of formats.
感觉应该是binutil需要支持许多目标文件格式(objdump -i可以查看支持的目标文件),如果由前端来匹配所有文件格式的话,那么前端会非常复杂。因此,弄了一个BFD,前端只和BFD打交道(相应的有一个BFD格式,internal canonical(简洁的) format),而由BFD和后端的各种目标文件格式打交道。这样,前端接口可以统一。这样增加某种目标文件格式支持也相对比较简单。
-j sectionpattern
--only-section=sectionpattern
只拷贝指定的节
Copy only the indicated sections from the input file to the output file. This option may be given more than once. Note that using this option inappropriately may make the output file unusable. Wildcard characters are accepted in sectionpattern.
If the first character of sectionpattern is the exclamation point (!) then matching sections will not be copied, even if earlier use of --only-section on the same command line would otherwise copy it. For example:
--only-section=.text.* --only-section=!.text.foo
will copy all sectinos maching ’.text.*’ but not the section ’.text.foo’.
bin utilities related的更多相关文章
- OSCP Learning Notes - Privilege Escalation
Privilege Escalation Download the Basic-pentesting vitualmation from the following website: https:// ...
- NCBI下载sra数据(新)
今天要上NCBI下载sra数据发现没有下载的链接,网上查发现都是老的方法,NCBI页面已经变更,于是看了NCBI的help,并且记录下来新版的sra数据下载方法,要用NCBI的工具SRA Tool ...
- 使用ant优化android项目编译速度,提高工作效率
1.Android项目编译周期长,编译项目命令取消困难 2.在进行Android项目的编译的同时,Eclipse锁定工作区不能进行修改操作 3.在只进行资源文件的修改时,Eclipse对资源文件的修改 ...
- OSCP Learning Notes - Capstone(1)
Kioptrix Level 1.1 Walkthrough Preparation: Download the virtual machine from the following website ...
- E-Business Suite 12.2 startCD 50 Install Fails with Fatal Error: TXK Install Service oracle.apps.fnd.txk.config.ProcessStateException: OUI process failed Cannot install Web Tier Utilities
在rhel7.2上,使用startCD 50安装ebs r12.2的使用,安装到38%的时候就报错,遇到了和以下文章类似的问题: http://www.cnblogs.com/abclife/p/49 ...
- mysql workbench建表时PK,NN,UQ,BIN,UN,ZF,AI
1. [intrinsic column flags] (基本字段类型标识) - PK: primary key (column is part of a pk) 主键 - NN: not null ...
- TPLink 备份文件bin文件解析[续]
Most routers allow to save and restore configuration from files. This is cool because you can edit t ...
- Useful related java API for Android
Language_suport and Other Language-Oriented API: strings,exceptions, threads, #java.lang.* offers th ...
- 一步一步制作yaffs/yaffs2根文件系统(二)---安装BusyBox,构造/bin、/sbin、/usr、linuxr
开发环境:Ubuntu 12.04 开发板:mini2440 256M NandFlash 64M SDRAM 交叉编译器:arm-linux-gcc 4.4.3点此可下载 BusyBox版本: ...
随机推荐
- C#实现的对文件的重命名
如下C#实现对文件的重命名的方法需要传入三个string类型的参数,分别是源文件的文件目录.目的文件目录和重命名的文件名称,实现代码如下: public ExecutionResult FileRen ...
- laravel配置加解密
基于安全考虑,我们php项目配置文件中密码应该是加密的,laravel中也提供了OpenSSL 的 AES-256-CBC 来进行加密 但是如果我们项目配置的是其他加密方式,且希望以最少的改动实现读取 ...
- feign架构 原理解析
什么是feign? 来自官网的解释:Feign makes writing java http clients easier 在使用feign之前,我们怎么发送请求? 拿okhttp举例: publi ...
- cogs 1588. [USACO Feb04]距离咨询 倍增LCA
1588. [USACO Feb04]距离咨询 ★★ 输入文件:dquery.in 输出文件:dquery.out 简单对比时间限制:1 s 内存限制:256 MB [题目描述] 农夫 ...
- 【Linux】---Linux系统下各种常用命令总结
在Linux系统下,“万物皆文件”,之所以强调在强调这个概念,是因为很多人已经习惯了win系统下找找点点得那种方式和思维,因此总是会觉得linux系统下很多指令既复杂又难记.其实都是一样得东西,只是w ...
- Django admin的常用方法
一.HTTP 1.主页面 http://127.0.0.1:8000/admin/ 2.查询页面 http://127.0.0.1:8000/admin/app01/book/ 3.增加页面 http ...
- Jenkins-k8s-helm-harbor-githab-mysql-nfs微服务发布平台实战
基于 K8S 构建 Jenkins 微服务发布平台 实现汇总: 发布流程设计讲解 准备基础环境 K8s环境(部署Ingress Controller,CoreDNS,Calico/Flannel) 部 ...
- 「 从0到1学习微服务SpringCloud 」01 一起来学呀!
有想学微服务的小伙伴没?一起来从0开始学习微服务SpringCloud,我会把学习成果总结下来,供大家参考学习,有兴趣可以一起来学!如有错误,望指正! Spring .SpringBoot.Sprin ...
- 基于Bootstrap和Knockout.js的ASP.NET MVC开发实战 关于 拦截器的 学习 部分
先贴一段: 下面贴代码: 上面这段代码呢,有几个点迷糊.可以找找看
- 3分钟接入socket.io使用
WebSocket 简介 传统的客户端和服务器通信协议是HTTP:客户端发起请求,服务端进行响应,服务端从不主动勾搭客户端. 这种模式有个明显软肋,就是同步状态.而实际应用中有大量需要客户端和服务器实 ...