* [PATCH 0/2] Let gen-vdso tool to use internal ELF header
@ 2024-07-26 4:32 Jim Shu
2024-07-26 4:32 ` [PATCH 1/2] include/elf.h: align ELF macro name with glibc Jim Shu
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jim Shu @ 2024-07-26 4:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Richard Henderson, Jim Shu
Let gen-vdso tool to use QEMU's internal ELF header. It could avoid
compatibility issue of glibc version in the environment. QEMU RISC-V
zicfiss/lp extension patchset will add "EM_RISCV" symbol to it. This
symbol is not supported in the legacy glibc.
Jim Shu (2):
include/elf.h: align ELF macro name with glibc
linux-user: Add QEMU include path to vdso
include/elf.h | 2 +-
linux-user/meson.build | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] include/elf.h: align ELF macro name with glibc
2024-07-26 4:32 [PATCH 0/2] Let gen-vdso tool to use internal ELF header Jim Shu
@ 2024-07-26 4:32 ` Jim Shu
2024-07-26 5:18 ` Richard Henderson
2024-07-26 4:32 ` [PATCH 2/2] linux-user: Add QEMU include path to vdso Jim Shu
2024-07-26 5:28 ` [PATCH 0/2] Let gen-vdso tool to use internal ELF header Richard Henderson
2 siblings, 1 reply; 7+ messages in thread
From: Jim Shu @ 2024-07-26 4:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Richard Henderson, Jim Shu
Rename DT_BINDNOW to DT_BIND_NOW to align with glibc header: "elf/elf.h"
Signed-off-by: Jim Shu <jim.shu@sifive.com>
---
include/elf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/elf.h b/include/elf.h
index e7259ec366..ef47b5e2ad 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -235,7 +235,7 @@ typedef struct mips_elf_abiflags_v0 {
#define DT_DEBUG 21
#define DT_TEXTREL 22
#define DT_JMPREL 23
-#define DT_BINDNOW 24
+#define DT_BIND_NOW 24
#define DT_INIT_ARRAY 25
#define DT_FINI_ARRAY 26
#define DT_INIT_ARRAYSZ 27
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] linux-user: Add QEMU include path to vdso
2024-07-26 4:32 [PATCH 0/2] Let gen-vdso tool to use internal ELF header Jim Shu
2024-07-26 4:32 ` [PATCH 1/2] include/elf.h: align ELF macro name with glibc Jim Shu
@ 2024-07-26 4:32 ` Jim Shu
2024-07-26 5:32 ` Richard Henderson
2024-07-26 5:28 ` [PATCH 0/2] Let gen-vdso tool to use internal ELF header Richard Henderson
2 siblings, 1 reply; 7+ messages in thread
From: Jim Shu @ 2024-07-26 4:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Richard Henderson, Jim Shu
Add include path to 'gen-vdso.c' to get ELF header in QEMU source.
Signed-off-by: Jim Shu <jim.shu@sifive.com>
---
linux-user/meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/linux-user/meson.build b/linux-user/meson.build
index bc41e8c3bc..ccce4f7e70 100644
--- a/linux-user/meson.build
+++ b/linux-user/meson.build
@@ -30,8 +30,11 @@ linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: files('sem
syscall_nr_generators = {}
+# It requires "include/elf.h"
+gen_vdso_inc = include_directories('..' / 'include')
gen_vdso_exe = executable('gen-vdso', 'gen-vdso.c',
- native: true, build_by_default: false)
+ native: true, build_by_default: false,
+ include_directories: gen_vdso_inc)
gen_vdso = generator(gen_vdso_exe, output: '@BASENAME@.c.inc',
arguments: ['-o', '@OUTPUT@', '@EXTRA_ARGS@', '@INPUT@'])
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] include/elf.h: align ELF macro name with glibc
2024-07-26 4:32 ` [PATCH 1/2] include/elf.h: align ELF macro name with glibc Jim Shu
@ 2024-07-26 5:18 ` Richard Henderson
0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2024-07-26 5:18 UTC (permalink / raw)
To: Jim Shu, qemu-devel; +Cc: Laurent Vivier
On 7/26/24 14:32, Jim Shu wrote:
> Rename DT_BINDNOW to DT_BIND_NOW to align with glibc header: "elf/elf.h"
>
> Signed-off-by: Jim Shu<jim.shu@sifive.com>
> ---
> include/elf.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Let gen-vdso tool to use internal ELF header
2024-07-26 4:32 [PATCH 0/2] Let gen-vdso tool to use internal ELF header Jim Shu
2024-07-26 4:32 ` [PATCH 1/2] include/elf.h: align ELF macro name with glibc Jim Shu
2024-07-26 4:32 ` [PATCH 2/2] linux-user: Add QEMU include path to vdso Jim Shu
@ 2024-07-26 5:28 ` Richard Henderson
2024-07-26 6:44 ` Jim Shu
2 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2024-07-26 5:28 UTC (permalink / raw)
To: Jim Shu, qemu-devel; +Cc: Laurent Vivier
On 7/26/24 14:32, Jim Shu wrote:
> Let gen-vdso tool to use QEMU's internal ELF header. It could avoid
> compatibility issue of glibc version in the environment. QEMU RISC-V
> zicfiss/lp extension patchset will add "EM_RISCV" symbol to it. This
> symbol is not supported in the legacy glibc.
I see EM_RISCV added added (by myself, amusingly, as part of a bulk merge) in 2016,
included in glibc 2.24.
From repology, vs our oldest supported OS,
centos stream 8: 2.28
debian 11: 2.31
fedora 39: 2.37
opensuse leap 15: 2.28
ubuntu 20.04: 2.31
So unless there's some *other* symbol you require, all supported OS will have EM_RISCV.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] linux-user: Add QEMU include path to vdso
2024-07-26 4:32 ` [PATCH 2/2] linux-user: Add QEMU include path to vdso Jim Shu
@ 2024-07-26 5:32 ` Richard Henderson
0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2024-07-26 5:32 UTC (permalink / raw)
To: Jim Shu, qemu-devel; +Cc: Laurent Vivier
On 7/26/24 14:32, Jim Shu wrote:
> Add include path to 'gen-vdso.c' to get ELF header in QEMU source.
>
> Signed-off-by: Jim Shu <jim.shu@sifive.com>
> ---
> linux-user/meson.build | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/meson.build b/linux-user/meson.build
> index bc41e8c3bc..ccce4f7e70 100644
> --- a/linux-user/meson.build
> +++ b/linux-user/meson.build
> @@ -30,8 +30,11 @@ linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: files('sem
>
> syscall_nr_generators = {}
>
> +# It requires "include/elf.h"
> +gen_vdso_inc = include_directories('..' / 'include')
> gen_vdso_exe = executable('gen-vdso', 'gen-vdso.c',
> - native: true, build_by_default: false)
> + native: true, build_by_default: false,
> + include_directories: gen_vdso_inc)
> gen_vdso = generator(gen_vdso_exe, output: '@BASENAME@.c.inc',
> arguments: ['-o', '@OUTPUT@', '@EXTRA_ARGS@', '@INPUT@'])
>
Ok, I guess. I'm not convinced we need this. I tend to think our elf.h is way out of
date, and perhaps should be removed. I suspect we only carry it around now for windows
hosts, compiling the system loaders.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Let gen-vdso tool to use internal ELF header
2024-07-26 5:28 ` [PATCH 0/2] Let gen-vdso tool to use internal ELF header Richard Henderson
@ 2024-07-26 6:44 ` Jim Shu
0 siblings, 0 replies; 7+ messages in thread
From: Jim Shu @ 2024-07-26 6:44 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Laurent Vivier
Hi Richard,
Thanks for your feedback.
I think it is reasonable. I will drop this patchset.
Regards,
Jim Shu
On Fri, Jul 26, 2024 at 1:28 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 7/26/24 14:32, Jim Shu wrote:
> > Let gen-vdso tool to use QEMU's internal ELF header. It could avoid
> > compatibility issue of glibc version in the environment. QEMU RISC-V
> > zicfiss/lp extension patchset will add "EM_RISCV" symbol to it. This
> > symbol is not supported in the legacy glibc.
>
> I see EM_RISCV added added (by myself, amusingly, as part of a bulk merge) in 2016,
> included in glibc 2.24.
>
> From repology, vs our oldest supported OS,
>
> centos stream 8: 2.28
> debian 11: 2.31
> fedora 39: 2.37
> opensuse leap 15: 2.28
> ubuntu 20.04: 2.31
>
> So unless there's some *other* symbol you require, all supported OS will have EM_RISCV.
>
>
> r~
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-26 6:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 4:32 [PATCH 0/2] Let gen-vdso tool to use internal ELF header Jim Shu
2024-07-26 4:32 ` [PATCH 1/2] include/elf.h: align ELF macro name with glibc Jim Shu
2024-07-26 5:18 ` Richard Henderson
2024-07-26 4:32 ` [PATCH 2/2] linux-user: Add QEMU include path to vdso Jim Shu
2024-07-26 5:32 ` Richard Henderson
2024-07-26 5:28 ` [PATCH 0/2] Let gen-vdso tool to use internal ELF header Richard Henderson
2024-07-26 6:44 ` Jim Shu
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 NNTP newsgroup(s).