All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev,
	patches@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld
Date: Wed, 11 May 2022 11:49:59 -0700	[thread overview]
Message-ID: <20220511185001.3269404-1-nathan@kernel.org> (raw)

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/

Changelog:

v1 -> v2: https://lore.kernel.org/20220509204635.2539549-1-nathan@kernel.org/

* 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
-- 
2.36.1


WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	llvm@lists.linux.dev, Nick Desaulniers <ndesaulniers@google.com>,
	patches@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>,
	Paul Mackerras <paulus@samba.org>, Tom Rix <trix@redhat.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld
Date: Wed, 11 May 2022 11:49:59 -0700	[thread overview]
Message-ID: <20220511185001.3269404-1-nathan@kernel.org> (raw)

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/

Changelog:

v1 -> v2: https://lore.kernel.org/20220509204635.2539549-1-nathan@kernel.org/

* 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
-- 
2.36.1


             reply	other threads:[~2022-05-11 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 18:49 Nathan Chancellor [this message]
2022-05-11 18:49 ` [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld Nathan Chancellor
2022-05-11 18:50 ` [PATCH v2 1/2] powerpc/vdso: Remove unused ENTRY in linker scripts Nathan Chancellor
2022-05-11 18:50   ` Nathan Chancellor
2022-05-11 18:50 ` [PATCH v2 2/2] powerpc/vdso: Link with ld.lld when requested Nathan Chancellor
2022-05-11 18:50   ` Nathan Chancellor
2022-05-24 11:08 ` [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld Michael Ellerman
2022-05-24 11:08   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220511185001.3269404-1-nathan@kernel.org \
    --to=nathan@kernel.org \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=llvm@lists.linux.dev \
    --cc=mpe@ellerman.id.au \
    --cc=ndesaulniers@google.com \
    --cc=patches@lists.linux.dev \
    --cc=paulus@samba.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.