From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V
Date: Mon, 17 May 2021 15:04:49 +0200 [thread overview]
Message-ID: <20210517130449.GV2506@scaer> (raw)
In-Reply-To: <20210502214919.1826571-2-romain.naour@gmail.com>
Romain, All,
On 2021-05-02 23:49 +0200, Romain Naour spake thusly:
> Backport an upstream patch fixing a link issue with libgc.so on RISC-V
>
> riscv64-buildroot-linux-musl/sysroot/usr/lib/libgc.so: undefined reference to `__data_start'
>
> https://gitlab.com/kubu93/buildroot/-/jobs/1229888983
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
I considered applying for master, but that depends on libatomic-ops
support on riscv, which is arguably a new feature, so does not belong to
master.
Applied to next, thanks.
Regards,
Yann E. MORIN.
> ---
> ...ference-to-__data_start-linker-error.patch | 33 +++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
>
> diff --git a/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> new file mode 100644
> index 0000000000..81221c9f66
> --- /dev/null
> +++ b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> @@ -0,0 +1,33 @@
> +From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001
> +From: Nikita Ermakov <coffe92@gmail.com>
> +Date: Wed, 20 May 2020 17:57:17 +0300
> +Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
> + RISC-V
> +
> +Issue #294 (bdwgc).
> +
> +* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
> +attribute(weak).
> +
> +(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9)
> +Signed-off-by: Romain Naour <romain.naour@gmail.com>
> +---
> + include/private/gcconfig.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
> +index d9d45da1..d6cefa6f 100644
> +--- a/include/private/gcconfig.h
> ++++ b/include/private/gcconfig.h
> +@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN
> + # define ALIGNMENT (CPP_WORDSZ/8)
> + # ifdef LINUX
> + # define OS_TYPE "LINUX"
> +- extern int __data_start[];
> ++ extern int __data_start[] __attribute__((__weak__));
> + # define DATASTART ((ptr_t)__data_start)
> + # define LINUX_STACKBOTTOM
> + # define DYNAMIC_LOADING
> +--
> +2.30.2
> +
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2021-05-17 13:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
2021-05-03 0:15 ` Alistair Francis
2021-05-17 13:04 ` Yann E. MORIN [this message]
2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
2021-05-03 0:15 ` Alistair Francis
2021-05-17 13:06 ` Yann E. MORIN
2021-05-02 21:49 ` [Buildroot] [PATCH 3/5] package/poke: new package Romain Naour
2021-05-17 13:25 ` Yann E. MORIN
2021-05-17 14:19 ` Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 4/5] package/poke: add optional json-c dependency Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 5/5] package/poke: enable uClibc-ng support Romain Naour
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=20210517130449.GV2506@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox