Function report |
Source Code:kernel\bpf\stackmap.c |
Create Date:2022-07-28 13:26:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Parse build id from the note segment. This logic can be shared between* 32-bit and 64-bit system, because Elf32_Nhdr and Elf64_Nhdr are* identical.
Proto:static inline int stack_map_parse_build_id(void *page_addr, unsigned char *build_id, void *note_start, Elf32_Word note_size)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
void * | page_addr | |
unsigned char * | build_id | |
void * | note_start | |
Elf32_Word | note_size |
163 | note_offs = 0 |
166 | If note_start < page_addr || note_start + note_size < note_start Then Return -EINVAL |
170 | If note_start + note_size > page_addr + PAGE_SIZE Then Return -EINVAL |
173 | When note_offs + sizeof(Elf32_Nhdr) < note_size cycle |
174 | nhdr = note_start + note_offs |
176 | If n_type == BPF_BUILD_ID && Name size == size of "GNU" && Content size > 0 && Content size <= BPF_BUILD_ID_SIZE Then |
180 | No 3D Now!(build_id, note_start + note_offs + @a is a power of 2 value ( size of "GNU" , 4) + sizeof(Elf32_Nhdr), Content size ) |
184 | memset(build_id + Content size , 0, BPF_BUILD_ID_SIZE - Content size ) |
186 | Return 0 |
188 | new_offs = note_offs + sizeof(Elf32_Nhdr) + @a is a power of 2 value (Name size , 4) + @a is a power of 2 value (Content size , 4) |
194 | Return -EINVAL |
Name | Describe |
---|---|
stack_map_get_build_id_32 | Parse build ID from 32-bit ELF |
stack_map_get_build_id_64 | Parse build ID from 64-bit ELF |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |