Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf I don't know what was using this before (but it did...



details:   https://anonhg.NetBSD.org/src/rev/e3c4e0bf8b05
branches:  trunk
changeset: 333636:e3c4e0bf8b05
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 12 02:15:58 2014 +0000

description:
I don't know what was using this before (but it did not work since it
did not produce valid LDSCRIPT code) and now it does.

diffstat:

 sys/conf/mkldscript.sh |  24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diffs (34 lines):

diff -r 485039f192d9 -r e3c4e0bf8b05 sys/conf/mkldscript.sh
--- a/sys/conf/mkldscript.sh    Wed Nov 12 02:15:16 2014 +0000
+++ b/sys/conf/mkldscript.sh    Wed Nov 12 02:15:58 2014 +0000
@@ -1,15 +1,21 @@
 #!/bin/sh
-#      $NetBSD: mkldscript.sh,v 1.1 2007/03/04 02:35:49 tsutsui Exp $
+#      $NetBSD: mkldscript.sh,v 1.2 2014/11/12 02:15:58 christos Exp $
 
-TEMPLATE=$1
+TEMPLATE="$1"
 shift
 
-SETS=`$OBJDUMP -x $* | fgrep "RELOCATION RECORDS FOR [link_set" | \
-        sort -u | sed 's/^.*\[\(.*\)\]:$/\1/'`
+mksets() {
+    "${OBJDUMP:-objdump}" -x "$@" | fgrep "RELOCATION RECORDS FOR [link_set" | \
+        sort -u | sed 's/^.*\[\(.*\)\]:$/\1/'
+}
+SETS=$(mksets "$@")
 
+
+grep -v '^}$' "$TEMPLATE"
 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 
+        printf '   . = ALIGN(4);\n'
+        printf '   PROVIDE (__start_%s = .);\n' $s
+        printf '   %s : { *(%s) }\n' $s $s
+        printf '   PROVIDE (__stop_%s = .);\n' $s
+done
+printf '}\n'



Home | Main Index | Thread Index | Old Index