Makefile.cats.inc revision 1.23
1# $NetBSD: Makefile.cats.inc,v 1.23 2010/07/06 05:59:59 mrg 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 22SYSTEM_LD_TAIL_EXTRA+=; \ 23 echo \ 24 "${OBJCOPY} -O a.out-arm-netbsd \ 25 -R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \ 26 -R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \ 27 -R .debug_frame -R .debug_loc -R .debug_pubnames \ 28 -R .debug_aranges -R .ARM.attributes \ 29 $@ $@.aout"; \ 30 ${OBJCOPY} -O a.out-arm-netbsd \ 31 -R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \ 32 -R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \ 33 -R .debug_frame -R .debug_loc -R .debug_pubnames \ 34 -R .debug_aranges -R .ARM.attributes \ 35 $@ $@.aout 36.endif 37