Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package:uclibc-ng:enable gnu hash for non mips platforms
@ 2024-09-08  8:36 Hans Ulli Kroll
  2024-10-28 22:01 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Ulli Kroll @ 2024-09-08  8:36 UTC (permalink / raw)
  To: buildroot; +Cc: Hans Ulli Kroll

In toolchain-wrapper.mk we use both sysv and gnu hash style for all
platforms, except MIPS which uses sysv only.

However uClibc-ng has some extra knob to enable gnu hash via Kconfig,
which is set by default off.

This leads to wrong symbol resolving on armv5 and output of devices,
here on Pogoplug 4 detected with lcpci 3.10.

Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
---
 package/uclibc/uclibc.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index de834bac4f..f48ebe6a16 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -205,6 +205,12 @@ define UCLIBC_X86_TYPE_CONFIG
 endef
 endif
 
+ifneq ($(UCLIBC_TARGET_ARCH),mips)
+define UCLIBC_LDSO_GNU_HASH_SUPPORT
+	$(call KCONFIG_ENABLE_OPT,LDSO_GNU_HASH_SUPPORT)
+endef
+endif
+
 #
 # Debug
 #
@@ -403,6 +409,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_SH_TYPE_CONFIG)
 	$(UCLIBC_SPARC_TYPE_CONFIG)
 	$(UCLIBC_POWERPC_TYPE_CONFIG)
+	$(UCLIBC_LDSO_GNU_HASH_SUPPORT)
 	$(UCLIBC_X86_TYPE_CONFIG)
 	$(UCLIBC_DEBUG_CONFIG)
 	$(UCLIBC_ENDIAN_CONFIG)
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package:uclibc-ng:enable gnu hash for non mips platforms
  2024-09-08  8:36 [Buildroot] [PATCH] package:uclibc-ng:enable gnu hash for non mips platforms Hans Ulli Kroll
@ 2024-10-28 22:01 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-28 22:01 UTC (permalink / raw)
  To: Hans Ulli Kroll; +Cc: buildroot

Hello Hans,

Thanks for your patch!

On Sun,  8 Sep 2024 10:36:36 +0200
Hans Ulli Kroll <linux@ulli-kroll.de> wrote:

> In toolchain-wrapper.mk we use both sysv and gnu hash style for all
> platforms, except MIPS which uses sysv only.

The logic in toolchain-wrapper.mk regarding --hash-style is about
building the toolchain-wrapper executable for the host. So I really
don't see how this can be related to the uClibc library built for the
target.

> However uClibc-ng has some extra knob to enable gnu hash via Kconfig,
> which is set by default off.
> 
> This leads to wrong symbol resolving on armv5 and output of devices,
> here on Pogoplug 4 detected with lcpci 3.10.

In principle, I have nothing against your patch, but I must say I don't
really understand why it solves your problem, and what is the
impact/consequences.

Hans, do you have more details on the problems you are seeing?

Waldemar, any input?

As far as I can see from a quick look, we default to --hash-style=both,
as far as I can see in the Busybox binary:

  [ 3] .hash             HASH            00000190 000190 000a10 04   A  5   0  4
  [ 4] .gnu.hash         GNU_HASH        00000ba0 000ba0 000018 04   A  5   0  4

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-10-28 22:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-08  8:36 [Buildroot] [PATCH] package:uclibc-ng:enable gnu hash for non mips platforms Hans Ulli Kroll
2024-10-28 22:01 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox