aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-07-23 10:47:25 -0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2025-07-24 19:38:53 +0200
commit42f22e7c8f786ab23f88e86879a104ed44afdd7f (patch)
tree222627d7781b639371cfe8fa17d1991c9f678ab9
parent86fbb4cbb82d11db5a31841386db98ffc5ae4bdc (diff)
downloadglibc-akhuettel/wip.zip
glibc-akhuettel/wip.tar.gz
glibc-akhuettel/wip.tar.bz2
elf: Check SFrame on tst-dl_find_object.cakhuettel/wip
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>
-rw-r--r--elf/tst-dl_find_object.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/elf/tst-dl_find_object.c b/elf/tst-dl_find_object.c
index 96ec591..d85eb21 100644
--- a/elf/tst-dl_find_object.c
+++ b/elf/tst-dl_find_object.c
@@ -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 ();