This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[m32c patch] add plt symbols for gdb
- From: DJ Delorie <dj at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 6 Apr 2006 21:08:21 -0400
- Subject: [m32c patch] add plt symbols for gdb
2006-04-06 DJ Delorie <dj@redhat.com>
* elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
each plt entry we create.
Index: elf32-m32c.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32c.c,v
retrieving revision 1.5
diff -p -U3 -r1.5 elf32-m32c.c
--- elf32-m32c.c 3 Mar 2006 03:13:49 -0000 1.5
+++ elf32-m32c.c 7 Apr 2006 00:58:11 -0000
@@ -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;