* elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
authorDJ Delorie <dj@redhat.com>
Fri, 7 Apr 2006 01:08:34 +0000 (01:08 +0000)
committerDJ Delorie <dj@redhat.com>
Fri, 7 Apr 2006 01:08:34 +0000 (01:08 +0000)
each plt entry we create.

bfd/ChangeLog
bfd/elf32-m32c.c

index e755e8c027b0d5b8e4b5d4be2940194beccb4b4c..b48a703857a17c83cc4ea5cd610f91ce3b1678b1 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-06  DJ Delorie  <dj@redhat.com>
+
+       * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
+       each plt entry we create.
+
 2006-04-06  Carlos O'Donell  <carlos@codesourcery.com>
 
        * po/Make-in: Add install-html target.
index f56efd2e4da026e02e70749e619e4a8f8645cf1e..5e9f3ab28a2150c960d1d441dda90a97464f93ff 100644 (file)
@@ -482,6 +482,22 @@ m32c_elf_relocate_section
                relocation = (splt->output_section->vma
                              + splt->output_offset
                              + (*plt_offset & -2));
+               if (name)
+               {
+                 char *newname = bfd_malloc (strlen(name)+5);
+                 strcpy (newname, name);
+                 strcat(newname, ".plt");
+                 _bfd_generic_link_add_one_symbol (info,
+                                                   input_bfd,
+                                                   newname,
+                                                   BSF_FUNCTION | BSF_WEAK,
+                                                   splt,
+                                                   (*plt_offset & -2),
+                                                   0,
+                                                   1,
+                                                   0,
+                                                   0);
+               }
              }
          }
          break;