diff --git a/plat/rockchip/rk3399/drivers/m0/Makefile b/plat/rockchip/rk3399/drivers/m0/Makefile index 79e09f0..5ab6d28 100644 --- a/plat/rockchip/rk3399/drivers/m0/Makefile +++ b/plat/rockchip/rk3399/drivers/m0/Makefile @@ -33,16 +33,16 @@ C_SOURCES := src/dram.c \ C_SOURCES_PMU := src/suspend.c # Flags definition -COMMON_FLAGS := -g -mcpu=$(ARCH) -mthumb -Wall -O3 -nostdlib -mfloat-abi=soft +COMMON_FLAGS := -g -mcpu=$(ARCH) --target=arm-none-eabi -mthumb -Wall -O3 -nostdlib -mfloat-abi=soft CFLAGS := -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-common ASFLAGS := -Wa,--gdwarf-2 LDFLAGS := -Wl,--gc-sections -Wl,--build-id=none # Cross tool -CC := ${M0_CROSS_COMPILE}gcc +CC := clang CPP := ${M0_CROSS_COMPILE}cpp AR := ${M0_CROSS_COMPILE}ar -OC := ${M0_CROSS_COMPILE}objcopy +OC := llvm-objcopy OD := ${M0_CROSS_COMPILE}objdump NM := ${M0_CROSS_COMPILE}nm Needed to stop linker errors with ldd: ld.lld: error: section .ARM.exidx virtual address range overlaps with .m0_bin 489>>> .ARM.exidx range is [0x0, 0xF] 490>>> .m0_bin range is [0x0, 0x267] 491ld.lld: error: section .ARM.exidx load address range overlaps with .m0_bin 492>>> .ARM.exidx range is [0x0, 0xF] 493>>> .m0_bin range is [0x0, 0x267] 494ld.lld: error: section .ARM.exidx virtual address range overlaps with .m0_bin 495>>> .ARM.exidx range is [0x0, 0xF] 496>>> .m0_bin range is [0x0, 0x347] 497ld.lld: error: section .ARM.exidx load address range overlaps with .m0_bin 498>>> .ARM.exidx range is [0x0, 0xF] 499>>> .m0_bin range is [0x0, 0x347] diff --git a/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S b/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S index bfe054e..fedb012 100644 --- a/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S +++ b/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S @@ -22,5 +22,5 @@ SECTIONS { *(.co_stack*) } - /DISCARD/ : { *(.comment) *(.note*) } + /DISCARD/ : { *(.comment) *(.note*) *(.ARM.exidx) } }