linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greentime Hu <green.hu@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Nickhu <nickhu@andestech.com>
Cc: kbuild test robot <lkp@intel.com>,
	kbuild-all@lists.01.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vincent Chen <deanbo422@gmail.com>
Subject: Re: drivers/scsi/.tmp_mc_st.s:3: Error: invalid operands (*UND* and *UND* sections) for `^'
Date: Fri, 6 Dec 2019 18:15:08 +0800	[thread overview]
Message-ID: <CAEbi=3fJM9B_UnkuVOKW2oD8AcdvOYh1ozheGi9pAGvm7MjtFw@mail.gmail.com> (raw)
In-Reply-To: <CAEbi=3cojt1shc84zH3tGtxK98rQ=PbGhkirWCe7C+JSj5jpFw@mail.gmail.com>

Greentime Hu <green.hu@gmail.com> 於 2019年12月6日 週五 下午4:38寫道:
>
> Greentime Hu <green.hu@gmail.com> 於 2019年12月6日 週五 下午4:19寫道:
> >
> > Arnd Bergmann <arnd@arndb.de> 於 2019年12月6日 週五 下午4:00寫道:
> > >
> > > On Fri, Dec 6, 2019 at 2:05 AM kbuild test robot <lkp@intel.com> wrote:
> > > >
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head:   2f13437b8917627119d163d62f73e7a78a92303a
> > > > commit: 1207045da5a7c94344e0ea9a9e7495985eef499a compat_ioctl: move tape handling into drivers
> > > > date:   6 weeks ago
> > > > config: nds32-allyesconfig (attached as .config)
> > > > compiler: nds32le-linux-gcc (GCC) 9.2.0
> > > > reproduce:
> > > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > >         chmod +x ~/bin/make.cross
> > > >         git checkout 1207045da5a7c94344e0ea9a9e7495985eef499a
> > > >         # save the attached .config to linux build tree
> > > >         GCC_VERSION=9.2.0 make.cross ARCH=nds32
> > > >
> > > > If you fix the issue, kindly add following tag
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > >    drivers/scsi/.tmp_mc_st.s: Assembler messages:
> > > > >> drivers/scsi/.tmp_mc_st.s:3: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:4: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:5: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:6: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:7: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:8: Error: invalid operands (*UND* and *UND* sections) for `^'
> > > >    drivers/scsi/.tmp_mc_st.s:9: Error: invalid operands (*UND* and *UND* sections) for `^'
> > >
> > > Adding nds32 maintainers to Cc:
> > >
> > > It looks like a regression caused by my patch, but I don't think it's something
> > > I did wrong, but rather a toolchain bug being uncovered by the modified sources.
> > >
> > > Are you able to reproduce this?
> >
> > Hi Arnd,
> >
> > I am trying to reproduce this problem, but it happened to me.
> >
> > greentimeh@gamma07:/scratch/greentimeh/nds32/linux <(1207045da5a7...)>
> > $ GCC_VERSION=9.2.0 make.cross ARCH=nds32
> > cd: received redirection to `https://download.01.org/0day-ci/cross-package/'
> > Cannot find nds32-linux under
> > https://download.01.org/0day-ci/cross-package check
> > /tmp/crosstool-files
> >
> > Can you reproduce it?
>
> I can reproduce it now by adding these 2 lines to make.cross.
> 177                 nds32)
> 178                         gcc_arch=nds32le-linux
>
> It will be built failed with gcc-9.2.0-nolibc toolchain, but it can be
> built pass with gcc-8.1.0-nolibc toolchain.

It seems nds32le-linux-objdump -hdr xxx.o will generate different strings.
For example:
00000050 <.L2^B1>:
This string is different when generated by 9.2 toolchain and 8.1 toolchain.
"^B" is treated as 2 character in 9.2 toolchain
"^B" is treated as 1 character in 8.1 toolchain

This causes ./scripts/recordmcount.pl to call `$cc -o $mcount_o -c
$mcount_s`; failed to cause this issue.
I have a quick patch to fix this build error, but I am not sure if it
is a good solution.
Maybe Nick could have a look at it?

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 3f77a5d695c1..807b61fc5f5d 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -551,7 +551,8 @@ while (<IN>) {
        # if this is either a local function or a weak function
        # keep looking for functions that are global that
        # we can use safely.
-       if (!defined($locals{$text}) && !defined($weak{$text})) {
+       if (!defined($locals{$text}) && !defined($weak{$text}) &&
+           $text !~ /^\.L/) {
            $ref_func = $text;
            $read_function = 0;
            $offset = hex $1;

  reply	other threads:[~2019-12-06 10:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  1:04 drivers/scsi/.tmp_mc_st.s:3: Error: invalid operands (*UND* and *UND* sections) for `^' kbuild test robot
2019-12-06  8:00 ` Arnd Bergmann
2019-12-06  8:19   ` Greentime Hu
2019-12-06  8:38     ` Greentime Hu
2019-12-06 10:15       ` Greentime Hu [this message]
2019-12-09  7:08         ` Greentime Hu

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='CAEbi=3fJM9B_UnkuVOKW2oD8AcdvOYh1ozheGi9pAGvm7MjtFw@mail.gmail.com' \
    --to=green.hu@gmail.com \
    --cc=arnd@arndb.de \
    --cc=deanbo422@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nickhu@andestech.com \
    /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;
as well as URLs for NNTP newsgroup(s).