From: Per Bothner Date: Fri, 11 Oct 1991 21:02:22 +0000 (+0000) Subject: * ldmain.c (main): Make config.magic_demand_paged be true X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6719c75b99c88ea91807a3b6bf134bcac4c24af0;p=binutils-gdb.git * 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 4ff7772e6ca..884c962360e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,18 @@ +Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com) + + * 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. + Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com) * ldtemplate: include bfd.h before sysdep.h. diff --git a/ld/Makefile.in b/ld/Makefile.in index 7ca33878a39..2b935d6b04e 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -58,8 +58,8 @@ LD_PROG = ld.new # A sed pattern to translate .sc to .scu: SED_MAKE_RELOC_WITH_CONSTRUCTORS=\ -e "/If relocating/,/End if relocating/d" \ - -e "/=/s/[_a-z.]* *= .*//g" \ - -e '/>/s/} *> *[a-z]*/}/' \ + -e "/=/s/[_a-zA-Z.]* *= .*//g" \ + -e '/>/s/} *> *[a-zA-Z]*/}/' \ -e "/text/s/[.]text .*:/.text :/" \ -e "/data/s/[.]data .*:/.data :/" # A sed pattern to translate .scu to .scr: diff --git a/ld/ldtemplate b/ld/ldtemplate index 2d161f0b33a..dc9128317bb 100755 --- a/ld/ldtemplate +++ b/ld/ldtemplate @@ -134,8 +134,7 @@ static char *gld_get_script() config.build_constructors == true) { return gld_script_option_Ur; } - if (config.relocateable_output == true || - config.magic_demand_paged == false) { + if (config.relocateable_output == true) { return gld_script_option_r; } diff --git a/ld/mkscript.c b/ld/mkscript.c index 59a8e874672..b69f207157b 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();