* 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 e755e8c..b48a703 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 f56efd2..5e9f3ab 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;