This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] m68k: don't use lea on profiling


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.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 gcc/config/m68k/linux.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 113f278..79e9151 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -146,7 +146,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO) \
 {									\
-  asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO));		\
   if (flag_pic)								\
     fprintf (FILE, "\tbsr.l _mcount@PLTPC\n");				\
   else									\
-- 
1.6.2.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]