aboutsummaryrefslogtreecommitdiff
path: root/ld/ldtemplate
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-10-15 00:28:43 +0000
committerPer Bothner <per@bothner.com>1991-10-15 00:28:43 +0000
commit972e7b4bc49aaafe0e1b8ff96c042473ab5d58c5 (patch)
tree9ed44b9e8f256f291681d63d30fd48bbd84fb555 /ld/ldtemplate
parentfd671dc4214c4b43b15c6931d318d1a91a46a2c0 (diff)
downloadgdb-972e7b4bc49aaafe0e1b8ff96c042473ab5d58c5.zip
gdb-972e7b4bc49aaafe0e1b8ff96c042473ab5d58c5.tar.gz
gdb-972e7b4bc49aaafe0e1b8ff96c042473ab5d58c5.tar.bz2
* Makefile.in, ldtemplate: Need to use separate scripts
for -n and -N options. Yet more complication.
Diffstat (limited to 'ld/ldtemplate')
-rwxr-xr-xld/ldtemplate9
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/ldtemplate b/ld/ldtemplate
index 54e397e..7dc393d 100755
--- a/ld/ldtemplate
+++ b/ld/ldtemplate
@@ -126,9 +126,12 @@ static char *gld<target>_script_option_Ur =
static char *gld<target>_script_option_r =
#include "<ldtarget>.xr"
;
-static char *gld<target>_script_option_n = /* Used with -n and -N flags. */
+static char *gld<target>_script_option_n = /* Used with -n flag. */
#include "<ldtarget>.xn"
;
+static char *gld<target>_script_option_N = /* Used with -N flag. */
+#include "<ldtarget>.xN"
+;
static char *gld<target>_get_script()
{
@@ -140,7 +143,9 @@ static char *gld<target>_get_script()
if (config.relocateable_output == true) {
return gld<target>_script_option_r;
}
- if (config.magic_demand_paged == false)
+ if (!config.text_read_only)
+ return gld<target>_script_option_N;
+ if (!config.magic_demand_paged)
return gld<target>_script_option_n;
return gld<target>_script;
}