* elf.c (assign_file_positions_for_load_sections): Set the type of
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 17 Feb 2008 13:21:20 +0000 (13:21 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 17 Feb 2008 13:21:20 +0000 (13:21 +0000)
PT_NOTE sections to SHT_NOTE.

bfd/ChangeLog
bfd/elf.c

index a9ffccf549f37e8467587810e46de7e8c85b918e..086b4b1096f14e7525fc692e06501d2330fa204f 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * elf.c (assign_file_positions_for_load_sections): Set the type of
+       PT_NOTE sections to SHT_NOTE.
+
 2008-02-17  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * simple.c (bfd_simple_get_relocated_section_contents): Set
index 192e0cc92e05899ccd04ac8e94f0d563734230c2..cce716360565c8f505d70c4e2e465088f9d3985b 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4284,6 +4284,10 @@ assign_file_positions_for_load_sections (bfd *abfd,
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
+      /* Set the note section type to SHT_NOTE.  */
+      else if (p->p_type == PT_NOTE)
+       for (i = 0; i < m->count; i++)
+         elf_section_type (m->sections[i]) = SHT_NOTE;
 
       p->p_offset = 0;
       p->p_filesz = 0;