Don't write to inferior_ptid in go32-nat.c
[deliverable/binutils-gdb.git] / ld / ldemul.c
index ab23dee41b67eba9ccca48d4bae6f11d180785c0..00a6a5ad1338b4b4d67b2d2b06d276b3f193759e 100644 (file)
@@ -1,5 +1,5 @@
 /* ldemul.c -- clearing house for ld emulation states
-   Copyright (C) 1991-2019 Free Software Foundation, Inc.
+   Copyright (C) 1991-2020 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 
@@ -71,6 +71,12 @@ ldemul_after_check_relocs (void)
   ld_emulation->after_check_relocs ();
 }
 
+void
+ldemul_before_place_orphans (void)
+{
+  ld_emulation->before_place_orphans ();
+}
+
 void
 ldemul_after_allocation (void)
 {
@@ -236,6 +242,29 @@ after_parse_default (void)
 void
 after_open_default (void)
 {
+  link_info.big_endian = TRUE;
+
+  if (bfd_big_endian (link_info.output_bfd))
+    ;
+  else if (bfd_little_endian (link_info.output_bfd))
+    link_info.big_endian = FALSE;
+  else
+    {
+      if (command_line.endian == ENDIAN_BIG)
+       ;
+      else if (command_line.endian == ENDIAN_LITTLE)
+       link_info.big_endian = FALSE;
+      else if (command_line.endian == ENDIAN_UNSET)
+       {
+         LANG_FOR_EACH_INPUT_STATEMENT (s)
+           if (s->the_bfd != NULL)
+             {
+               if (bfd_little_endian (s->the_bfd))
+                 link_info.big_endian = FALSE;
+               break;
+             }
+       }
+    }
 }
 
 void
@@ -243,6 +272,11 @@ after_check_relocs_default (void)
 {
 }
 
+void
+before_place_orphans_default (void)
+{
+}
+
 void
 after_allocation_default (void)
 {
@@ -394,3 +428,11 @@ ldemul_examine_strtab_for_ctf (struct ctf_file *ctf_output,
     ld_emulation->examine_strtab_for_ctf (ctf_output, syms,
                                          symcount, symstrtab);
 }
+
+bfd_boolean
+ldemul_print_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
+{
+  if (ld_emulation->print_symbol)
+    return ld_emulation->print_symbol (hash_entry, ptr);
+  return print_one_symbol (hash_entry, ptr);
+}
This page took 0.026249 seconds and 4 git commands to generate.