Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1748 → Rev 1771

/boot/trunk/arch/sparc64/loader/pack
30,43 → 30,27
 
[ "$#" -lt 1 ] && exit 1
 
case "$1" in
"binary")
BFD="binary"
;;
"ecoff")
BFD="ecoff-littlemips"
;;
*)
echo "Undefined image format" >&1
exit 1
;;
esac
 
OBJCOPY="$2"
OBJCOPY="$1"
LINK="_link.ld"
HEADER="_components.h"
 
shift 2
shift
 
echo "OUTPUT_FORMAT(\"${BFD}\")
echo 'OUTPUT_FORMAT("elf64-sparc")
ENTRY(start)
 
SECTIONS {
.boot 0xbfc00000: AT (0) {
.boot 0x4000: AT (0) {
*(BOOTSTRAP);
*(.text);
*(.rodata);
*(.rodata.*);
*(.data); /* initialized data */
*(.data); /* initialized data */
*(.sdata);
*(.sdata2);
*(.sbss);
*(.scommon);
*(.bss); /* uninitialized static variables */
*(COMMON); /* global variables */
*(.reginfo);" > "$LINK"
*(.bss); /* uninitialized static variables */
*(COMMON);' > "$LINK"
 
echo '#ifndef ___COMPONENTS_H__
#define ___COMPONENTS_H__
90,7 → 74,7
echo "$TASK -> $OBJECT"
echo "
. = ALIGN(4096);
. = ALIGN(8192);
*(.${BASENAME}_image);" >> "$LINK"
echo "
101,7 → 85,7
#define ${MACRO}_END ((void *) &${SYMBOL}_end)
#define ${MACRO}_SIZE ((unsigned int) ${MACRO}_END - (unsigned int) ${MACRO}_START)" >> "$HEADER"
"$OBJCOPY" -I binary -O elf32-tradlittlemips -B mips --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
"$OBJCOPY" -I binary -O elf64-sparc -B sparc --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
DATA="${DATA}
components[$COUNT].name = \"${BASENAME}\";