* config.bfd: Support crisv32-*-* like cris-*-*.
[deliverable/binutils-gdb.git] / bfd / elf.c
index e71c18c6be1b44e70cadcd1e168a30372e503203..a82387ca63834b16fb39a95d47109870b9dd7804 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1739,6 +1739,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
     case SHT_INIT_ARRAY:       /* .init_array section.  */
     case SHT_FINI_ARRAY:       /* .fini_array section.  */
     case SHT_PREINIT_ARRAY:    /* .preinit_array section.  */
+    case SHT_GNU_LIBLIST:      /* .gnu.liblist section.  */
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
 
     case SHT_DYNAMIC:  /* Dynamic linking information.  */
@@ -2132,6 +2133,8 @@ static struct bfd_elf_special_section const special_sections[] =
   { ".rela",           5, -1, SHT_RELA,     0 },
   { ".rel",            4, -1, SHT_REL,      0 },
   { ".stabstr",        5,  3, SHT_STRTAB,   0 },
+  { ".gnu.liblist",   12,  0, SHT_GNU_LIBLIST, SHF_ALLOC },
+  { ".gnu.conflict",  13,  0, SHT_RELA,     SHF_ALLOC },
   { NULL,              0,  0, 0,            0 }
 };
 
@@ -2969,6 +2972,17 @@ assign_section_numbers (bfd *abfd)
            d->this_hdr.sh_link = elf_section_data (s)->this_idx;
          break;
 
+       case SHT_GNU_LIBLIST:
+         /* sh_link is the section header index of the prelink library
+            list 
+            used for the dynamic entries, or the symbol table, or the
+            version strings.  */
+         s = bfd_get_section_by_name (abfd, (sec->flags & SEC_ALLOC)
+                                            ? ".dynstr" : ".gnu.libstr");
+         if (s != NULL)
+           d->this_hdr.sh_link = elf_section_data (s)->this_idx;
+         break;
+
        case SHT_HASH:
        case SHT_GNU_versym:
          /* sh_link is the section header index of the symbol table
@@ -3857,7 +3871,10 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
   elf_elfheader (abfd)->e_phnum = count;
 
   if (count == 0)
-    return TRUE;
+    {
+      elf_tdata (abfd)->next_file_pos = bed->s->sizeof_ehdr;
+      return TRUE;
+    }
 
   /* If we already counted the number of program segments, make sure
      that we allocated enough space.  This happens when SIZEOF_HEADERS
@@ -7732,7 +7749,7 @@ _bfd_elf_rel_local_sym (bfd *abfd,
 
 bfd_vma
 _bfd_elf_section_offset (bfd *abfd,
-                        struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                        struct bfd_link_info *info,
                         asection *sec,
                         bfd_vma offset)
 {
@@ -7742,7 +7759,7 @@ _bfd_elf_section_offset (bfd *abfd,
       return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info,
                                       offset);
     case ELF_INFO_TYPE_EH_FRAME:
-      return _bfd_elf_eh_frame_section_offset (abfd, sec, offset);
+      return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
     default:
       return offset;
     }
This page took 0.028979 seconds and 4 git commands to generate.