[RFC PATCH 2/5] riscv: Address differences in the linkerscript between GNU LD and LLVM/LLD

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 24 08:58:20 UTC 2019


On 23/10/2019 15:44, Hesham Almatary wrote:
> LLVM/LLD does not support STARTUP and ALIGN_WITH_INPUT directives that
> GNU LD support. INPUT and ALIGN(8) are supported by LLVM/LLD and can
> replace the unsupported STARTUP/ALIGN_WITH_INPUT directives.
> 
> The commit conditionally adds the supported directive that linkers
> can understand depending on the toolchain used to compile RTEMS
> i.e., clang or gcc. Clang is assumed to use LLD by default.
> ---
>   bsps/riscv/shared/start/linkcmds.base.in  | 102 +++++++++++-----------
>   c/src/lib/libbsp/riscv/riscv/configure.ac |  13 +++
>   2 files changed, 64 insertions(+), 51 deletions(-)
> 
> diff --git a/bsps/riscv/shared/start/linkcmds.base.in b/bsps/riscv/shared/start/linkcmds.base.in
> index 7d889ab38c..857bf2dabd 100644
> --- a/bsps/riscv/shared/start/linkcmds.base.in
> +++ b/bsps/riscv/shared/start/linkcmds.base.in
> @@ -33,7 +33,7 @@
>   
>   OUTPUT_ARCH(riscv)
>   ENTRY(_start)
> -STARTUP(start.o)
> + at RISCV_LINKER_START_DIRECTIVE@(start.o)

Works INPUT() instead of STARTUP() with GNU ld as well?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list