Avoid ubsan bug complaining about &p->field
[deliverable/binutils-gdb.git] / ld / emultempl / irix.em
index 2969f9b6927b24c0ec3fe71e423d99988804035f..e52c4a2d694987e7e86c1a98c9c9521de37deca0 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # MA 02110-1301, USA.
 #
 
-fragment <<EOF
+# This file is sourced from elf.em, and defines extra irix specific
+# functions.
 
-#include "ld.h"
-#include "ldmain.h"
-#include "libiberty.h"
+fragment <<EOF
 
 /* The native IRIX linker will always create a DT_SONAME for shared objects.
    While this shouldn't really be necessary for ABI conformance, some versions
@@ -32,7 +31,7 @@ fragment <<EOF
 static void
 irix_after_open (void)
 {
-  if (link_info.shared && command_line.soname == 0)
+  if (bfd_link_dll (&link_info) && command_line.soname == 0)
     command_line.soname
       = (char *) lbasename (bfd_get_filename (link_info.output_bfd));
 
This page took 0.023887 seconds and 4 git commands to generate.