]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
bfd/
authorRoland McGrath <roland@gnu.org>
Mon, 26 Nov 2012 17:50:04 +0000 (17:50 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 26 Nov 2012 17:50:04 +0000 (17:50 +0000)
* elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.

bfd/ChangeLog
bfd/elf-nacl.c

index cf658382f7d9b523d5562749763449f00f05b602..5500b36a56b5849b5ca89d0110e30402da49c972 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-26  Roland McGrath  <mcgrathr@google.com>
+
+       * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.
+
 2012-11-21  Roland McGrath  <mcgrathr@google.com>
 
        * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
index 04659e7fb18dac984c0a6b1a694314aa3fe47008..ce401fae3c4dd94adc366d57f100bd7d03c08501 100644 (file)
@@ -75,7 +75,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
   struct elf_segment_map **first_load = NULL;
   struct elf_segment_map **last_load = NULL;
   bfd_boolean moved_headers = FALSE;
-  int sizeof_headers = bfd_sizeof_headers (abfd, info);
+  int sizeof_headers = info == NULL ? 0 : bfd_sizeof_headers (abfd, info);
   bfd_vma maxpagesize = get_elf_backend_data (abfd)->maxpagesize;
 
   if (info != NULL && info->user_phdrs)
@@ -149,8 +149,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
    proper order for the ELF rule that they must appear in ascending address
    order.  So find the two segments we swapped before, and swap them back.  */
 bfd_boolean
-nacl_modify_program_headers (bfd *abfd,
-                             struct bfd_link_info *info ATTRIBUTE_UNUSED)
+nacl_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
 {
   struct elf_segment_map **m = &elf_tdata (abfd)->segment_map;
   Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;