NetBSD/sys/arch/arm/conf/mkldscript.sh
2005-12-11 12:16:03 +00:00

16 lines
409 B
Bash

#!/bin/sh
# $NetBSD: mkldscript.sh,v 1.2 2005/12/11 12:16:45 christos Exp $
TEMPLATE=$1
shift
SETS=`$OBJDUMP -x $* | fgrep "RELOCATION RECORDS FOR [link_set" | \
sort -u | sed 's/^.*\[\(.*\)\]:$/\1/'`
for s in $SETS; do
printf " . = ALIGN(4);\n"
printf " PROVIDE (__start_%s = .);\n" $s
printf " *(%s)\n" $s
printf " PROVIDE (__stop_%s = .);\n" $s
done