aboutsummaryrefslogtreecommitdiff
path: root/ld/mkscript.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-10-11 21:02:22 +0000
committerPer Bothner <per@bothner.com>1991-10-11 21:02:22 +0000
commit6719c75b99c88ea91807a3b6bf134bcac4c24af0 (patch)
treed0438457844fe5f75366c8e28fedae632c12bd51 /ld/mkscript.c
parent71fa3b01618c74f42f49e946f8c46a2c14415af2 (diff)
downloadgdb-6719c75b99c88ea91807a3b6bf134bcac4c24af0.zip
gdb-6719c75b99c88ea91807a3b6bf134bcac4c24af0.tar.gz
gdb-6719c75b99c88ea91807a3b6bf134bcac4c24af0.tar.bz2
* ldmain.c (main): Make config.magic_demand_paged be true
by default. Don't the WP_TEXT and D_PAGED flags of output_bfd here; it's too late, so set it when output_bfd is created (in ldlang.c). Also fix setting of EXEC_P flag * ldlang.c (ldlang_open_output): Set output_bfd->flags here. * ldlang.c: Remove some duplicate extern declarations. * ldgram.y: Fixes to -N and -n options. * Makefile.in: Recognize upper case letters in sed script to remove assignments from script files. * ldtemplate: Don't assukme that -N or -n options imply use of -r script. * mkscript.c: Tweaking to correctly handle \n and \\ in input.
Diffstat (limited to 'ld/mkscript.c')
-rw-r--r--ld/mkscript.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ld/mkscript.c b/ld/mkscript.c
index 59a8e87..b69f207 100644
--- a/ld/mkscript.c
+++ b/ld/mkscript.c
@@ -8,14 +8,12 @@ main()
printf("/* Generated through mkscript */\n");
printf("\"{ \\\n");
while (ch != EOF) {
- if (ch == '\"') {
- putchar('\\');
- putchar('\"');
- }
-else { if (ch == '\n') {
- putchar(' ');
+ if (ch == '\"' || ch == '\\' || ch == '\'') {
putchar('\\');
+ putchar(ch);
}
+ else { if (ch == '\n')
+ fputs("\\n\\", stdout);
putchar(ch);
}
ch = getchar();