* emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
authorAlan Modra <amodra@gmail.com>
Fri, 28 Feb 2003 04:46:04 +0000 (04:46 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 28 Feb 2003 04:46:04 +0000 (04:46 +0000)
support when scripts read from files.

ld/ChangeLog
ld/emultempl/elf32.em

index 6b2ee9e08ea8b02ce1126c73226f8fd2b895b36c..6c702941ca70b3ad863fd5363715d82e62f1c824 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-28  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
+       support when scripts read from files.
+
 2003-02-28  Alan Modra  <amodra@bigpond.net.au>
 
        * ldemul.c (ldemul_parse_args): Return FALSE by default.
index cfe6407f49b061cdc3afa550d7dda6ac5606296e..28bb8d8f8a098388c9ce386f502fd3bebc893133 100644 (file)
@@ -1503,10 +1503,33 @@ cat >>e${EMULATION_NAME}.c <<EOF
     return "ldscripts/${EMULATION_NAME}.xr";
   else if (!config.text_read_only)
     return "ldscripts/${EMULATION_NAME}.xbn";
+EOF
+if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then :
+else
+cat >>e${EMULATION_NAME}.c <<EOF
   else if (!config.magic_demand_paged)
     return "ldscripts/${EMULATION_NAME}.xn";
+EOF
+fi
+if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+  else if (link_info.shared && link_info.combreloc)
+    return "ldscripts/${EMULATION_NAME}.xsc";
+EOF
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
   else if (link_info.shared)
     return "ldscripts/${EMULATION_NAME}.xs";
+EOF
+fi
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+  else if (link_info.combreloc)
+    return "ldscripts/${EMULATION_NAME}.xc";
+EOF
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
   else
     return "ldscripts/${EMULATION_NAME}.x";
 }