lkml.org 
[lkml]   [2017]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From: David Miller <davem@davemloft.net>
Date: Thu, 22 Jun 2017 10:13:06 -0400 (EDT)

> From: Nicholas Piggin <npiggin@gmail.com>
> Date: Thu, 22 Jun 2017 18:41:16 +1000
>
>> Is there any way for the linker to place the inputs to avoid unresolvable
>> relocations where possible?
>
> I don't think so.
>
>> A way to work around this is to make arch/sparc/lib/hweight.o an obj-y
>> rather than lib-y. That's a hack because it just serves to move the
>> input location, but not really any more of a hack than the current code
>> that also only works because of input locations...
>
> I could adjust those branches in the sparc code into indirect calls
> but it's going to perform a bit poorly on older cpus.
>
> Something like this:

I just wanted to mention something in passing.

On sparc64 we patch the first two instructions of memcpy, memset,
bzero, etc. in order to vector them to cpu optimized routines.

And we use the same kind of branch there.

Now because the branches are to routines in the same directory it
should never exceed the relocation limits.

However, if the relocation limits were exceeded in this case, the
build would still succeed and the kernel would be simply broken and
not bootup properly.

\
 
 \ /
  Last update: 2017-06-22 20:04    [W:0.066 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site