首页 > 解决方案 > 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";

标签: cbyteelf

解决方案


byte_get是在 elfcomm.h 中声明并在elfcomm.c中定义的函数指针。它设置为byte_get_little_endianbyte_get_big_endianreadelf.c中。


推荐阅读