c - ELF file format, what is `byte_get`?
问题描述
In readelf implementation I saw:
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
#define BYTE_GET(field) byte_get (field, sizeof (field))
But where is byte_get
defined?
I want to know that in order to edit the following line so it works fine instead of returning corrupted:
internal->sh_name = BYTE_GET (shdrs[i].sh_name)+"TEST";
解决方案
byte_get
是在 elfcomm.h 中声明并在elfcomm.c中定义的函数指针。它设置为byte_get_little_endian
或byte_get_big_endian
在readelf.c中。
推荐阅读
- python - 搜索多个页面进行匹配
- docker - Docker: 引起: java.nio.file.FileSystemException: ./conf/flow.xml.gz: 资源繁忙
- javascript - 如何过滤此数组中大于或等于 90 的标记?
- java - Twitter4J sendDirectMessage 返回页面不存在
- python - 如何使用seaborn绘制彼此相邻的独立图?
- c++ - 为什么 sscanf 不能从一个字符串中读取 uint64_t 和 char?
- angular - 在使用 Angular 5 在 AWS s3 中创建存储桶时设置 CORS
- java - replaceAll 粘贴部分不必要的额外字符串
- sql-server - 如何在 MS Access 和 SQL Server 上获得相同的 UPDATE 查询结果
- hash - 使用链接方法调整哈希表的大小