This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
[PATCH RFA] elf64-ia64.c PLT changes
- To: binutils at sourceware dot cygnus dot com
- Subject: [PATCH RFA] elf64-ia64.c PLT changes
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 10 May 2000 18:13:10 -0700
I request approval for committing the patch below. It allows me to set
breakpoints on not-yet-loaded shared library functions in gdb. (Note
however, that this change doesn't affect gdb directly; rather it
causes the linker to give non-zero values to certain PLT symbols.)
* elf64-ia64.c (allocate_plt2_entries): Redefine PLT symbol's
value and section to be the PLT entry.
(elf64_ia64_adjust_dynamic_symbol): Revise comment regarding
undefined symbols with PLT entries.
Index: elf64-ia64.c
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/elf64-ia64.c,v
retrieving revision 1.25
diff -u -p -r1.25 elf64-ia64.c
--- elf64-ia64.c 2000/04/18 01:01:32 1.25
+++ elf64-ia64.c 2000/05/10 08:21:00
@@ -1767,6 +1767,8 @@ allocate_plt2_entries (dyn_i, data)
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
dyn_i->h->plt.offset = ofs;
+ h->root.u.def.value = ofs;
+ h->root.u.def.section = elf64_ia64_hash_table (x->info)->plt_sec;
}
return true;
}
@@ -1862,8 +1864,8 @@ elf64_ia64_adjust_dynamic_symbol (info,
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
{
- /* ??? Undefined symbols with PLT entries should be re-defined
- to be the PLT entry. */
+ /* Undefined symbols with PLT entries are re-defined to be the PLT
+ entry in allocate_plt2_entries (). */
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the