Skip discarded resource sections when building a PE resource table.
authorToni Spets <toni.spets@iki.fi>
Wed, 6 May 2015 13:18:34 +0000 (14:18 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 6 May 2015 13:18:34 +0000 (14:18 +0100)
PR ld/18372
* peXXigen.c (rsrc_process_section): Skip discarded resource
sections.

bfd/ChangeLog
bfd/peXXigen.c

index 034d34d2f3e04096ec4a9b15134e24b6983c1300..000cd71412b74cee62287960f5d5be9279566079 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-06  Toni Spets  <toni.spets@iki.fi>
+
+       PR ld/18372
+       * peXXigen.c (rsrc_process_section): Skip discarded resource
+       sections.
+
 2015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config.bfd: Support i[3-7]86-*-elf*.
index 6aa18ca8a191ecb78f7603a42631c346248b3ee9..c897c6496714b416ac5b73a628463802d335d485 100644 (file)
@@ -4160,7 +4160,8 @@ rsrc_process_section (bfd * abfd,
     {
       asection * rsrc_sec = bfd_get_section_by_name (input, ".rsrc");
 
-      if (rsrc_sec != NULL)
+      /* PR 18372 - skip discarded .rsrc sections.  */
+      if (rsrc_sec != NULL && !discarded_section (rsrc_sec))
        {
          if (num_input_rsrc == max_num_input_rsrc)
            {