[00/17] Remove _dl_skip_args

Message ID 20220526165003.705355-1-adhemerval.zanella@linaro.org
Headers
Series Remove _dl_skip_args |

Message

Adhemerval Zanella Netto May 26, 2022, 4:49 p.m. UTC
  Both ad43cac44a686 (rtld: Use generic argv adjustment in ld.so [BZ
#23293]) and 86147bbeec25624 (rtld: Remove DL_ARGV_NOT_RELRO and make
_dl_skip_args const) broke both hppa (BZ# 29165) and nios2 (BZ# 29187)
because different than aarch64, the patch did not adjust the
architectures for the new internal semantics.

This patchset adjust the remaining architectures to remove the
_dl_skip_args usage and fix both hppa and nios2.

I checked on alpha, arm, microblaze, mips, nios2, or1k, riscv, and
sh4 with a simple test to check if argc, argv, and envp are the
expected ones on both the constructor and on main program.

I also run a full native make check for aarch64, hppa, i686, ia64,
powerpc, s390, sparc, and x86_64.

The onle architectures that I could not actually test are arc and
csky.

Adhemerval Zanella (17):
  alpha: Remove _dl_skip_args usage
  arm: Remove _dl_skip_args usage
  arc: Remove _dl_skip_args usage
  csky: Remove _dl_skip_args usage
  hppa: Remove _dl_skip_args usage (BZ# 29165)
  i686: Remove _dl_skip_args usage
  ia64: Remove _dl_skip_args usage
  m68k: Remove _dl_skip_args usage
  microblaze: Remove _dl_skip_args usage
  mips: Remove _dl_skip_args usage
  nios2: Remove _dl_skip_args usage (BZ# 29187)
  riscv: Remove _dl_skip_args usage
  s390: Remove _dl_skip_args usage
  sh: Remove _dl_skip_args usage
  sparc: Remove _dl_skip_args usage
  x86_64: Remove _dl_skip_args usage
  elf: Remove _dl_skip_args

 elf/rtld.c                         |  2 -
 sysdeps/alpha/dl-machine.h         | 41 -----------------
 sysdeps/arc/dl-machine.h           | 17 +-------
 sysdeps/arm/dl-machine.h           | 39 -----------------
 sysdeps/csky/dl-machine.h          | 19 +-------
 sysdeps/generic/ldsodefs.h         |  4 --
 sysdeps/hppa/dl-machine.h          | 28 +++++-------
 sysdeps/i386/dl-machine.h          | 13 +-----
 sysdeps/ia64/dl-machine.h          | 70 ++++++------------------------
 sysdeps/m68k/dl-machine.h          |  9 +---
 sysdeps/mach/hurd/dl-sysdep.c      |  1 -
 sysdeps/microblaze/dl-machine.h    |  5 ---
 sysdeps/mips/dl-machine.h          | 31 +------------
 sysdeps/nios2/dl-machine.h         | 50 +++++----------------
 sysdeps/riscv/dl-machine.h         | 12 -----
 sysdeps/s390/s390-32/dl-machine.h  | 46 --------------------
 sysdeps/s390/s390-64/dl-machine.h  | 16 -------
 sysdeps/sh/dl-machine.h            | 16 +------
 sysdeps/sparc/sparc32/dl-machine.h | 43 +-----------------
 sysdeps/sparc/sparc64/dl-machine.h | 40 +----------------
 sysdeps/x86_64/dl-machine.h        | 13 +-----
 sysdeps/x86_64/x32/dl-machine.h    | 12 +----
 22 files changed, 52 insertions(+), 475 deletions(-)
  

Comments

Carlos O'Donell May 30, 2022, 1:32 p.m. UTC | #1
On 5/26/22 12:49, Adhemerval Zanella via Libc-alpha wrote:
> Both ad43cac44a686 (rtld: Use generic argv adjustment in ld.so [BZ
> #23293]) and 86147bbeec25624 (rtld: Remove DL_ARGV_NOT_RELRO and make
> _dl_skip_args const) broke both hppa (BZ# 29165) and nios2 (BZ# 29187)
> because different than aarch64, the patch did not adjust the
> architectures for the new internal semantics.
> 
> This patchset adjust the remaining architectures to remove the
> _dl_skip_args usage and fix both hppa and nios2.
> 
> I checked on alpha, arm, microblaze, mips, nios2, or1k, riscv, and
> sh4 with a simple test to check if argc, argv, and envp are the
> expected ones on both the constructor and on main program.
> 
> I also run a full native make check for aarch64, hppa, i686, ia64,
> powerpc, s390, sparc, and x86_64.
> 
> The onle architectures that I could not actually test are arc and
> csky.

The entire series looks good to me. We should push this given that we have several
machine maintainer reviews. The i686, x86_64, aarch64, s390x, and ppc64le changes
all looks good.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
 
> Adhemerval Zanella (17):
>   alpha: Remove _dl_skip_args usage
>   arm: Remove _dl_skip_args usage
>   arc: Remove _dl_skip_args usage
>   csky: Remove _dl_skip_args usage
>   hppa: Remove _dl_skip_args usage (BZ# 29165)
>   i686: Remove _dl_skip_args usage
>   ia64: Remove _dl_skip_args usage
>   m68k: Remove _dl_skip_args usage
>   microblaze: Remove _dl_skip_args usage
>   mips: Remove _dl_skip_args usage
>   nios2: Remove _dl_skip_args usage (BZ# 29187)
>   riscv: Remove _dl_skip_args usage
>   s390: Remove _dl_skip_args usage
>   sh: Remove _dl_skip_args usage
>   sparc: Remove _dl_skip_args usage
>   x86_64: Remove _dl_skip_args usage
>   elf: Remove _dl_skip_args
> 
>  elf/rtld.c                         |  2 -
>  sysdeps/alpha/dl-machine.h         | 41 -----------------
>  sysdeps/arc/dl-machine.h           | 17 +-------
>  sysdeps/arm/dl-machine.h           | 39 -----------------
>  sysdeps/csky/dl-machine.h          | 19 +-------
>  sysdeps/generic/ldsodefs.h         |  4 --
>  sysdeps/hppa/dl-machine.h          | 28 +++++-------
>  sysdeps/i386/dl-machine.h          | 13 +-----
>  sysdeps/ia64/dl-machine.h          | 70 ++++++------------------------
>  sysdeps/m68k/dl-machine.h          |  9 +---
>  sysdeps/mach/hurd/dl-sysdep.c      |  1 -
>  sysdeps/microblaze/dl-machine.h    |  5 ---
>  sysdeps/mips/dl-machine.h          | 31 +------------
>  sysdeps/nios2/dl-machine.h         | 50 +++++----------------
>  sysdeps/riscv/dl-machine.h         | 12 -----
>  sysdeps/s390/s390-32/dl-machine.h  | 46 --------------------
>  sysdeps/s390/s390-64/dl-machine.h  | 16 -------
>  sysdeps/sh/dl-machine.h            | 16 +------
>  sysdeps/sparc/sparc32/dl-machine.h | 43 +-----------------
>  sysdeps/sparc/sparc64/dl-machine.h | 40 +----------------
>  sysdeps/x86_64/dl-machine.h        | 13 +-----
>  sysdeps/x86_64/x32/dl-machine.h    | 12 +----
>  22 files changed, 52 insertions(+), 475 deletions(-)
>