From: Xi Ruoyao <xry111@mengyan1223.wang>
To: Carlos O'Donell <carlos@redhat.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
GNU C Library <libc-alpha@sourceware.org>
Cc: syq@debian.org, Joseph Myers <joseph@codesourcery.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
xry111@mengyan1223.wang
Subject: [PATCH v3 3/3] elf: tst-dlmopen4: use target specific r_debug_offset function
Date: Sat, 29 Jan 2022 06:08:25 +0800 [thread overview]
Message-ID: <0a20f5ff9eba19fcf874932315e21f4cb1c1be14.camel@mengyan1223.wang> (raw)
In-Reply-To: <03e68d009c7a029270de44f2f2c4b7f3d787ddab.camel@mengyan1223.wang>
Fix the test failure on MIPS.
---
elf/tst-dlmopen4.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/elf/tst-dlmopen4.c b/elf/tst-dlmopen4.c
index d8bcf7e9d5..28e052f199 100644
--- a/elf/tst-dlmopen4.c
+++ b/elf/tst-dlmopen4.c
@@ -25,16 +25,10 @@
#include <support/check.h>
#include <support/test-driver.h>
-#ifndef ELF_MACHINE_GET_R_DEBUG
-# define ELF_MACHINE_GET_R_DEBUG(d) \
- (__extension__ ({ \
- struct r_debug_extended *debug; \
- if ((d)->d_tag == DT_DEBUG) \
- debug = (struct r_debug_extended *) (d)->d_un.d_ptr; \
- else \
- debug = NULL; \
- debug; }))
-#endif
+#define E(x) x
+#define EW(x) ElfW(x)
+#define R_DEBUG_IN_PROCESS
+#include <elfxx-r_debug.h>
static int
do_test (void)
@@ -44,7 +38,7 @@ do_test (void)
for (d = _DYNAMIC; d->d_tag != DT_NULL; ++d)
{
- debug = ELF_MACHINE_GET_R_DEBUG (d);
+ debug = (struct r_debug_extended *) r_debug_offset (d, 0, 0);
if (debug != NULL)
break;
}
--
2.35.0
next prev parent reply other threads:[~2022-01-28 22:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 18:56 [PATCH] mips: pldd: support DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL Xi Ruoyao
2022-01-28 20:45 ` H.J. Lu
2022-01-28 20:48 ` Adhemerval Zanella
2022-01-28 20:50 ` Carlos O'Donell
2022-01-28 21:17 ` [PATCH v2] " Xi Ruoyao
2022-01-28 21:22 ` H.J. Lu
2022-01-28 22:04 ` [PATCH v3 0/3] mips: add target-specific r_debug offset Xi Ruoyao
2022-01-28 22:05 ` [PATCH v3 1/3] add sysdeps/{generic,mips}/elfxx-r_debug.h Xi Ruoyao
2022-01-28 22:08 ` Xi Ruoyao [this message]
2022-01-28 22:07 ` [PATCH v3 2/3] pldd: use target-specific r_debug_offset function Xi Ruoyao
2022-01-29 19:41 ` [PATCH] elf: Add <dl-r_debug.h> H.J. Lu
2022-01-29 19:56 ` Xi Ruoyao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a20f5ff9eba19fcf874932315e21f4cb1c1be14.camel@mengyan1223.wang \
--to=xry111@mengyan1223.wang \
--cc=carlos@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=syq@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).