From: Rusty Russell <rusty@rustcorp.com.au>
To: Michal Marek <mmarek@suse.cz>, Andi Kleen <andi@firstfloor.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
anton@samba.org
Subject: Re: [PATCH] Handle non ABS crc symbols
Date: Wed, 14 Aug 2013 11:16:16 +0930 [thread overview]
Message-ID: <87fvudkpsn.fsf@rustcorp.com.au> (raw)
In-Reply-To: <520A90E9.7080206@suse.cz>
Michal Marek <mmarek@suse.cz> writes:
> Added Rusty to CC.
>
> Dne 9.8.2013 21:45, Andi Kleen napsal(a):
>> From: Andi Kleen <ak@linux.intel.com>
>>
>> For some reason I managed to trick gcc into create CRC symbols that
>> are not absolute anymore, but weak.
>>
>> Make modpost handle this case.
>>
>> Andrew, this should fix the bizarre warning. Seems like a toolchain
>> bug to me.
>>
>> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Do you also end up with relocated CRCs, like ppc does?
See ARCH_RELOCATES_KCRCTAB in kernel/module.c.
Cheers,
Rusty.
>> ---
>> scripts/mod/modpost.c | 15 +++++++--------
>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
>> index 6216434..b3dd735 100644
>> --- a/scripts/mod/modpost.c
>> +++ b/scripts/mod/modpost.c
>> @@ -599,18 +599,17 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
>> else
>> export = export_from_sec(info, get_secindex(info, sym));
>>
>> + /* CRC'd symbol */
>> + if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
>> + crc = (unsigned int) sym->st_value;
>> + sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
>> + export);
>> + }
>> +
>> switch (sym->st_shndx) {
>> case SHN_COMMON:
>> warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name);
>> break;
>> - case SHN_ABS:
>> - /* CRC'd symbol */
>> - if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
>> - crc = (unsigned int) sym->st_value;
>> - sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
>> - export);
>> - }
>> - break;
>> case SHN_UNDEF:
>> /* undefined symbol */
>> if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&
>>
prev parent reply other threads:[~2013-08-14 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 19:45 [PATCH] Handle non ABS crc symbols Andi Kleen
2013-08-13 20:02 ` Michal Marek
2013-08-14 1:46 ` Rusty Russell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvudkpsn.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=anton@samba.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox