On Thu, 2020-04-23 at 22:03 +0000, Oleksandr Ocheretnyi via
lists.openembedded.org wrote:
> I've noticed that patch
> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-9.3/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch?h=dunfell
>  applied to gcc sources changes default linker path for almost
> all binaries in the prepared image.
> 
> However the https://sourceware.org/glibc/wiki/ABIList is ignored in
> case of multilib or usrmerge structure of the image's rootfs.
> 
> After some investigations I found the SYSTEMLIBS_DIR constant is
> dependent on ${root_prefix} and ${baselib} variables,
> where the ${root_prefix} is "/usr" (usrmerge feature is enabled). So
> finally the program interpreter is changed to
> /usr/lib/ld-linux-x86-64.so.2 (as example I use x86-64) instead
> of /lib64/ld-linux-x86-64.so.2 according to the glibc ABIList.
> 
> Shall the OE core layer be compatible to the glibc ABIList when the
> usrmerge feature is enabled?

The project historically supports setting "libdir" and "base_libdir" to
whatever the user sets it to. This includes the paths to the dynamic
loaders. In the past, if base_libdir was set to "/lib", we received bug
reports if "/lib64" existed in the resulting images even if it was just
the loader.

We don't have controls for "use /lib, except for the dynamic loader"
and when we have tried, its been rather messy.

So yes, its expected to see the behaviour you're seeing and no, it
doesn't conform to the ABIList from glibc in that configuration.

We probably do need such controls but they are going to be tricky to
implement since you can't use ${base_libdir} to package the dynamic
loader and it would need its own set of new variables, hence becoming
more of a maintainability nightmare. Alternatively you break
compatibility with many existing configurations.

I'd also note that being able to relocate the dynamic loader lets us
make uninative and SDK relocation work.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1064): 
https://lists.openembedded.org/g/openembedded-architecture/message/1064
Mute This Topic: https://lists.openembedded.org/mt/73206869/21656
Group Owner: openembedded-architecture+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to