This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] m68k: don't use lea on profiling
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