mirror of
https://github.com/0intro/libelf
synced 2025-03-12 17:42:59 +03:00
export type, machine, version and entry header fields
This commit is contained in:
parent
d62e3c29b5
commit
25e679c0c2
@ -28,6 +28,10 @@ struct Fhdr {
|
||||
...
|
||||
|
||||
/* ELF Header */
|
||||
uint16_t type;
|
||||
uint16_t machine;
|
||||
uint32_t version;
|
||||
uint64_t entry;
|
||||
uint64_t phoff;
|
||||
uint64_t shoff;
|
||||
uint16_t ehsize; /* ELF Header size */
|
||||
|
10
elf.c
10
elf.c
@ -164,6 +164,11 @@ readelf32ehdr(FILE *f, Fhdr *fp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
fp->type = e.type;
|
||||
fp->machine = e.machine;
|
||||
fp->version = e.version;
|
||||
fp->entry = e.entry;
|
||||
|
||||
fp->shoff = e.shoff;
|
||||
fp->phoff = e.phoff;
|
||||
fp->phnum = e.phnum;
|
||||
@ -229,6 +234,11 @@ readelf64ehdr(FILE *f, Fhdr *fp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
fp->type = e.type;
|
||||
fp->machine = e.machine;
|
||||
fp->version = e.version;
|
||||
fp->entry = e.entry;
|
||||
|
||||
fp->shoff = e.shoff;
|
||||
fp->phoff = e.phoff;
|
||||
fp->phnum = e.phnum;
|
||||
|
Loading…
x
Reference in New Issue
Block a user