All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Joern Rennecke <joern.rennecke@embecosm.com>,
	James Hogan <james.hogan@imgtec.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Takashi Iwai <tiwai@suse.de>,
	Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	"jeremy.bennett@embecosm.com" <jeremy.bennett@embecosm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>,
	Francois Bedard <Francois.Bedard@synopsys.com>
Subject: Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()
Date: Sat, 26 Oct 2013 10:42:06 +0800	[thread overview]
Message-ID: <526B2BFE.4090107@asianux.com> (raw)
In-Reply-To: <CA+5PVA6N0c_ych96bC0nPw=hSqFtO-zhFFHzPW96yK8k=Z3fPg@mail.gmail.com>

On 10/24/2013 11:29 PM, Josh Boyer wrote:
> On Wed, Oct 23, 2013 at 10:31 PM, Chen Gang <gang.chen@asianux.com> wrote:
>> For some architectures, tool chain is not smart enough to recognize the
>> macro with multiple lines (e.g. arc tool chain), and for common ".S"
>> file, this kind of macro is also rarely used.
>>
>> So expand the related contents of macro to let it pass compiling (can
>> use "arc-elf32-objdump -x" to know about it).
>>
>> The related error (allmodconfig for arc):
>>
>>     LD      init/built-in.o
>>   kernel/built-in.o: In function `load_module_signing_keys':
>>   kernel/modsign_pubkey.c:66: undefined reference to `modsign_certificate_list'
>>   kernel/modsign_pubkey.c:71: undefined reference to `modsign_certificate_list_end'
>>   kernel/modsign_pubkey.c:67: undefined reference to `modsign_certificate_list_end'
>>
>> The related tool chain information:
>>
>>   [root@gchenlinux linux-next]# arc-elf32-as -v
>>   GNU assembler version 2.23.2 (arc-elf32) using BFD version (GNU Binutils) 2.23.2
>>   [root@gchenlinux linux-next]# arc-elf32-ld -v
>>   GNU ld (GNU Binutils) 2.23.2
>>   [root@gchenlinux linux-next]# arc-elf32-gcc -v
>>   Using built-in specs.
>>   COLLECT_GCC=arc-elf32-gcc
>>   COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arc-elf32/4.8.0/lto-wrapper
>>   Target: arc-elf32
>>   Configured with: ../gcc/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 : (reconfigured) ../gcc/configure --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 : (reconfigured) ../gcc/configure --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no target_configargs=enable_vtable_verify=yes --target=arc-elf32 --with-cpu=arc700 --disable-multilib --with-headers=../newlib/newlib/libc/include
>>   Thread model: single
>>   gcc version 4.8.0 (GCC)
> 
> Is this only an issue with using multi-line macro definitions in .S
> files?  The practice of using multi-line macro definitions isn't rare.
>  Look at e.g. include/linux/module.h, and a number of other header
> files.
> 

Yes, excluding "arch/*", for all ".S" files, except x86 driver and this
file, no others use multi-line macro definition, and "arch/arc" don't
use mulit-line macro definitions, either.

The related search command is:

  "find | grep -i "\.S$" | grep -v "/arch/"  | grep -v "Documentation" | xargs grep define".

Hmm... at least, in our case, we need not use the multi-line macro
definition, if expand it, the total lines will be shrunk, that will
be more clearer and simpler to source code readers and writers.


> This seems like a toolchain bug that should be fixable if it works for
> other architectures.
> 

Hmm... at least, we are sure the toolchain is not quite smart enough
(but we can not say it must be a bug).


So for me, I recommend to apply this patch (maybe the patch comment
need improvement). It is quite valuable to continue discussing about
it, but it is not related with whether applying this patch or not.

> josh
> 
> 

Thanks.
-- 
Chen Gang

  reply	other threads:[~2013-10-26  2:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23  6:04 [Suggestion] arc: compiler: bug: about an arc compiler's bug which is not in gcc main source code Chen Gang
2013-09-23  6:12 ` Chen Gang
2013-09-23  6:39   ` Vineet Gupta
2013-09-23  6:53     ` Chen Gang
2013-10-23  2:00       ` Chen Gang
2013-10-23  2:48         ` Joern Rennecke
2013-10-23  3:10           ` Chen Gang
2013-10-23 11:14             ` Chen Gang
2013-10-24  5:31               ` [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL() Chen Gang
2013-10-24  6:03                 ` Richard Weinberger
2013-10-24  6:26                   ` Chen Gang
2013-10-24  6:44                     ` Richard Weinberger
2013-10-24  7:40                       ` Chen Gang
2013-10-24 17:28                   ` Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) Vineet Gupta
2013-10-24 19:41                     ` Geert Uytterhoeven
2013-10-25  5:10                       ` Vineet Gupta
2013-10-26 13:38                         ` Chen Gang
2013-10-27  7:28                           ` Portable assmbler code - newline Vineet Gupta
2013-10-27 12:34                             ` Chen Gang
2013-10-27 13:57                               ` Chen Gang
2013-10-24 15:29                 ` [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL() Josh Boyer
2013-10-26  2:42                   ` Chen Gang [this message]
2013-10-26 14:40                     ` Chen Gang F T
2013-10-29  2:17                 ` [PATCH v2] " Chen Gang
2013-10-30  1:11                   ` [PATCH-next v3] kernel/system_certificate.S: " Chen Gang
2013-10-30 12:57                     ` David Howells
2013-10-31  0:47                       ` Chen Gang
2013-10-23  2:51         ` [Suggestion] arc: compiler: bug: about an arc compiler's bug which is not in gcc main source code Francois Bedard
2013-10-23  3:12           ` Chen Gang
2013-10-30  1:43             ` Chen Gang
2013-10-30 12:10               ` Chen Gang
2013-10-31  7:48               ` Vineet Gupta
2013-10-31  8:50                 ` Chen Gang

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=526B2BFE.4090107@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=Claudiu.Zissulescu@synopsys.com \
    --cc=Francois.Bedard@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=james.hogan@imgtec.com \
    --cc=jeremy.bennett@embecosm.com \
    --cc=joern.rennecke@embecosm.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.