From 4408603e27d028c5c735cf5d9d8160807ce1d591 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 9 Jan 2019 22:14:11 +1100 Subject: libdl: Fix the support for constructors and desctructors. - Fix the handling of pending objects. - Add a constructor flags in objects to track then being called. Closes #2921 --- cpukit/libdl/rtl-unresolved.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/libdl/rtl-unresolved.c') diff --git a/cpukit/libdl/rtl-unresolved.c b/cpukit/libdl/rtl-unresolved.c index 4e81c3c64e..7e2d920594 100644 --- a/cpukit/libdl/rtl-unresolved.c +++ b/cpukit/libdl/rtl-unresolved.c @@ -181,7 +181,8 @@ rtems_rtl_unresolved_resolve_reloc (rtems_rtl_unresolv_rec* rec, if (rec->rec.reloc.name == rd->name && rec->rec.reloc.obj != NULL) { if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED)) - printf ("rtl: unresolv: resolve reloc: %s\n", rd->name_rec->rec.name.name); + printf ("rtl: unresolv: resolve reloc: %s\n", + rd->name_rec->rec.name.name); rtems_rtl_obj_relocate_unresolved (&rec->rec.reloc, rd->sym); @@ -193,6 +194,7 @@ rtems_rtl_unresolved_resolve_reloc (rtems_rtl_unresolv_rec* rec, if (rec->rec.reloc.obj->unresolved == 0) { pending = rtems_rtl_pending_unprotected (); + rtems_chain_extract (&rec->rec.reloc.obj->link); rtems_chain_append (pending, &rec->rec.reloc.obj->link); } -- cgit v1.2.3