Re: Compiling parisc without -ffunction-sections?

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

 



On Fri, 20 Apr 2018 15:20:59 +0200
James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> 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.

Right, powerpc had the same problem.

When you combine modules with ld -r, the linker throws out relocs as
they get resolved, so you can no longer add stubs between them. So
the big root ones like drivers and net might become too big to escape
from.

With thin archives, we do any of that incremental linking, everything
gets linked at the end. It solved the problem for powerpc. Unless you
had a single huge .c or .S file that caused the problem, it should
work for parisc too AFAIKS.

On the other hand there's no real downside to ffunction-sections, just
that you have to get the linker script right and it differs from other
architectures.

So it's just a suggestion.

Thanks,
Nick
--
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