Message ID | 20250425112350.3626731-3-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | [1/3] libunwind: refresh ppc32/musl patch | expand |
On Fri, Apr 25, 2025 at 4:23 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > poky-tiny uses gcsections.inc to strip unused sections from the > binaries. However, on qemuarm5/qemuarm64 with poky-tiny this appears to > result in too much being removed and the link fails: > > ld: .libs/Gtest-trace: hidden symbol `__aarch64_cas8_acq_rel' in > libgcc.a(cas_8_4.o) is referenced by DSO > > Work around this by disabling gcsections.inc. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/recipes-support/libunwind/libunwind_1.8.1.bb | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/recipes-support/libunwind/libunwind_1.8.1.bb b/meta/recipes-support/libunwind/libunwind_1.8.1.bb > index 38022569df2..b22cb30646e 100644 > --- a/meta/recipes-support/libunwind/libunwind_1.8.1.bb > +++ b/meta/recipes-support/libunwind/libunwind_1.8.1.bb > @@ -32,6 +32,10 @@ EXTRA_OECONF = "--enable-static" > ARM_INSTRUCTION_SET:armv4 = "arm" > ARM_INSTRUCTION_SET:armv5 = "arm" > > +# With qemuarm64 and poky-tiny: > +# ld: .libs/Gtest-trace: hidden symbol `__aarch64_cas8_acq_rel' in libgcc.a(cas_8_4.o) is referenced by DSO > +LDFLAGS_SECTION_REMOVAL = "" > + While it seems to be fine here, I wonder if it should be in meta-poky/conf/distro/include/gcsections.inc as well. > LDFLAGS += "-Wl,-z,relro,-z,now" > > SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#215456): https://lists.openembedded.org/g/openembedded-core/message/215456 > Mute This Topic: https://lists.openembedded.org/mt/112449133/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-support/libunwind/libunwind_1.8.1.bb b/meta/recipes-support/libunwind/libunwind_1.8.1.bb index 38022569df2..b22cb30646e 100644 --- a/meta/recipes-support/libunwind/libunwind_1.8.1.bb +++ b/meta/recipes-support/libunwind/libunwind_1.8.1.bb @@ -32,6 +32,10 @@ EXTRA_OECONF = "--enable-static" ARM_INSTRUCTION_SET:armv4 = "arm" ARM_INSTRUCTION_SET:armv5 = "arm" +# With qemuarm64 and poky-tiny: +# ld: .libs/Gtest-trace: hidden symbol `__aarch64_cas8_acq_rel' in libgcc.a(cas_8_4.o) is referenced by DSO +LDFLAGS_SECTION_REMOVAL = "" + LDFLAGS += "-Wl,-z,relro,-z,now" SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
poky-tiny uses gcsections.inc to strip unused sections from the binaries. However, on qemuarm5/qemuarm64 with poky-tiny this appears to result in too much being removed and the link fails: ld: .libs/Gtest-trace: hidden symbol `__aarch64_cas8_acq_rel' in libgcc.a(cas_8_4.o) is referenced by DSO Work around this by disabling gcsections.inc. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/recipes-support/libunwind/libunwind_1.8.1.bb | 4 ++++ 1 file changed, 4 insertions(+)