Changeset 4408603 in rtems for cpukit/libdl/rtl-elf.c


Ignore:
Timestamp:
Jan 9, 2019, 11:14:11 AM (6 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
d8c70ba6
Parents:
a7c6176
git-author:
Chris Johns <chrisj@…> (01/09/19 11:14:11)
git-committer:
Chris Johns <chrisj@…> (02/08/19 23:06:34)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rtl-elf.c

    ra7c6176 r4408603  
    994994        break;
    995995
     996      case SHT_INIT_ARRAY:
     997        /*
     998         * Constructors are text and need to be loaded.
     999         */
     1000        flags = (RTEMS_RTL_OBJ_SECT_CTOR |
     1001                 RTEMS_RTL_OBJ_SECT_TEXT |
     1002                 RTEMS_RTL_OBJ_SECT_LOAD);
     1003        break;
     1004
     1005      case SHT_FINI_ARRAY:
     1006        /*
     1007         * Destructors are text and need to be loaded.
     1008         */
     1009        flags = (RTEMS_RTL_OBJ_SECT_DTOR |
     1010                 RTEMS_RTL_OBJ_SECT_TEXT |
     1011                 RTEMS_RTL_OBJ_SECT_LOAD);
     1012        break;
     1013
    9961014      default:
    9971015        /*
     
    10201038        flags |= RTEMS_RTL_OBJ_SECT_LINK;
    10211039
     1040      /*
     1041       * Some architexctures support a named PROGBIT section for INIT/FINI.
     1042       */
    10221043      len = RTEMS_RTL_ELF_STRING_MAX;
    10231044      if (!rtems_rtl_obj_cache_read (strings, fd,
Note: See TracChangeset for help on using the changeset viewer.