Add support for disabling automatic generation of .eh_frame_hdr sections in ELF based...
[deliverable/binutils-gdb.git] / ld / emultempl / needrelax.em
index 6eb95769adad91001a636b099af3e695c8394e41..2ccaaccfe9ea41aab69df1c2c5dc933aea5e8d9e 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2001-2016 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -24,7 +24,7 @@
 
 LDEMUL_BEFORE_ALLOCATION=need_relax_${EMULATION_NAME}_before_allocation
 
-cat >>e${EMULATION_NAME}.c <<EOF
+fragment <<EOF
 
 static void
 need_relax_${EMULATION_NAME}_before_allocation (void)
@@ -33,7 +33,7 @@ need_relax_${EMULATION_NAME}_before_allocation (void)
   gld${EMULATION_NAME}_before_allocation ();
 
   /* Force -relax on if not doing a relocatable link.  */
-  if (! link_info.relocatable)
-    command_line.relax = TRUE;
+  if (!bfd_link_relocatable (&link_info))
+    ENABLE_RELAXATION;
 }
 EOF
This page took 0.024058 seconds and 4 git commands to generate.