[PATCH 0/2] Let gen-vdso tool to use internal ELF header

Jim Shu posted 2 patches 1 month, 1 week ago
include/elf.h          | 2 +-
linux-user/meson.build | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
[PATCH 0/2] Let gen-vdso tool to use internal ELF header
Posted by Jim Shu 1 month, 1 week ago
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
Re: [PATCH 0/2] Let gen-vdso tool to use internal ELF header
Posted by Richard Henderson 1 month, 1 week ago
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~
Re: [PATCH 0/2] Let gen-vdso tool to use internal ELF header
Posted by Jim Shu 1 month, 1 week ago
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~