public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] aarch64: morello: add D_PTR_RW
@ 2022-10-27 13:59 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-10-27 13:59 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c62607b9006c23b2f21f1bc5b36b048ce93071ec
commit c62607b9006c23b2f21f1bc5b36b048ce93071ec
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Sep 1 16:43:19 2022 +0100
aarch64: morello: add D_PTR_RW
Writable version of D_PTR, required for updating GOT[1] and GOT[2].
Diff:
---
sysdeps/aarch64/ldsodefs.h | 4 ++++
sysdeps/aarch64/morello/dl-machine.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/ldsodefs.h b/sysdeps/aarch64/ldsodefs.h
index b0b23df93c..e86c7e1e0e 100644
--- a/sysdeps/aarch64/ldsodefs.h
+++ b/sysdeps/aarch64/ldsodefs.h
@@ -25,6 +25,10 @@
#ifdef __CHERI_PURE_CAPABILITY__
# define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
elf_machine_rela_relative (map, relative)
+
+#define D_PTR_RW(map, i) \
+ (dl_relocate_ld (map) ? (map)->i->d_un.d_ptr \
+ : dl_rw_ptr ((map), (map)->i->d_un.d_ptr))
#endif
struct La_aarch64_regs;
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h
index 11e026302c..0f681b1925 100644
--- a/sysdeps/aarch64/morello/dl-machine.h
+++ b/sysdeps/aarch64/morello/dl-machine.h
@@ -53,7 +53,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
extern void _dl_runtime_resolve (ElfW(Word));
extern void _dl_runtime_profile (ElfW(Word));
- got = (uintptr_t *) D_PTR (l, l_info[DT_PLTGOT]);
+ got = (uintptr_t *) D_PTR_RW (l, l_info[DT_PLTGOT]);
if (got[1])
{
l->l_mach.plt = dl_rx_ptr (l, got[1]);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/arm/morello/main] aarch64: morello: add D_PTR_RW
@ 2022-11-23 14:48 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-11-23 14:48 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=096943551e02aef644c7f180ee7a1f3474141e80
commit 096943551e02aef644c7f180ee7a1f3474141e80
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Sep 1 16:43:19 2022 +0100
aarch64: morello: add D_PTR_RW
Writable version of D_PTR, required for updating GOT[1] and GOT[2].
Diff:
---
sysdeps/aarch64/ldsodefs.h | 4 ++++
sysdeps/aarch64/morello/dl-machine.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/ldsodefs.h b/sysdeps/aarch64/ldsodefs.h
index b0b23df93c..e86c7e1e0e 100644
--- a/sysdeps/aarch64/ldsodefs.h
+++ b/sysdeps/aarch64/ldsodefs.h
@@ -25,6 +25,10 @@
#ifdef __CHERI_PURE_CAPABILITY__
# define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
elf_machine_rela_relative (map, relative)
+
+#define D_PTR_RW(map, i) \
+ (dl_relocate_ld (map) ? (map)->i->d_un.d_ptr \
+ : dl_rw_ptr ((map), (map)->i->d_un.d_ptr))
#endif
struct La_aarch64_regs;
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h
index 11e026302c..0f681b1925 100644
--- a/sysdeps/aarch64/morello/dl-machine.h
+++ b/sysdeps/aarch64/morello/dl-machine.h
@@ -53,7 +53,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
extern void _dl_runtime_resolve (ElfW(Word));
extern void _dl_runtime_profile (ElfW(Word));
- got = (uintptr_t *) D_PTR (l, l_info[DT_PLTGOT]);
+ got = (uintptr_t *) D_PTR_RW (l, l_info[DT_PLTGOT]);
if (got[1])
{
l->l_mach.plt = dl_rx_ptr (l, got[1]);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/arm/morello/main] aarch64: morello: add D_PTR_RW
@ 2022-10-26 15:20 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-10-26 15:20 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f346f35c50859f66773298dffdfc077f12a4d054
commit f346f35c50859f66773298dffdfc077f12a4d054
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Sep 1 16:43:19 2022 +0100
aarch64: morello: add D_PTR_RW
Writable version of D_PTR, required for updating GOT[1] and GOT[2].
Diff:
---
sysdeps/aarch64/ldsodefs.h | 4 ++++
sysdeps/aarch64/morello/dl-machine.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/ldsodefs.h b/sysdeps/aarch64/ldsodefs.h
index b0b23df93c..e86c7e1e0e 100644
--- a/sysdeps/aarch64/ldsodefs.h
+++ b/sysdeps/aarch64/ldsodefs.h
@@ -25,6 +25,10 @@
#ifdef __CHERI_PURE_CAPABILITY__
# define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
elf_machine_rela_relative (map, relative)
+
+#define D_PTR_RW(map, i) \
+ (dl_relocate_ld (map) ? (map)->i->d_un.d_ptr \
+ : dl_rw_ptr ((map), (map)->i->d_un.d_ptr))
#endif
struct La_aarch64_regs;
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h
index 11e026302c..0f681b1925 100644
--- a/sysdeps/aarch64/morello/dl-machine.h
+++ b/sysdeps/aarch64/morello/dl-machine.h
@@ -53,7 +53,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
extern void _dl_runtime_resolve (ElfW(Word));
extern void _dl_runtime_profile (ElfW(Word));
- got = (uintptr_t *) D_PTR (l, l_info[DT_PLTGOT]);
+ got = (uintptr_t *) D_PTR_RW (l, l_info[DT_PLTGOT]);
if (got[1])
{
l->l_mach.plt = dl_rx_ptr (l, got[1]);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/arm/morello/main] aarch64: morello: add D_PTR_RW
@ 2022-10-12 14:17 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-10-12 14:17 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a1d26f7b1d8d78588c6fd301515a07f92883b150
commit a1d26f7b1d8d78588c6fd301515a07f92883b150
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Sep 1 16:43:19 2022 +0100
aarch64: morello: add D_PTR_RW
Writable version of D_PTR, required for updating GOT[1] and GOT[2].
Diff:
---
sysdeps/aarch64/ldsodefs.h | 4 ++++
sysdeps/aarch64/morello/dl-machine.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/ldsodefs.h b/sysdeps/aarch64/ldsodefs.h
index b0b23df93c..e86c7e1e0e 100644
--- a/sysdeps/aarch64/ldsodefs.h
+++ b/sysdeps/aarch64/ldsodefs.h
@@ -25,6 +25,10 @@
#ifdef __CHERI_PURE_CAPABILITY__
# define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
elf_machine_rela_relative (map, relative)
+
+#define D_PTR_RW(map, i) \
+ (dl_relocate_ld (map) ? (map)->i->d_un.d_ptr \
+ : dl_rw_ptr ((map), (map)->i->d_un.d_ptr))
#endif
struct La_aarch64_regs;
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h
index 4eaffc2cf6..e6c69fc321 100644
--- a/sysdeps/aarch64/morello/dl-machine.h
+++ b/sysdeps/aarch64/morello/dl-machine.h
@@ -53,7 +53,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
extern void _dl_runtime_resolve (ElfW(Word));
extern void _dl_runtime_profile (ElfW(Word));
- got = (uintptr_t *) D_PTR (l, l_info[DT_PLTGOT]);
+ got = (uintptr_t *) D_PTR_RW (l, l_info[DT_PLTGOT]);
if (got[1])
{
l->l_mach.plt = (uint64_t) got[1] + l->l_addr;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-23 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 13:59 [glibc/arm/morello/main] aarch64: morello: add D_PTR_RW Szabolcs Nagy
-- strict thread matches above, loose matches on Subject: below --
2022-11-23 14:48 Szabolcs Nagy
2022-10-26 15:20 Szabolcs Nagy
2022-10-12 14:17 Szabolcs Nagy
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).