Re: Compiling parisc without -ffunction-sections?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.04.2018 04:38, Nicholas Piggin wrote:
> On Fri, 20 Apr 2018 19:46:08 -0400
> John David Anglin <dave.anglin@xxxxxxxx> wrote:
> 
>> On 2018-04-20 9:20 AM, James Bottomley wrote:
>>> On Fri, 2018-04-20 at 23:07 +1000, Nicholas Piggin wrote:  
>>>> Does parisc still need to use -ffunction-sections flag, now that we
>>>> build with thin archives and don't use `ld -r`? I think it should not
>>>> be required anymore.  
>>> I think we may have some modules that are too big.  The original
>>> problem is that without -ffunction-sections, the linker doesn't have
>>> any way of inserting trampolines in the middle of the text code, and
>>> our relative jumps are comparatively short distance, so to get from the
>>> code to the PLT is sometimes to far for a single relative jump.  
>> Correct.  This is not just an issue with `ld -r`.
>>
>> The -ffunction-sections flag is only helpful for 32-bit PA 1.x builds.  
>> PA 2.0 `b,l` branches
>> are 32 times longer and it's unlikely the maximum module size is 
>> exceeded in a 32-bit build.
>>
>> The 64-bit linker doesn't support adding long branch stubs.  This limits 
>> the maximum kernel
>> size to about 8 MB using without using long calls.  They are slow.
>>
>> I would keep this option for PA 1.x builds.
> 
> Well I'm interested. Would you really have a single .c/.S file that
> benefits from it? It's possible. gnu ld has a --stats option, for
> powerpc it gives you an output like:
> 
> powerpc64le-linux-gnu-ld: linker stubs in 0 groups
> powerpc64le-linux-gnu-ld:   branch       0
> powerpc64le-linux-gnu-ld:   toc adjust   0
> powerpc64le-linux-gnu-ld:   long branch  0
> powerpc64le-linux-gnu-ld:   long toc adj 0
> powerpc64le-linux-gnu-ld:   plt call     0
> powerpc64le-linux-gnu-ld:   plt call toc 0
> powerpc64le-linux-gnu-ld:   global entry 0
> powerpc64le-linux-gnu-ld: total time in link: 0.242010
> 
> Not sure if parisc has the same output, but if it does, add --stats to
> LDFLAGS_vmlinux, and you could see what happens with/without
> -ffunction-sections.

That's all I get on parisc:
hppa-linux-gnu-ld: total time in link: 0.409295
hppa-linux-gnu-ld: data size 43970560

Helge
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux