Browse Source
Instead of a sequence of "#if ... #endif" move the selection to a function in linux-user/*/target_elf.h We can't add them in linux-user/*/target_cpu.h because we will need to include "elf.h" to use ELF flags with eflags, and including "elf.h" in "target_cpu.h" introduces some conflicts in elfload.c Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180220173307.25125-2-laurent@vivier.eu>pull/66/head
21 changed files with 290 additions and 39 deletions
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef AARCH64_TARGET_ELF_H |
|||
#define AARCH64_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef ALPHA_TARGET_ELF_H |
|||
#define ALPHA_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef ARM_TARGET_ELF_H |
|||
#define ARM_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef CRIS_TARGET_ELF_H |
|||
#define CRIS_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef HPPA_TARGET_ELF_H |
|||
#define HPPA_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef I386_TARGET_ELF_H |
|||
#define I386_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "qemu32"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef M68K_TARGET_ELF_H |
|||
#define M68K_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef MICROBLAZE_TARGET_ELF_H |
|||
#define MICROBLAZE_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef MIPS_TARGET_ELF_H |
|||
#define MIPS_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "24Kf"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef MIPS64_TARGET_ELF_H |
|||
#define MIPS64_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "5KEf"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef NIOS2_TARGET_ELF_H |
|||
#define NIOS2_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef OPENRISC_TARGET_ELF_H |
|||
#define OPENRISC_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "or1200"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,18 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef PPC_TARGET_ELF_H |
|||
#define PPC_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
#ifdef TARGET_PPC64 |
|||
return "POWER8"; |
|||
#else |
|||
return "750"; |
|||
#endif |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef S390X_TARGET_ELF_H |
|||
#define S390X_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "qemu"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef SH4_TARGET_ELF_H |
|||
#define SH4_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "sh7785"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,18 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef SPARC_TARGET_ELF_H |
|||
#define SPARC_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
#ifdef TARGET_SPARC64 |
|||
return "TI UltraSparc II"; |
|||
#else |
|||
return "Fujitsu MB86904"; |
|||
#endif |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef SPARC64_TARGET_ELF_H |
|||
#define SPARC64_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "TI UltraSparc II"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef TILEGX_TARGET_ELF_H |
|||
#define TILEGX_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef UNICORE32_TARGET_ELF_H |
|||
#define UNICORE32_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "any"; |
|||
} |
|||
#endif |
|||
@ -0,0 +1,14 @@ |
|||
/*
|
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License version 2 as |
|||
* published by the Free Software Foundation, or (at your option) any |
|||
* later version. See the COPYING file in the top-level directory. |
|||
*/ |
|||
|
|||
#ifndef X86_64_TARGET_ELF_H |
|||
#define X86_64_TARGET_ELF_H |
|||
static inline const char *cpu_get_model(uint32_t eflags) |
|||
{ |
|||
return "qemu64"; |
|||
} |
|||
#endif |
|||
Loading…
Reference in new issue