This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
ppc64: function symbol is in the initialized data section
- From: Mathieu Malaterre <mathieu dot malaterre at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 17 Jan 2018 11:14:16 +0100
- Subject: ppc64: function symbol is in the initialized data section
- Authentication-results: sourceware.org; auth=none
Hi there,
Before making some noise on binutils mailing list, could someone
please confirm that the output of nm looks odd for a library compiled
using gcc 7.2.0:
>From ppc64 porterbox Debian machine:
ppc64 % nm -B -D ./libknet/.libs/libknet.so.1.0.0 | grep knet_handle_new
000000000003ec40 D knet_handle_new
For comparison:
ppc64 % objdump -T ./libknet/.libs/libknet.so.1.0.0 | grep knet_handle_new
000000000003ec40 g DF .opd 00000000000011b8 LIBKNET knet_handle_new
ppc64 % readelf -a ./libknet/.libs/libknet.so.1.0.0 | grep knet_handle_new
108: 000000000003ec40 4536 FUNC GLOBAL DEFAULT 19
knet_handle_new@@LIBKNET
258: 000000000003ec40 4536 FUNC GLOBAL DEFAULT 19 knet_handle_new
where:
ppc64 % file ./libknet/.libs/libknet.so.1.0.0
./libknet/.libs/libknet.so.1.0.0: ELF 64-bit MSB shared object, 64-bit
PowerPC or cisco 7500, version 1 (SYSV), dynamically linked,
BuildID[sha1]=3110ff3aaddc51783dc9d7046e365a86b4d04907, with
debug_info, not stripped
>From my amd64:
amd64 $ nm -B -D ./libknet/.libs/libknet.so.1.0.0 | grep knet_handle_new
0000000000004d00 T knet_handle_new
Thanks,
--
Mathieu