binfile: ignore vdso bytes if not on Linux

Of course, this all needs improvements to be realistically useful, but
it allows us to get things at least opening. We can adjust how we
store that data to make it available on other OS's later.
This commit is contained in:
Christian Hergert
2019-05-07 22:57:50 -07:00
parent 9fcb759b52
commit e705014394

View File

@ -300,6 +300,7 @@ get_lines (const char *format,
static const uint8_t *
get_vdso_bytes (size_t *length)
{
#ifdef __linux__
static const uint8_t *bytes = NULL;
static size_t n_bytes = 0;
static gboolean has_data;
@ -343,6 +344,11 @@ get_vdso_bytes (size_t *length)
*length = n_bytes;
return bytes;
#else
if (length)
*length = 0;
return NULL;
#endif
}
bin_file_t *