arch, board: Add thumb support to i.MX6
Summary: - This commit adds thumb support to i.MX6 - Also, applies the same coding style to arch_elf.c Impact: - i.MX6 only Testing: - Tested with sabre-6quad:smp (QEMU, Dev board) - Tested with sabre-6quad:netnsh (QEMU) - Tested with sabre-6quad:netknsh (QEMU, not merged yet) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
11731125ef
commit
de95a8550f
|
@ -80,6 +80,7 @@ config ARCH_CHIP_IMX1
|
|||
config ARCH_CHIP_IMX6
|
||||
bool "NXP/Freescale iMX.6"
|
||||
select ARCH_CORTEXA9
|
||||
select ARM_THUMB
|
||||
select ARMV7A_HAVE_L2CC_PL310
|
||||
select ARCH_HAVE_FPU
|
||||
select ARCH_HAVE_TRUSTZONE
|
||||
|
|
|
@ -34,7 +34,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16
|
||||
ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16 -mthumb
|
||||
ARCHCFLAGS = -fno-common -fno-builtin -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
|
|
|
@ -174,9 +174,9 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||
offset += sym->st_value - addr;
|
||||
|
||||
#ifdef CONFIG_ARM_THUMB
|
||||
if (offset & 2 || offset < (int32_t) 0xfe000000 ||
|
||||
if ((offset & 2) != 0 || offset < (int32_t) 0xfe000000 ||
|
||||
#else
|
||||
if (offset & 3 || offset < (int32_t) 0xfe000000 ||
|
||||
if ((offset & 3) != 0 || offset < (int32_t) 0xfe000000 ||
|
||||
#endif
|
||||
offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue