Hi Mark,
Thanks for reply. First you may get libtarget_1.so from
https://github.com/JetXujing/xujing/blob/main/libtarget_1.so
Second, below are the sections of libtarget_1.so
# readelf -S libtarget_1.so
There are 44 section headers, starting at offset 0x3626548:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .note.gnu.bu[...] NOTE 0000000000000270 00000270
0000000000000024 0000000000000000 A 0 0 4
[ 2] .gnu.hash GNU_HASH 0000000000000298 00000298
000000000000d0f0 0000000000000000 A 3 0 8
[ 3] .dynsym DYNSYM 000000000000d388 0000d388
0000000000032598 0000000000000018 A 4 1 8
[28] .rustc PROGBITS 0000000000000000 006c71f2
0000000000011e16 0000000000000000 0 0 1
[29] .gnu.build.a[...] NOTE 00000000006ca838 006d9008
0000000000000024 0000000000000000 0 0 4
[30] .debug_aranges PROGBITS 0000000000000000 006d902c
00000000000292e0 0000000000000000 0 0 1
As for table 3 and symbol 742, I used gbd to get the following information, but
cannot map the index to symbol name, if you know how to do so please give some
hint(Thanks so much!)
I used elfutils-185 version
p shdr_info[cnt].shdr
$11 = {sh_name = 104, sh_type = 11, sh_flags = 2, sh_addr = 54488, sh_offset =
54488, sh_size = 207768, sh_link = 4, sh_info = 1, sh_addralign = 8, sh_entsize
= 24}
AND
p shdr_info[cnt]
$9 = {scn = 0x5555555b1fe8, shdr = {sh_name = 104, sh_type = 11, sh_flags = 2,
sh_addr = 54488, sh_offset = 54488, sh_size = 207768, sh_link = 4, sh_info = 1,
sh_addralign = 8,
sh_entsize = 24}, data = 0x5555555b1fe8, debug_data = 0x0, name =
0x5555555b1878 ".dynsym", idx = 3, old_sh_link = 4, symtab_idx = 0, version_idx
= 5, group_idx = 0,
group_cnt = 0, newscn = 0x5555555b44b8, se = 0x5555555b74e0, newsymidx =
0x5555555ca470}
And I found the commit that trigger this error infor:
https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=7bf4b63a4980788e6c1969cae02f0483e79c069f;hp=4f7b5ba9624489b5a2f714569c29ef865d4dcd6f
Is this error info an expected behavior?
Best
Ziyang
-----邮件原件-----
发件人: Mark Wielaard [mailto:[email protected]]
发送时间: 2023年7月20日 22:58
收件人: chenziyang (C) <[email protected]>; [email protected]
抄送: lvying <[email protected]>; Fangxiuning (Jack, EulerOS)
<[email protected]>; xujing (AN) <[email protected]>
主题: Re: eu-strip on .rustc section produce error information
Hi Ziyang,
On Thu, 2023-07-20 at 13:14 +0000, chenziyang (C) via Elfutils-devel
wrote:
> Hi elfutils maintainers
>
> I am running 'rpmbuild -ba sysmaster.spec', and produce following error info:
> eu-strip: Cannot remove symbol [742] from allocated symbol table [3]
>
> This error is caused by strip_to_debug() function in
> /usr/bin/find-debuginfo.sh which is triggered by rpm-build
> [cid:[email protected]]
>
> Steps to Reproduce:
> eu-strip -R .rustc libtarget_1.so
> Actual result:
> eu-strip: Cannot remove symbol [742] from allocated symbol table [3]
>
> OR
> eu-strip -remove-comment libtarget.so.debug1 libtarget_1.so Actual
> result: eu-strip: Cannot remove symbol [742] from allocated symbol
> table [3]
Would you be able to show the sections and symbols for libtarget_1.so.
Specifically what symbol table section 3 is and what 742th symbol in that table
is? And does libtarget_1.so actually contain a .rustc section?
Thanks,
Mark