mbox series

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

Message ID 20240726043246.10999-1-jim.shu@sifive.com (mailing list archive)
Headers show
Series Let gen-vdso tool to use internal ELF header | expand

Message

Jim Shu July 26, 2024, 4:32 a.m. UTC
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(-)

Comments

Richard Henderson July 26, 2024, 5:28 a.m. UTC | #1
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~
Jim Shu July 26, 2024, 6:44 a.m. UTC | #2
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~