Changeset 8bdbefe in rtems


Ignore:
Timestamp:
Oct 6, 2017, 6:32:11 AM (22 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b39cda6
Parents:
4e38aed
git-author:
Sebastian Huber <sebastian.huber@…> (10/06/17 06:32:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/06/17 07:43:17)
Message:

libdl: Fix warnings

Update #3155.

Location:
cpukit/libdl
Files:
5 edited

Legend:

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

    r4e38aed r8bdbefe  
    8585    }
    8686
    87     *value = (Elf_Word) symbol->value;
     87    *value = (Elf_Addr) symbol->value;
    8888    return true;
    8989  }
     
    9696  }
    9797
    98   *value = sym->st_value + (Elf_Word) sect->base;
     98  *value = sym->st_value + (Elf_Addr) sect->base;
    9999  return true;
    100100}
     
    251251      {
    252252        if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    253           printf ("rtl: rela: sym:%s(%d)=%08lx type:%d off:%08lx addend:%d\n",
    254                   symname, (int) ELF_R_SYM (rela->r_info), symvalue,
    255                   (int) ELF_R_TYPE (rela->r_info), rela->r_offset, (int) rela->r_addend);
     253          printf ("rtl: rela: sym:%s(%d)=%08jx type:%d off:%08jx addend:%d\n",
     254                  symname, (int) ELF_R_SYM (rela->r_info),
     255                  (uintmax_t) symvalue, (int) ELF_R_TYPE (rela->r_info),
     256                  (uintmax_t) rela->r_offset, (int) rela->r_addend);
    256257        if (!rtems_rtl_elf_relocate_rela (obj, rela, targetsect,
    257258                                          symname, sym.st_info, symvalue))
     
    261262      {
    262263        if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    263           printf ("rtl: rel: sym:%s(%d)=%08lx type:%d off:%08lx\n",
    264                   symname, (int) ELF_R_SYM (rel->r_info), symvalue,
    265                   (int) ELF_R_TYPE (rel->r_info), rel->r_offset);
     264          printf ("rtl: rel: sym:%s(%d)=%08jx type:%d off:%08jx\n",
     265                  symname, (int) ELF_R_SYM (rel->r_info),
     266                  (uintmax_t) symvalue, (int) ELF_R_TYPE (rel->r_info),
     267                  (uintmax_t) rel->r_offset);
    266268        if (!rtems_rtl_elf_relocate_rel (obj, rel, targetsect,
    267269                                         symname, sym.st_info, symvalue))
     
    305307    rela.r_addend = reloc->rel[REL_R_ADDEND];
    306308    if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    307           printf ("rtl: rela: sym:%d type:%d off:%08lx addend:%d\n",
     309          printf ("rtl: rela: sym:%d type:%d off:%08jx addend:%d\n",
    308310                  (int) ELF_R_SYM (rela.r_info), (int) ELF_R_TYPE (rela.r_info),
    309                   rela.r_offset, (int) rela.r_addend);
     311                  (uintmax_t) rela.r_offset, (int) rela.r_addend);
    310312    if (!rtems_rtl_elf_relocate_rela (reloc->obj, &rela, sect,
    311313                                      sym->name, sym->data, symvalue))
     
    318320    rel.r_info = reloc->rel[REL_R_INFO];
    319321    if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    320       printf ("rtl: rel: sym:%d type:%d off:%08lx\n",
     322      printf ("rtl: rel: sym:%d type:%d off:%08jx\n",
    321323              (int) ELF_R_SYM (rel.r_info), (int) ELF_R_TYPE (rel.r_info),
    322               rel.r_offset);
     324              (uintmax_t) rel.r_offset);
    323325    if (!rtems_rtl_elf_relocate_rel (reloc->obj, &rel, sect,
    324326                                     sym->name, sym->data, symvalue))
  • cpukit/libdl/rtl-mdreloc-powerpc.c

    r4e38aed r8bdbefe  
    88
    99#include <errno.h>
     10#include <inttypes.h>
    1011#include <stdio.h>
    1112#include <sys/types.h>
     
    184185
    185186    default:
    186       printf ("rtl: reloc unknown: sym = %lu, type = %lu, offset = %p, "
     187      printf ("rtl: reloc unknown: sym = %lu, type = %" PRIu32 ", offset = %p, "
    187188              "contents = %p\n",
    188189              ELF_R_SYM(rela->r_info), (uint32_t) ELF_R_TYPE(rela->r_info),
    189190              (void *)rela->r_offset, (void *)*where);
    190191      rtems_rtl_set_error (EINVAL,
    191                            "%s: Unsupported relocation type %ld "
     192                           "%s: Unsupported relocation type %" PRId32
    192193                           "in non-PLT relocations",
    193194                           sect->name, (uint32_t) ELF_R_TYPE(rela->r_info));
  • cpukit/libdl/rtl-obj.c

    r4e38aed r8bdbefe  
    780780
    781781        if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD_SECT))
    782           printf ("rtl: loading:%2d: %s -> %8p (s:%zi f:%04lx a:%lu l:%02d)\n",
     782          printf ("rtl: loading:%2d: %s -> %8p (s:%zi f:%04" PRIx32
     783                  " a:%" PRIu32 " l:%02d)\n",
    783784                  order, sect->name, sect->base, sect->size,
    784785                  sect->flags, sect->alignment, sect->link);
  • cpukit/libdl/rtl-rap.c

    r4e38aed r8bdbefe  
    2222#include <errno.h>
    2323#include <fcntl.h>
     24#include <inttypes.h>
    2425#include <stdlib.h>
    2526#include <string.h>
     
    212213
    213214  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    214     printf ("rtl: rap: input %s=%lu\n",
     215    printf ("rtl: rap: input %s=%" PRIu32 "\n",
    215216            sect->name, rtems_rtl_obj_comp_input (rap->decomp));
    216217
     
    267268
    268269    if (relocs && rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    269       printf ("rtl: relocation: %s: header: %08lx relocs: %d %s\n",
     270      printf ("rtl: relocation: %s: header: %08" PRIx32 " relocs: %d %s\n",
    270271              rap_sections[section].name,
    271272              header, relocs, is_rela ? "rela" : "rel");
     
    316317
    317318      if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    318         printf (" %2d: info=%08lx offset=%lu addend=%lu\n",
     319        printf (" %2d: info=%08" PRIx32 " offset=%" PRIu32
     320                " addend=%" PRIu32 "\n",
    319321                r, info, offset, addend);
    320322
     
    332334        }
    333335
    334         symvalue = (Elf_Word) symsect->base + addend;
     336        symvalue = (Elf_Addr) symsect->base + addend;
    335337      }
    336338      else if (rtems_rtl_elf_rel_resolve_sym (type))
     
    372374        }
    373375
    374         symvalue = (Elf_Word) symbol->value;
     376        symvalue = (Elf_Addr) symbol->value;
    375377      }
    376378
     
    387389
    388390        if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    389           printf (" %2d: rela: type:%-2d off:%lu addend:%d" \
    390                   " symname=%s symtype=%lu symvalue=0x%08lx\n",
     391          printf (" %2d: rela: type:%-2d off:%" PRIu32 " addend:%d"
     392                  " symname=%s symtype=%ju symvalue=0x%08jx\n",
    391393                  r, (int) type, offset, (int) addend,
    392                   symname, symtype, symvalue);
     394                  symname, (uintmax_t) symtype, (uintmax_t) symvalue);
    393395
    394396        if (!rtems_rtl_elf_relocate_rela (obj, &rela, targetsect,
     
    407409
    408410        if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    409           printf (" %2d: rel: type:%-2d off:%lu" \
    410                   " symname=%s symtype=%lu symvalue=0x%08lx\n",
     411          printf (" %2d: rel: type:%-2d off:%" PRIu32
     412                  " symname=%s symtype=%ju symvalue=0x%08jx\n",
    411413                  r, (int) type, offset,
    412                   symname, symtype, symvalue);
     414                  symname, (uintmax_t) symtype, (uintmax_t) symvalue);
    413415
    414416        if (!rtems_rtl_elf_relocate_rel (obj, &rel, targetsect,
     
    612614
    613615    if (rtems_rtl_trace (RTEMS_RTL_TRACE_SYMBOL))
    614       printf ("rtl: sym:load: data=0x%08lx name=0x%08lx value=0x%08lx\n",
     616      printf ("rtl: sym:load: data=0x%08" PRIx32 " name=0x%08" PRIx32
     617              " value=0x%08" PRIx32 "\n",
    615618              data, name, value);
    616619
     
    641644      obj->global_syms = 0;
    642645      obj->global_size = 0;
    643       rtems_rtl_set_error (EINVAL, "section index not found: %lu", data >> 16);
     646      rtems_rtl_set_error (EINVAL, "section index not found: %" PRIu32, data >> 16);
    644647      return false;
    645648    }
     
    817820
    818821  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    819     printf ("rtl: rap: input machine=%lu\n",
     822    printf ("rtl: rap: input machine=%" PRIu32 "\n",
    820823            rtems_rtl_obj_comp_input (rap.decomp));
    821824
     
    824827
    825828  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    826     printf ("rtl: rap: machinetype=%lu\n", rap.machinetype);
     829    printf ("rtl: rap: machinetype=%" PRIu32 "\n", rap.machinetype);
    827830
    828831  if (!rtems_rtl_rap_machine_check (rap.machinetype))
     
    836839
    837840  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    838     printf ("rtl: rap: datatype=%lu\n", rap.datatype);
     841    printf ("rtl: rap: datatype=%" PRIu32 "\n", rap.datatype);
    839842
    840843  if (!rtems_rtl_rap_datatype_check (rap.datatype))
     
    848851
    849852  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    850     printf ("rtl: rap: class=%lu\n", rap.class);
     853    printf ("rtl: rap: class=%" PRIu32 "\n", rap.class);
    851854
    852855  if (!rtems_rtl_rap_class_check (rap.class))
     
    865868
    866869  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    867     printf ("rtl: rap: input header=%lu\n",
     870    printf ("rtl: rap: input header=%" PRIu32 "\n",
    868871            rtems_rtl_obj_comp_input (rap.decomp));
    869872
     
    886889
    887890  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    888     printf ("rtl: rap: load: symtab=%lu (%lu) strtab=%lu relocs=%lu\n",
     891    printf ("rtl: rap: load: symtab=%" PRIu32 " (%" PRIu32
     892            ") strtab=%" PRIu32 " relocs=%" PRIu32 "\n",
    889893            rap.symtab_size, rap.symbols,
    890894            rap.strtab_size, rap.relocs_size);
     
    914918
    915919    if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
    916       printf ("rtl: rap: details: obj_num=%lu\n", obj->obj_num);
     920      printf ("rtl: rap: details: obj_num=%" PRIu32 "\n", obj->obj_num);
    917921
    918922    if (!rtems_rtl_rap_load_linkmap (&rap, obj))
     
    944948
    945949    if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD_SECT))
    946       printf ("rtl: rap: %s: size=%lu align=%lu\n",
     950      printf ("rtl: rap: %s: size=%" PRIu32 " align=%" PRIu32 "\n",
    947951              rap_sections[section].name,
    948952              rap.secs[section].size,
     
    966970
    967971  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    968     printf ("rtl: rap: input symbols=%lu\n",
     972    printf ("rtl: rap: input symbols=%" PRIu32 "\n",
    969973            rtems_rtl_obj_comp_input (rap.decomp));
    970974
     
    973977
    974978  if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
    975     printf ("rtl: rap: input relocs=%lu\n",
     979    printf ("rtl: rap: input relocs=%" PRIu32 "\n",
    976980            rtems_rtl_obj_comp_input (rap.decomp));
    977981
  • cpukit/libdl/rtl-shell.c

    r4e38aed r8bdbefe  
    215215            obj->bss_base, obj->bss_size);
    216216  }
    217   printf ("%-*cunresolved    : %lu\n", print->indent, ' ', obj->unresolved);
     217  printf ("%-*cunresolved    : %" PRIu32 "\n", print->indent, ' ', obj->unresolved);
    218218  printf ("%-*csymbols       : %zi\n", print->indent, ' ', obj->global_syms);
    219219  printf ("%-*csymbol memory : %zi\n", print->indent, ' ', obj->global_size);
Note: See TracChangeset for help on using the changeset viewer.