[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5a918fd-5700-267d-3159-6a034cce0a73@huawei.com>
Date: Thu, 31 Mar 2022 18:15:09 +0800
From: Chen Zhongjin <chenzhongjin@...wei.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
CC: <alexander.sverdlin@...ia.com>, <ardb@...nel.org>,
<linus.walleij@...aro.org>, <nico@...xnic.net>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: module: Add all unwind tables when load module
Hi Russell,
Thanks for comment! I've pushed v2 patch with your advises.
>>
>> - memset(maps, 0, sizeof(maps));
>> + INIT_LIST_HEAD(&table_list->mod_list);
>> + mod->arch.init_table = NULL;
>>
>> for (s = sechdrs; s < sechdrs_end; s++) {
>> - const char *secname = secstrs + s->sh_name;
>> + const unsigned int sectype = s->sh_type;
> Please loose this local variable.
Also I moved "txtname" inside func params.
+ const char *txtname = strcmp(".ARM.exidx", secname) == 0 ?
+ ".text" : secname + strlen(".ARM.exidx");
+ const Elf_Shdr *txt_sec = find_mod_section(hdr, sechdrs, txtname);
>>>
+ const Elf_Shdr *txt_sec = find_mod_section(hdr, sechdrs,
+ strcmp(".ARM.exidx", secname) ?
+ secname + strlen(".ARM.exidx") : ".text");
Powered by blists - more mailing lists