* In that DO NOT EDIT the file; edit ldtemplate instead.
*/
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* emulate the original gld for the given <TARGET>
+ Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
-GLD is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-GLD is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id:#
-*/
-
-/*
- * emulate the original gld for the given <TARGET>
- *
*/
#define TARGET_IS_<TARGET>
-#include "sysdep.h"
-#include "bfd.h"
+#include "bfd.h"
+#include "sysdep.h"
#include "ld.h"
#include "config.h"
#include "ldemul.h"
static char *gld<target>_script_option_r =
#include "<ldtarget>.xr"
;
+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()
{
config.build_constructors == true) {
return gld<target>_script_option_Ur;
}
- if (config.relocateable_output == true ||
- config.magic_demand_paged == false) {
+ if (config.relocateable_output == true) {
return gld<target>_script_option_r;
}
-
+ 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;
}
struct ld_emulation_xfer_struct ld_gld<target>_emulation =