Makefile.cats.inc revision 1.24
1# $NetBSD: Makefile.cats.inc,v 1.24 2011/07/02 17:37:28 tsutsui Exp $ 2 3MACHINE_ARCH= arm 4CPPFLAGS+= -D${MACHINE} 5 6.if defined(ABLEELF) && (${ABLEELF} == "1") 7# use a standard ELF format, adjusted to align areas 8LINKFLAGS= -T ${THISARM}/conf/ldscript.elf 9 10.else 11# Need to convert the kernel from ELF to a.out so that the firmware 12# can load it. 13 14LINKFLAGS= -T ldscript 15 16SYSTEM_LD_HEAD_EXTRA+=; \ 17 ( cat ${ARM}/conf/kern.ldscript.head ; \ 18 OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \ 19 ${SYSTEM_OBJ} ; \ 20 cat ${ARM}/conf/kern.ldscript.tail ) > ldscript 21 22REMOVE_SECTIONS= \ 23 -R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \ 24 -R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \ 25 -R .debug_frame -R .debug_loc -R .debug_pubnames \ 26 -R .debug_aranges -R .debug_pubtypes -R .ARM.attributes 27 28SYSTEM_LD_TAIL_EXTRA+=; \ 29 echo \ 30 "${OBJCOPY} -O a.out-arm-netbsd \ 31 ${REMOVE_SECTIONS} \ 32 $@ $@.aout"; \ 33 ${OBJCOPY} -O a.out-arm-netbsd \ 34 ${REMOVE_SECTIONS} \ 35 $@ $@.aout 36.endif 37