Fix relocs_info declaration in tcc.h
C standard specifies that array should be declared with a non null size or with * for standard array. Declaration of relocs_info in tcc.h was not respecting this rule. This commit add a R_NUM macro that maps to the R_<ARCH>_NUM macros and declare relocs_info using it. This commit also moves all linker-related macros from <arch>-gen.c files to <arch>-link.c ones.
This commit is contained in:
20
arm-gen.c
20
arm-gen.c
@ -129,26 +129,6 @@ enum {
|
||||
|
||||
#define CHAR_IS_UNSIGNED
|
||||
|
||||
/******************************************************/
|
||||
/* ELF defines */
|
||||
|
||||
#define EM_TCC_TARGET EM_ARM
|
||||
|
||||
/* relocation type for 32 bit data relocation */
|
||||
#define R_DATA_32 R_ARM_ABS32
|
||||
#define R_DATA_PTR R_ARM_ABS32
|
||||
#define R_JMP_SLOT R_ARM_JUMP_SLOT
|
||||
#define R_GLOB_DAT R_ARM_GLOB_DAT
|
||||
#define R_COPY R_ARM_COPY
|
||||
|
||||
#define ELF_START_ADDR 0x00008000
|
||||
#define ELF_PAGE_SIZE 0x1000
|
||||
|
||||
enum float_abi {
|
||||
ARM_SOFTFP_FLOAT,
|
||||
ARM_HARD_FLOAT,
|
||||
};
|
||||
|
||||
/******************************************************/
|
||||
#else /* ! TARGET_DEFS_ONLY */
|
||||
/******************************************************/
|
||||
|
||||
Reference in New Issue
Block a user