Skip to content

Link the PowerPC vDSO with ld.lld

Nathan Chancellor linux-patches linuxppc-dev llvm 2 versions – Applied

Status from this message: Applied to powerpc/next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 9 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2powerpc/vdso: Remove unused ENTRY in linker scriptsarch/powerpc/kernel/vdso/vdso32.lds.S arch/powerpc/kernel/vdso/vdso64.lds.S+0 -20 replies
2/2powerpc/vdso: Link with ld.lld when requestedarch/powerpc/kernel/vdso/Makefile+1 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNick DesaulniersAlexey Kardashevskiy
1/2R-b R-b T-b
2/2R-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld

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/[email protected]/

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/

Changelog:

v1 -> v2: https://lore.kernel.org/[email protected]/

* Flush out the second commit message much more with information from this cover letter and the other threads (Alexey's LTO enablement and Nick's initial stab at converting to $(CC) + $(LD)) [Nick].

* Add Nick and Alexey's tags.

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: b6b1c3ce06ca438eb24e0f45bf0e63ecad0369f5

Signature · 1 line
2.36.1