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


Ignore:
Timestamp:
Jan 9, 2019, 11:14:11 AM (10 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-mdreloc-arm.c

    ra7c6176 r4408603  
    88
    99#include <errno.h>
     10#include <inttypes.h>
    1011#include <stdio.h>
    1112#include <string.h>
     
    194195    case R_TYPE(GLOB_DAT):  /* word32 (S + A) | T */
    195196    case R_TYPE(PREL31):    /* word32 (S + A) | T - P */
     197    case R_TYPE(TARGET1):   /* Equivalent to ABS32 */
    196198    case R_TYPE(TARGET2):   /* Equivalent to REL32 */
    197199      if (__predict_true(RELOC_ALIGNED_P(where))) {
     
    250252
    251253    case R_TYPE(THM_JUMP24):
    252       /* same to THM_CALL; insn b.w */
    253     case R_TYPE(THM_CALL):
     254      /* same as THM_PC22; insn b.w */
     255    case R_TYPE(THM_PC22):
    254256      upper_insn = *(uint16_t *)where;
    255257      lower_insn = *((uint16_t *)where + 1);
     
    323325
    324326      if (((Elf_Sword)tmp > 0x7ffffe) || ((Elf_Sword)tmp < -0x800000)) {
    325         rtems_rtl_set_error (EINVAL, "%s: Overflow %ld "
     327        rtems_rtl_set_error (EINVAL, "%s: Overflow %" PRIu32 " "
    326328                             "THM_JUMP19 relocations",
    327329                             sect->name, (uint32_t) ELF_R_TYPE(rel->r_info));
     
    343345
    344346    default:
    345       printf ("rtl: reloc unknown: sym = %lu, type = %lu, offset = %p, "
     347      printf ("rtl: reloc unknown: sym = %" PRIu32 ", type = %" PRIu32 ", offset = %p, "
    346348              "contents = %p\n",
    347349              ELF_R_SYM(rel->r_info), (uint32_t) ELF_R_TYPE(rel->r_info),
    348350              (void *)rel->r_offset, (void *)*where);
    349351      rtems_rtl_set_error (EINVAL,
    350                            "%s: Unsupported relocation type %ld "
     352                           "%s: Unsupported relocation type %" PRIu32 " "
    351353                           "in non-PLT relocations",
    352354                           sect->name, (uint32_t) ELF_R_TYPE(rel->r_info));
Note: See TracChangeset for help on using the changeset viewer.