bfd_section_* macros
[deliverable/binutils-gdb.git] / ld / ldelf.c
index c88712fbe5d4ae110a3c093050600f8f59149549..8d4a2e58a1b6c96effc4873d147a259942dca9c1 100644 (file)
@@ -1,4 +1,4 @@
-/* ELF emulation code for targets using elf32.em.
+/* ELF emulation code for targets using elf.em.
    Copyright (C) 1991-2019 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
@@ -22,6 +22,7 @@
 #include "bfd.h"
 #include "libiberty.h"
 #include "filenames.h"
+#include "safe-ctype.h"
 #include "ld.h"
 #include "ldmain.h"
 #include "ldmisc.h"
@@ -1064,7 +1065,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
 
          for (s = abfd->sections; s && type < COMPACT_EH_HDR; s = s->next)
            {
-             const char *name = bfd_get_section_name (abfd, s);
+             const char *name = bfd_section_name (s);
 
              if (bfd_is_abs_section (s->output_section))
                continue;
@@ -1111,7 +1112,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
                                           bed->dynamic_sec_flags
                                           | SEC_READONLY);
          if (s != NULL
-             && bfd_set_section_alignment (elfbfd, s, 2))
+             && bfd_set_section_alignment (s, 2))
            {
              htab->eh_info.hdr_sec = s;
              warn_eh_frame = FALSE;
@@ -1381,7 +1382,7 @@ ldelf_setup_build_id (bfd *ibfd)
   flags = (SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY
           | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA);
   s = bfd_make_section_with_flags (ibfd, ".note.gnu.build-id", flags);
-  if (s != NULL && bfd_set_section_alignment (ibfd, s, 2))
+  if (s != NULL && bfd_set_section_alignment (s, 2))
     {
       struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd);
       t->o->build_id.after_write_object_contents = &write_build_id;
This page took 0.031907 seconds and 4 git commands to generate.