On 20.04.2018 16:26, Nicholas Piggin wrote: > 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. You seem to be correct. My testing so far seem to indicate that we can do without function-sections on parisc too. > 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. I did stumbled upon some issues due to usage of function-sections on parisc. Sadly I have forgotten what excactly it was. It was some issue with code used at compile-time (which exists in variants as C-code and as shell-code) running during kernel build which massaged function names. Probably it was related to function tracing. Maybe I will remember exactly at some point... > So it's just a suggestion. Thanks for that! If it turns out to work, I'll submit the patch to change it. 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