mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
FreeBSD: only set osrel for executables.
This commit is contained in:
parent
e23f5b6a14
commit
407c00c2e9
@ -1147,6 +1147,12 @@ void read_and_set_osrel(DiImage* img)
|
||||
|
||||
ElfXX_Ehdr ehdr;
|
||||
ML_(img_get)(&ehdr, img, 0, sizeof(ehdr));
|
||||
|
||||
/* only set osrel for executable files, not for subsequent shared libraries */
|
||||
if (ehdr.e_type != ET_EXEC) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Skip the phdrs when we have to search the shdrs. In separate
|
||||
.debug files the phdrs might not be valid (they are a copy of
|
||||
the main ELF file) and might trigger assertions when getting
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user