[v3,4/6] elf.h: Reorder DT_RISCV_*

Message ID 20230501234739.7264-5-palmer@rivosinc.com
State Superseded
Headers
Series elf.h: Fix and cleanup the RISC-V defines |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Palmer Dabbelt May 1, 2023, 11:47 p.m. UTC
  These match the MIPS ordering.

Reported-by: Fangrui Song <maskray@google.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 elf/elf.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Fangrui Song May 2, 2023, 3:51 a.m. UTC | #1
On Mon, May 1, 2023 at 4:48 PM Palmer Dabbelt <palmer@rivosinc.com> wrote:
>
> These match the MIPS ordering.
>
> Reported-by: Fangrui Song <maskray@google.com>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>

If you push a revert for 117e8b341c5c0ace8d65feeef136fececb3fdc9c
instead, the "Remove duplicate" patches in this series can be avoided.
You may combine the "Reorder .." patches as well.

(Feel free to remove "Reported-by: Fangrui Song", the information may
not be useful in a commit message...)

Reviewed-by: Fangrui Song <maskray@google.com>

> ---
>  elf/elf.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 4c61d3a5ee..f9d169e4e2 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3933,9 +3933,6 @@ enum
>
>  #define R_TILEGX_NUM           130
>
> -/* RISC-V specific values for the Dyn d_tag field.  */
> -#define DT_RISCV_NUM           2
> -
>  /* RISC-V ELF Flags */
>  #define EF_RISCV_RVC                   0x0001
>  #define EF_RISCV_FLOAT_ABI             0x0006
> @@ -4017,6 +4014,7 @@ enum
>
>  /* RISC-V specific values for the d_tag field.  */
>  #define DT_RISCV_VARIANT_CC    (DT_LOPROC + 1)
> +#define DT_RISCV_NUM           2
>
>  /* BPF specific declarations.  */
>
> --
> 2.40.0
>
  

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 4c61d3a5ee..f9d169e4e2 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -3933,9 +3933,6 @@  enum
 
 #define R_TILEGX_NUM		130
 
-/* RISC-V specific values for the Dyn d_tag field.  */
-#define DT_RISCV_NUM		2
-
 /* RISC-V ELF Flags */
 #define EF_RISCV_RVC 			0x0001
 #define EF_RISCV_FLOAT_ABI 		0x0006
@@ -4017,6 +4014,7 @@  enum
 
 /* RISC-V specific values for the d_tag field.  */
 #define DT_RISCV_VARIANT_CC	(DT_LOPROC + 1)
+#define DT_RISCV_NUM		2
 
 /* BPF specific declarations.  */