Allow symbol and label names to be enclosed in double quotes.
[binutils-gdb.git] / bfd / elf.c
index 7ae2e342525e3c59da575893ab42ba590ea86fc6..f20679e303c9352717c1ee2659adec2f5eaa6434 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -832,7 +832,7 @@ _bfd_elf_setup_sections (bfd *abfd)
 
       idx = (Elf_Internal_Group *) shdr->contents;
       n_elt = shdr->sh_size / 4;
-      
+
       while (--n_elt != 0)
        if ((++idx)->shdr->bfd_section)
          elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
@@ -1245,7 +1245,7 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
          for (j = 0; j < elf_numsections (ibfd); j++)
            {
              Elf_Internal_Shdr * iheader = iheaders[j];
-             
+
              /* Since --only-keep-debug turns all non-debug sections
                 into SHT_NOBITS sections, the output SHT_NOBITS type
                 matches any input type.  */
@@ -3081,7 +3081,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg)
       if (arg->link_info
          /* Do the normal setup if we wouldn't create any sections here.  */
          && esd->rel.count + esd->rela.count > 0
-         && (arg->link_info->relocatable || arg->link_info->emitrelocations))
+         && (bfd_link_relocatable (arg->link_info)
+             || arg->link_info->emitrelocations))
        {
          if (esd->rel.count && esd->rel.hdr == NULL
              && !_bfd_elf_init_reloc_shdr (abfd, &esd->rel, name, FALSE,
@@ -3298,7 +3299,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
   _bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd));
 
   /* SHT_GROUP sections are in relocatable files only.  */
-  if (link_info == NULL || link_info->relocatable)
+  if (link_info == NULL || bfd_link_relocatable (link_info))
     {
       /* Put SHT_GROUP sections first.  */
       for (sec = abfd->sections; sec != NULL; sec = sec->next)
@@ -5555,9 +5556,7 @@ assign_file_positions_except_relocs (bfd *abfd,
        }
 
       /* Set e_type in ELF header to ET_EXEC for -pie -Ttext-segment=.  */
-      if (link_info != NULL
-         && link_info->executable
-         && link_info->shared)
+      if (link_info != NULL && bfd_link_pie (link_info))
        {
          unsigned int num_segments = elf_elfheader (abfd)->e_phnum;
          Elf_Internal_Phdr *segment = elf_tdata (abfd)->phdr;
@@ -6894,7 +6893,8 @@ _bfd_elf_init_private_section_data (bfd *ibfd,
 
 {
   Elf_Internal_Shdr *ihdr, *ohdr;
-  bfd_boolean final_link = link_info != NULL && !link_info->relocatable;
+  bfd_boolean final_link = (link_info != NULL
+                           && !bfd_link_relocatable (link_info));
 
   if (ibfd->xvec->flavour != bfd_target_elf_flavour
       || obfd->xvec->flavour != bfd_target_elf_flavour)
@@ -8187,7 +8187,7 @@ _bfd_elf_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   int ret = bed->s->sizeof_ehdr;
 
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       bfd_size_type phdr_size = elf_program_header_size (abfd);