Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1308563

Re: dynamic ftrace/recordmcount.c problem on ARMv5

From Marc Kleine-Budde <mkl@pengutronix.de>
Newsgroups linux.kernel
Subject Re: dynamic ftrace/recordmcount.c problem on ARMv5
Date 2016-01-13 17:30 +0100
Message-ID <qQwt5-2jv-13@gated-at.bofh.it> (permalink)
References <qQprA-5DL-17@gated-at.bofh.it> <qQw9I-2at-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 01/13/2016 05:08 PM, Steven Rostedt wrote:
> On Wed, 13 Jan 2016 09:51:28 +0100
> Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> 
>> There are 5 calls to __gnu_mcount_nc in the object file:
>>> $ objdump -x arch/arm/kernel/stacktrace.o | grep R_ARM_CALL | grep __gnu_mcount_nc
>>> 00000054 R_ARM_CALL        __gnu_mcount_nc
>>> 0000016c R_ARM_CALL        __gnu_mcount_nc
>>> 00000234 R_ARM_CALL        __gnu_mcount_nc
>>> 0000026c R_ARM_CALL        __gnu_mcount_nc
>>> 000002f4 R_ARM_CALL        __gnu_mcount_nc  
>>
>> However there are 6 references in the __mcount_loc section:
>>> $ readelf -R __mcount_loc arch/arm/kernel/stacktrace.o                            
>>>
>>> Hex dump of section '__mcount_loc':
>>>   0x00000000 24000000 54000000 6c010000 34020000 $...T...l...4...
>>>   0x00000010 6c020000 f4020000                   l.......  
>>
>> Note: The first and wrong offset is 0x24, which is a "bx r6" (see above
>> objdump of stacktrace.o):
>>>   24:	e12fff16 	bx	r6  
> 
> Interesting. Have you tried a make mrproper and tried again? Also, do
> you use hardlinks with ccache?

That happens on ARMv5 with a clean build. No ccache involved (this issue
should be fixed on >= v4.4)

>> I hacked scripts/Makefile.build to use the perl version of recordmcount,
>> that works without problems.
> 
> Note, you could also just removed CONFIG_HAVE_C_RECORDMCOUNT from
> arch/arm/Kconfig.

This is the patch I'm using as a workaround.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

dynamic ftrace/recordmcount.c problem on ARMv5 Marc Kleine-Budde <mkl@pengutronix.de> - 2016-01-13 10:00 +0100
  Re: dynamic ftrace/recordmcount.c problem on ARMv5 Steven Rostedt <rostedt@goodmis.org> - 2016-01-13 17:10 +0100
    Re: dynamic ftrace/recordmcount.c problem on ARMv5 Marc Kleine-Budde <mkl@pengutronix.de> - 2016-01-13 17:30 +0100
      Re: dynamic ftrace/recordmcount.c problem on ARMv5 Steven Rostedt <rostedt@goodmis.org> - 2016-01-13 17:30 +0100
        Re: dynamic ftrace/recordmcount.c problem on ARMv5 Marc Kleine-Budde <mkl@pengutronix.de> - 2016-01-13 17:40 +0100

csiph-web