]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
ldconfig-native: Fix to point correctly on the DT_NEEDED entries in an ELF file
authorFabien Mahot <fabien.mahot@external.desouttertools.com>
Fri, 16 Feb 2024 09:36:44 +0000 (10:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 17 Feb 2024 18:17:48 +0000 (18:17 +0000)
commit22e35ccf3731164722e3cda9de1802d7326cb507
treea28453b6d87d1fdfae63a595dab2e273dfc13e08
parent1e24197070abbeabfca1883975b9996f29898745
ldconfig-native: Fix to point correctly on the DT_NEEDED entries in an ELF file

When ldconfig-native reads an ELF file, it computes an offset from a LOAD
segment, to point on DT NEEDED entries of dynstr section.
Without this patch, ldconfig-native uses only the first LOAD segment, even if
the offset is incorrect.
This patch adds conditions to compute the offset by parsing all LOAD segments,
one by one.

This is a backport from [0], ported to support endianness and 32/64 bits.

[0]: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=58e8f5fd2ba47b6dc47fd4d0a35e4175c7c87aaa

Signed-off-by: Fabien Mahot <fabien.mahot@external.desouttertools.com>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-handle-.dynstr-located-in-separate-segment.patch [new file with mode: 0644]
meta/recipes-core/glibc/ldconfig-native_2.12.1.bb