linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Link the PowerPC vDSO with ld.lld
@ 2022-05-09 20:46 Nathan Chancellor
  2022-05-09 20:46 ` [PATCH 1/2] powerpc/vdso: Remove unused ENTRY in linker scripts Nathan Chancellor
  2022-05-09 20:46 ` [PATCH 2/2] powerpc/vdso: Link with ld.lld when requested Nathan Chancellor
  0 siblings, 2 replies; 12+ messages in thread
From: Nathan Chancellor @ 2022-05-09 20:46 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Alexey Kardashevskiy, llvm, Nick Desaulniers, patches,
	Nathan Chancellor, Paul Mackerras, Tom Rix, linuxppc-dev

Hi all,

This series is an alternative to the one proposed by Nick before the
PowerPC vDSO unification in commit fd1feade75fb ("powerpc/vdso: Merge
vdso64 and vdso32 into a single directory"):

https://lore.kernel.org/20200901222523.1941988-1-ndesaulniers@google.com/

Normally, we try to make compiling and linking two separate stages so
that they can be done by $(CC) and $(LD) respectively, which is more in
line with what the user expects, versus using the compiler as a linker
driver and relying on the implicit default linker value. However, as
shown in the above thread, getting this right for the PowerPC vDSO is a
little tricky due to the linker emulation values.

The unification might make this easier but that needs further
investigation. To avoid regressing ld.bfd while enabling support for
linking the vDSO with ld.lld, we can tell the compiler to use ld.lld via
either '--ld-path=' (clang 12.0.0) or '-fuse-ld=lld'.

The first patch avoids a warning from ld.lld when linking both vDSO
objects and the second patch adds the flags.

This should help avoid the issue noticed during Alexey's LTO bring up:

https://lore.kernel.org/CAKwvOdmUMhqhQhDCpWjMNiQQPvwOJB9MbUkF3RR0BL+H+DagmA@mail.gmail.com/

Nathan Chancellor (2):
  powerpc/vdso: Remove unused ENTRY in linker scripts
  powerpc/vdso: Link with ld.lld when requested

 arch/powerpc/kernel/vdso/Makefile     | 1 +
 arch/powerpc/kernel/vdso/vdso32.lds.S | 1 -
 arch/powerpc/kernel/vdso/vdso64.lds.S | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)


base-commit: f06351f8c0c85e2d53e73c53a33b4ef55b4ad6de
-- 
2.36.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-05-10 16:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-09 20:46 [PATCH 0/2] Link the PowerPC vDSO with ld.lld Nathan Chancellor
2022-05-09 20:46 ` [PATCH 1/2] powerpc/vdso: Remove unused ENTRY in linker scripts Nathan Chancellor
2022-05-09 21:05   ` Nick Desaulniers
2022-05-10  6:22   ` Alexey Kardashevskiy
2022-05-10  6:41     ` Fangrui Song
2022-05-09 20:46 ` [PATCH 2/2] powerpc/vdso: Link with ld.lld when requested Nathan Chancellor
2022-05-09 21:24   ` Nick Desaulniers
2022-05-09 21:47     ` Nathan Chancellor
2022-05-09 21:58       ` Nick Desaulniers
2022-05-09 22:30         ` Nathan Chancellor
2022-05-10  6:22   ` Alexey Kardashevskiy
2022-05-10 16:25     ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).