[PATCH] D17242: [ELF] - Linkerscript KEEP command.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 07:35:22 PST 2016
>So, in the context of this change, I think the most important
>performance cases are
>
>* Linker script is not used
>* Linker script without KEEP
>* Linker script with KEEP
>
I>f I read it correctly, the first case should not change much since
>Sections will be empty.
>
>One interesting case you might want to add a test for and check what
>bfd and gold do:
>
>A section name matches two entries in the SECTIONS directive. The
>first one doesn't have KEEP, the second one does.
>
Like that ?
SECTIONS {
.temp : { *(.keep) }
.keep : { KEEP(*(.keep)) }
}
vs
SECTIONS {
.keep : { KEEP(*(.keep)) }
.temp : { *(.keep) }
}
For first case gold does not keep the section, for second - it does. So it depends on order.
KEEP patch has the equal behavior. I updated the test cases to demonstrate.
>I suggest that because I possible "optimization" that I though was to
>check match only on section that have the Keep flag, but that would
>change the result in this case.
>
>Cheers,
>Rafael
More information about the llvm-commits
mailing list