mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 07:19:50 +00:00
fix: fix build_id_find_nhdr_callback build_id_note
Signed-off-by: minjie.yu <minjie.yu@unionman.com.cn>
This commit is contained in:
parent
bf3729926a
commit
30732f4e93
@ -91,12 +91,14 @@ build_id_find_nhdr_callback(struct dl_phdr_info *info, size_t size, void *data_)
|
||||
size_t offset = sizeof(ElfW(Nhdr)) +
|
||||
ALIGN_POT(note->nhdr.n_namesz, 4) +
|
||||
ALIGN_POT(note->nhdr.n_descsz, 4);
|
||||
note = (struct build_id_note *)((char *)note + offset);
|
||||
|
||||
// 05 00 00 00 04 00 00 00 4f 48 4f 53 00 01 00 00 00 00 00 00
|
||||
if (note->nhdr.n_type == 0x534f484f && note > 20) {
|
||||
if ((note->nhdr.n_type == 0x534f484f) && (len > 20)) {
|
||||
// .note.ohos.ident is not a valid PT_NOTE section, use offset in section header later
|
||||
offset = 20;
|
||||
}
|
||||
|
||||
note = (struct build_id_note *)((char *)note + offset);
|
||||
len -= offset;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user