@ -166,41 +166,18 @@ const char *get_elf_platform(CPUState *cs) { return NULL; }
const char * get_elf_base_platform ( CPUState * cs ) { return NULL ; }
# endif
# include "elf.h"
/* We must delay the following stanzas until after "elf.h". */
# if defined(TARGET_AARCH64)
static bool arch_parse_elf_property ( uint32_t pr_type , uint32_t pr_datasz ,
const uint32_t * data ,
struct image_info * info ,
Error * * errp )
{
if ( pr_type = = GNU_PROPERTY_AARCH64_FEATURE_1_AND ) {
if ( pr_datasz ! = sizeof ( uint32_t ) ) {
error_setg ( errp , " Ill-formed GNU_PROPERTY_AARCH64_FEATURE_1_AND " ) ;
return false ;
}
/* We will extract GNU_PROPERTY_AARCH64_FEATURE_1_BTI later. */
info - > note_flags = * data ;
}
return true ;
}
# define ARCH_USE_GNU_PROPERTY 1
# else
static bool arch_parse_elf_property ( uint32_t pr_type , uint32_t pr_datasz ,
const uint32_t * data ,
struct image_info * info ,
Error * * errp )
# ifndef HAVE_ELF_GNU_PROPERTY
bool arch_parse_elf_property ( uint32_t pr_type , uint32_t pr_datasz ,
const uint32_t * data , struct image_info * info ,
Error * * errp )
{
g_assert_not_reached ( ) ;
}
# define ARCH_USE_GNU_PROPERTY 0
# define HAVE_ELF_GNU_PROPERTY 0
# endif
# include "elf.h"
struct exec
{
unsigned int a_info ; /* Use macros N_MAGIC, etc for access */
@ -1233,7 +1210,7 @@ static bool parse_elf_properties(const ImageSource *src,
uint32_t prev_type ;
/* Unless the arch requires properties, ignore them. */
if ( ! ARCH_USE _GNU_PROPERTY) {
if ( ! HAVE_ELF _GNU_PROPERTY) {
return true ;
}