public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim@codesourcery.com>
To: Jeff Law <law@redhat.com>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>,
	  gcc-patches@gcc.gnu.org, Andreas Schwab <schwab@redhat.com>
Subject: Re: [PATCH] m68k: don't use lea on profiling
Date: Mon, 23 Nov 2009 18:25:00 -0000	[thread overview]
Message-ID: <4B0AD18D.5000406@codesourcery.com> (raw)
In-Reply-To: <4B0AC6A2.2090709@redhat.com>

Jeff Law wrote:
> On 11/19/09 06:50, Maxim Kuvyrkov wrote:
>> Sebastian Andrzej Siewior wrote:
>>> this will not work on large binaries:
>>>
>>> |bigeasy@ayoka:~/cc$ echo 'int main(void) { return 0; }' > file.c
>>> |bigeasy@ayoka:~/cc$ m68k-linux-gnu-gcc -o file file.c -static -pg
>>> |/tmp/ccw33VYP.o: In function `main':
>>> |file.c:(.text+0x6): relocation truncated to fit: R_68K_PC16 against 
>>> `.data'
>>> |collect2: ld returned 1 exit status
>>>
>>> This is reported as #36047. It appears that the generated label is 
>>> unused.
>>
>> As I noted in the PR 
>> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36047> neither GLIBC nor 
>> uClibc need the argument so we may simply remove it (thus getting rid 
>> of the PC-relative relocation that causes the problem).
>>
>> Andreas, does this look OK to you?
> My areas of concern would be:
> 
>   1. Does anyone hook the mcount call and expect the a0/a1 to have 
> reasonable values.  For example, the kernel tracing code?

I don't think so.  M68K kernel does not define any target-specific code 
for profiling.

> 
>   2. When did glibc change to its new approach?  If it was recent, then 
> we probably can't assume the newer implementation.

I looked through revision history of glibc-port and didn't find any 
mentions of _mcount implementation in the m68k directories since GLIBC 2.3.

-- 
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724

  reply	other threads:[~2009-11-23 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 13:51 Sebastian Andrzej Siewior
2009-11-19 13:57 ` Maxim Kuvyrkov
2009-11-23 17:35   ` Jeff Law
2009-11-23 18:25     ` Maxim Kuvyrkov [this message]
2009-11-23 21:58       ` Andreas Schwab
2009-11-23 20:12     ` Sebastian Andrzej Siewior
2009-11-23 21:57   ` Andreas Schwab
2009-12-06 20:47     ` [PATCH v2] " Sebastian Andrzej Siewior
2009-12-06 21:28       ` Andreas Schwab
2009-12-11  9:53         ` Maxim Kuvyrkov
2009-12-11  9:58           ` Sebastian Andrzej Siewior
2009-12-11 15:39             ` Maxim Kuvyrkov

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=4B0AD18D.5000406@codesourcery.com \
    --to=maxim@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=schwab@redhat.com \
    --cc=sebastian@breakpoint.cc \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).