[v5,1/4] elf: Consolidate stackinfo.h
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
And use sane default the generic implementation.
---
sysdeps/aarch64/stackinfo.h | 33 ---------------------
sysdeps/arc/stackinfo.h | 33 ---------------------
sysdeps/csky/stackinfo.h | 29 ------------------
sysdeps/generic/stackinfo.h | 15 ++++++++--
sysdeps/loongarch/stackinfo.h | 33 ---------------------
sysdeps/powerpc/{ => powerpc32}/stackinfo.h | 8 +----
sysdeps/riscv/stackinfo.h | 33 ---------------------
7 files changed, 13 insertions(+), 171 deletions(-)
delete mode 100644 sysdeps/aarch64/stackinfo.h
delete mode 100644 sysdeps/arc/stackinfo.h
delete mode 100644 sysdeps/csky/stackinfo.h
delete mode 100644 sysdeps/loongarch/stackinfo.h
rename sysdeps/powerpc/{ => powerpc32}/stackinfo.h (82%)
delete mode 100644 sysdeps/riscv/stackinfo.h
Comments
* Adhemerval Zanella:
> And use sane default the generic implementation.
Ahh, this keeps sysdeps/x86_64/stackinfo.h etc., which still have PF_X
in DEFAULT_STACK_PERMS. So it's a somewhat limited consolidation.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* Copyright (C) 2001-2024 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-/* This file contains a bit of information about the stack allocation
- of the processor. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-#include <elf.h>
-
-/* On AArch64 the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-/* Default to a non-executable stack. */
-#define DEFAULT_STACK_PERMS (PF_R|PF_W)
-
-#endif /* stackinfo.h */
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* Stack environment definitions for ARC.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* This file contains a bit of information about the stack allocation
- of the processor. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-#include <elf.h>
-
-/* On ARC the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-/* Default to a non-executable stack. */
-#define DEFAULT_STACK_PERMS (PF_R|PF_W)
-
-#endif /* stackinfo.h */
deleted file mode 100644
@@ -1,29 +0,0 @@
-/* Stack environment definitions. C-SKY version.
- Copyright (C) 2018-2024 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-#include <elf.h>
-
-/* On C-SKY the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-#define DEFAULT_STACK_PERMS (PF_R|PF_W)
-
-#endif /* stackinfo.h */
@@ -15,6 +15,15 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-/* This file contains a bit of information about the stack allocation
- of the processor. Since there is no general truth we can't say
- anything here. */
+/* This file contains a bit of information about the stack allocation of the
+ processor. Default to a non executable stack that grows downwards. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+#include <elf.h>
+
+#define _STACK_GROWS_DOWN 1
+#define DEFAULT_STACK_PERMS (PF_R|PF_W)
+
+#endif
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* Stack environment definitions for LoongArch.
- Copyright (C) 2022-2024 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* This file contains a bit of information about the stack allocation
- of the processor. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-#include <elf.h>
-
-/* On LoongArch the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-/* Default to a non-executable stack. */
-#define DEFAULT_STACK_PERMS (PF_R | PF_W)
-
-#endif /* stackinfo.h */
similarity index 82%
rename from sysdeps/powerpc/stackinfo.h
rename to sysdeps/powerpc/powerpc32/stackinfo.h
@@ -26,13 +26,7 @@
/* On PPC the stack grows down. */
#define _STACK_GROWS_DOWN 1
-#if __WORDSIZE == 64
-/* PPC64 doesn't need an executable stack and doesn't need PT_GNU_STACK
- * to make the stack nonexecutable. */
-# define DEFAULT_STACK_PERMS (PF_R|PF_W)
-#else
/* PF_X can be overridden if PT_GNU_STACK is present but is presumed absent. */
-# define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
-#endif
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
#endif /* stackinfo.h */
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* Stack environment definitions for RISC-V.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* This file contains a bit of information about the stack allocation
- of the processor. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-#include <elf.h>
-
-/* On RISC-V the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-/* Default to a non-executable stack. */
-#define DEFAULT_STACK_PERMS (PF_R | PF_W)
-
-#endif /* stackinfo.h */