aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2014-01-08 17:38:58 +0800
committerThomas Preud'homme <robotux@celest.fr>2014-01-08 17:59:16 +0800
commit32734680cb2a645d48f806edae5a5912e0759a23 (patch)
treea4db1ffcc9d34c8fd3d48f439cfd0626bceb98db
parent28f0286479503040f0076aed94890cfd3a3a04dc (diff)
downloadtinycc-32734680cb2a645d48f806edae5a5912e0759a23.tar.gz
tinycc-32734680cb2a645d48f806edae5a5912e0759a23.tar.bz2
Improve ELF on ARM
* set whether soft or hardfloat calling convention is used * mark ELF file has having an entry point when there is
-rw-r--r--tccelf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 3fbc795..92ea449 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -2243,7 +2243,13 @@ static int elf_output_file(TCCState *s1, const char *filename)
#ifdef TCC_TARGET_ARM
#ifdef TCC_ARM_EABI
ehdr.e_ident[EI_OSABI] = 0;
- ehdr.e_flags = 4 << 24;
+ ehdr.e_flags = EF_ARM_EABI_VER4;
+ if (file_type == TCC_OUTPUT_EXE)
+ ehdr.e_flags |= EF_ARM_HASENTRY;
+ if (s1->float_abi == ARM_HARD_FLOAT)
+ ehdr.e_flags |= EF_ARM_VFP_FLOAT;
+ else
+ ehdr.e_flags |= EF_ARM_SOFT_FLOAT;
#else
ehdr.e_ident[EI_OSABI] = ELFOSABI_ARM;
#endif