On Wed, Mar 5, 2025 at 9:27 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote: > > Ping. > > On Mon, 2025-02-24 at 19:20 +0800, Xi Ruoyao wrote: > > For riscv, csky, and LoongArch, GNU hash had already become the de- > > facto > > standard when they borned, so there's no Glibc/Musl releases for them > > without GNU hash support, and the traditional SysV hash is just > > wasting > > space for them. > > > > Remove those settings and follow the distro toolchain default, which > > is > > likely --hash-style=gnu. In the past it could break vDSO self tests, > > but now the issue has been addressed by commit > > e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH"). > > > > Xi Ruoyao (3): > > riscv: vDSO: Remove --hash-style=both The patch's comment is incorrect; when I removed --hash-style=both, the output still contained the HASH, and no space was saved. --hash-style=both and after the patch are the same: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .hash HASH 0000000000000120 00000120 000000000000003c 0000000000000004 A 3 0 8 [ 2] .gnu.hash GNU_HASH 0000000000000160 00000160 0000000000000044 0000000000000000 A 3 0 8 But, --hash-style=gnu could save space: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .gnu.hash GNU_HASH 0000000000000120 00000120 0000000000000044 0000000000000000 A 2 0 8 Here is my GCC VERSION: Using built-in specs. COLLECT_GCC=/rvhome/ren.guo/source/toolchain/rv64lp64/bin/riscv64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/rvhome/ren.guo/source/toolchain/rv64lp64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/13.2.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/opt/riscv --with-sysroot=/opt/riscv/sysroot --with-pkgversion= --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=.././gcc --disable-default-pie --disable-multilib --with-abi=lp64d --with-arch=rv64gc --with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.2.0 () So, do you mean "--hash-style=gnu"? > > csky: vDSO: Remove --hash-style=both > > LoongArch: vDSO: Remove --hash-style=sysv > > > > arch/csky/kernel/vdso/Makefile | 2 +- > > arch/loongarch/vdso/Makefile | 2 +- > > arch/riscv/kernel/vdso/Makefile | 2 +- > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > -- > Xi Ruoyao <xry111@xxxxxxxxxxx> > School of Aerospace Science and Technology, Xidian University -- Best Regards Guo Ren