Opened on 09/29/17 at 05:05:21
Last modified on 10/07/17 at 00:07:22
#3155 new defect
libdl not supported on 64-bit PowerPC
Reported by: | Sebastian Huber | Owned by: | joel.sherrill@… |
---|---|---|---|
Priority: | normal | Milestone: | Indefinite |
Component: | score | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
There are several warnings:
cpukit/libdl/rtl-elf.c:253:46: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:253:64: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'Elf32_Word {aka const unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:263:45: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:263:63: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'Elf32_Word {aka const unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:307:54: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:320:49: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-elf.c:87:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-elf.c:98:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:104:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:114:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:123:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:143:48: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:152:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:156:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:163:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:166:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:177:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:186:44: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'Elf32_Word {aka const unsigned int}' [-Wformat=] cpukit/libdl/rtl-mdreloc-powerpc.c:186:56: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] cpukit/libdl/rtl-mdreloc-powerpc.c:189:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:189:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:191:63: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=] cpukit/libdl/rtl-mdreloc-powerpc.c:63:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-mdreloc-powerpc.c:92:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpukit/libdl/rtl-obj.c:782:61: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-obj.c:782:67: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:214:35: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:269:49: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:318:33: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:318:44: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:318:55: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:334:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-rap.c:374:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cpukit/libdl/rtl-rap.c:389:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:389:19: warning: format '%lx' expects argument of type 'long unsigned int', but argument 8 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:389:48: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:409:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:409:19: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Elf32_Word {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:409:47: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:614:42: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:614:55: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:614:69: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:643:64: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:819:40: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:826:38: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:838:35: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:850:32: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:867:39: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:888:39: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:888:44: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:888:56: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:888:67: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:916:45: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:946:37: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:946:47: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:968:40: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-rap.c:975:39: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'uint32_t {aka unsigned int}' [-Wformat=] cpukit/libdl/rtl-shell.c:217:34: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t {aka unsigned int}' [-Wformat=]
Due to vast ABI differences between 32-bit and 64-bit PowerPC it is unlikely that libdl is supported on PowerPC.
Change History (7)
comment:1 follow-up: 2 Changed on 10/03/17 at 04:57:06 by Chris Johns
comment:2 follow-up: 3 Changed on 10/03/17 at 06:13:50 by Sebastian Huber
Replying to Chris Johns:
Replying to Sebastian Huber:
Due to vast ABI differences between 32-bit and 64-bit PowerPC it is unlikely that libdl is supported on PowerPC.
Do you mean PowerPC 64bit or any PowerPC?
64-bit PowerPC.
What do you propose?
We can probably fix the warnings with a small amount of work, however, a real 64-bit support is probably some more work.
comment:3 Changed on 10/03/17 at 23:10:57 by Chris Johns
Replying to Sebastian Huber:
Replying to Chris Johns:
What do you propose?
We can probably fix the warnings with a small amount of work, however, a real 64-bit support is probably some more work.
Fixing the warning is a good idea. Yes there are some spots that need to be fixed. The host side for 64bit and 32bit support needs some changes and the RAP format would need some work.
comment:4 follow-up: 7 Changed on 10/06/17 at 07:14:43 by Sebastian Huber
I guess this prototype is wrong
bool rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj, const Elf_Sym* sym, const char* symname, Elf_Word* value)
It should probably be Elf_Addr *value.
comment:7 Changed on 10/07/17 at 00:07:22 by Chris Johns
Replying to Sebastian Huber:
I guess this prototype is wrong
bool rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj, const Elf_Sym* sym, const char* symname, Elf_Word* value)It should probably be Elf_Addr *value.
Yes I agree. Once you highlight this is makes perfect sense. Thank you for taking the time to fix these issues.
Replying to Sebastian Huber:
Do you mean PowerPC 64bit or any PowerPC?
What do you propose?