# $NetBSD: Makefile.cats.inc,v 1.24 2011/07/02 17:37:28 tsutsui Exp $ MACHINE_ARCH= arm CPPFLAGS+= -D${MACHINE} .if defined(ABLEELF) && (${ABLEELF} == "1") # use a standard ELF format, adjusted to align areas LINKFLAGS= -T ${THISARM}/conf/ldscript.elf .else # Need to convert the kernel from ELF to a.out so that the firmware # can load it. LINKFLAGS= -T ldscript SYSTEM_LD_HEAD_EXTRA+=; \ ( cat ${ARM}/conf/kern.ldscript.head ; \ OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \ ${SYSTEM_OBJ} ; \ cat ${ARM}/conf/kern.ldscript.tail ) > ldscript REMOVE_SECTIONS= \ -R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \ -R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \ -R .debug_frame -R .debug_loc -R .debug_pubnames \ -R .debug_aranges -R .debug_pubtypes -R .ARM.attributes SYSTEM_LD_TAIL_EXTRA+=; \ echo \ "${OBJCOPY} -O a.out-arm-netbsd \ ${REMOVE_SECTIONS} \ $@ $@.aout"; \ ${OBJCOPY} -O a.out-arm-netbsd \ ${REMOVE_SECTIONS} \ $@ $@.aout .endif