mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-27 12:15:39 +03:00
elf: Check SFrame on tst-dl_find_object.c
If SFrame is enable check if DLFO_FLAG_SFRAME is set (since sframe support is added by default) and if dlfo_sframe has the expected value. Checked on aarch64-linux-gnu and x86_64-linux-gnu. Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -122,6 +122,14 @@ check (void *address,
|
||||
address, actual.dlfo_eh_count, expected->dlfo_eh_count);
|
||||
}
|
||||
#endif
|
||||
if (actual.dlfo_flags & DLFO_FLAG_SFRAME
|
||||
&& actual.dlfo_sframe != expected->dlfo_sframe)
|
||||
{
|
||||
support_record_failure ();
|
||||
printf ("%s:%d: error: %p: sframe is %p, expected %p\n",
|
||||
__FILE__, line,
|
||||
address, actual.dlfo_sframe, expected->dlfo_sframe);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check that unwind data for the main executable and the dynamic
|
||||
@@ -180,6 +188,12 @@ do_test (void)
|
||||
dlfo.dlfo_eh_frame, ret);
|
||||
TEST_COMPARE (ret, 0);
|
||||
TEST_VERIFY (dlfo.dlfo_eh_frame != NULL);
|
||||
#if ENABLE_SFRAME
|
||||
TEST_VERIFY ((dlfo.dlfo_flags & DLFO_FLAG_SFRAME) == DLFO_FLAG_SFRAME);
|
||||
TEST_VERIFY (dlfo.dlfo_sframe != NULL);
|
||||
#else
|
||||
TEST_VERIFY ((dlfo.dlfo_flags & DLFO_FLAG_SFRAME) != DLFO_FLAG_SFRAME);
|
||||
#endif
|
||||
}
|
||||
|
||||
check_initial ();
|
||||
|
||||
Reference in New Issue
Block a user