Re: [PATCH v4 3/6] Change the symbols order when --ffuntion-sections is enabled

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

 



On Tue, Oct 22, 2024 at 8:43 AM Rong Xu <xur@xxxxxxxxxx> wrote:
>
> On Sun, Oct 20, 2024 at 7:15 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu <xur@xxxxxxxxxx> wrote:
> > >
> > > When the -ffunction-sections compiler option is enabled, each function
> > > is placed in a separate section named .text.function_name rather than
> > > putting all functions in a single .text section.
> > >
> > > However, using -function-sections can cause problems with the
> > > linker script. The comments included in include/asm-generic/vmlinux.lds.h
> > > note these issues.:
> > >   “TEXT_MAIN here will match .text.fixup and .text.unlikely if dead
> > >    code elimination is enabled, so these sections should be converted
> > >    to use ".." first.”
> > >
> > > It is unclear whether there is a straightforward method for converting
> > > a suffix to "..".
> >
> >
> >
> > Why not for ".text.fixup"?
> >
> > $ git grep --name-only '\.text\.fixup' | xargs sed -i
> > 's/\.text\.fixup/.text..fixup/g'
> >
>
> I did not move .text.fixup because it currently groups together with TEXT_MAIN.

OK. Then, .text.fixup is not a problem.



> >
> > Why did you do this conditionally?
> >
> > You are making this even more unmaintainable.
>
> Again, we don't want to change the default build.
>
> If you think the change can apply to the default build, we would be
> happy to remove the condition.


I believe this should be done unconditionally.

If you are concerned about changing the default,
I am concerned about changing it under any condition.

We should avoid maintaining two section layouts.




--
Best Regards
Masahiro Yamada





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux