Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] __mcount on ARC
Date: Wed, 21 Feb 2018 07:06:14 +0000	[thread overview]
Message-ID: <1519196773.5212.10.camel@synopsys.com> (raw)
In-Reply-To: <e88703ad-f70c-27b3-d142-18b898fa57b0@synopsys.com>

Hi Vineet, Zoltan,

On Tue, 2018-02-20 at 12:53 -0800, Vineet Gupta wrote:
> On 02/19/2018 12:58 AM, Alexey Brodkin wrote:
> > 
> > Looks like ARC port of glibc only defines "_mcount" but not "__mcount", see
> 
> It used to be so before glibc commit 46e2c0e216ba ARC: Fix -pg build error which 
> has been in my
> glibc branch #vineet-glibc-master for quite some time and hopefully is the one 
> buildroot is picking up.

Nope we still refer to "arc-2017.09-release". That will be kept for upcoming BR release
which is happening this month and then we'll switch to newer tag like the most recent
arc-2018.03-eng00x.

> The driving force here is gcc which defines what mc* call is generated, and that 
> for ARC is __mcount
> 
> > ------------------------------------->8---------------------------------
> > arc-linux-readelf -s libc.so.6 | grep mcount
> >     124: 000b397c     4 FUNC    GLOBAL DEFAULT   11 _mcount@@GLIBC_2.26
> >     423: 000df95c    44 FUNC    GLOBAL DEFAULT   11 _dl_mcount_wrapper_check@@GLIBC_2.26
> >    1584: 000df944    22 FUNC    GLOBAL DEFAULT   11 _dl_mcount_wrapper@@GLIBC_2.26
> 
> On my end, I see
> 
> arc-linux-nm ./build/glibc-vineet-glibc-master/build/linkobj/libc.so | grep mcount
> 00070930 T __mcount
> 
> > ------------------------------------->8---------------------------------
> > 
> > and https://github.com/foss-for-synopsys-dwc-arc-processors/glibc/blob/vineet-glibc-master/sysdeps/arc/machine-gmon.h#L26
> 
> Look carefully, this actually defines __mcount not _mcount
> 
> > 
> > I'm an expert in neither glibc nor gprof so not sure what is a difference between
> > _mcount vs __mcount but for AArch64 thay set "strong_alias (__mcount, _mcount)" here:
> > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aarch64/mcount.c#l32
> > 
> > So maybe we need to do the same for ARC.
> 
> No, we don't have to  - don't try to apply bandaid without first checking if it is 
> really needed.

Thanks for all that technical background.

So Zoltan, please go ahead and disable profiling of GPSD for ARC but please
add a comment like "# Needs glibc for ARC to arc-2018.03-eng007+".

-Alexey

      reply	other threads:[~2018-02-21  7:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-18 18:45 [Buildroot] __mcount on ARC Zoltan Gyarmati
2018-02-19  8:09 ` Thomas Petazzoni
2018-02-19  8:58   ` Alexey Brodkin
2018-02-19 20:02     ` Zoltan Gyarmati
2018-02-20 15:46       ` Alexey Brodkin
2018-02-20 20:38         ` Zoltan Gyarmati
2018-02-20 20:53     ` Vineet Gupta
2018-02-21  7:06       ` Alexey Brodkin [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=1519196773.5212.10.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=buildroot@busybox.net \
    /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