This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[19/21] Give imported function descriptors class XMC_DS
- From: Richard Sandiford <richards at transitive dot com>
- To: binutils at sourceware dot org
- Date: Tue, 10 Mar 2009 14:50:12 +0000
- Subject: [19/21] Give imported function descriptors class XMC_DS
- References: <g4y6vd7a4x.fsf@richards-desktop.transitives.com>
If we import a symbol that turns out to be a function descriptor,
the .loader symbol table still lists it as XMC_UA (unclassified).
We should list it as XMC_DS (descriptor) instead.
OK to install?
Richard
bfd/
* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
class XMC_DS rather than XMC_UA.
Index: bfd/xcofflink.c
===================================================================
--- bfd/xcofflink.c 2009-03-10 13:52:51.000000000 +0000
+++ bfd/xcofflink.c 2009-03-10 13:54:27.000000000 +0000
@@ -3128,7 +3128,12 @@ xcoff_build_ldsyms (struct xcoff_link_ha
}
if ((h->flags & XCOFF_IMPORT) != 0)
- h->ldsym->l_ifile = h->ldindx;
+ {
+ /* Give imported descriptors class XMC_DS rather than XMC_UA. */
+ if ((h->flags & XCOFF_DESCRIPTOR) != 0)
+ h->smclas = XMC_DS;
+ h->ldsym->l_ifile = h->ldindx;
+ }
/* The first 3 symbol table indices are reserved to indicate the
data, text and bss sections. */