Bug 26717 - Detect incompatible shared libraries
Summary: Detect incompatible shared libraries
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.33
: P2 normal
Target Milestone: 2.33
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-08 12:59 UTC by H.J. Lu
Modified: 2020-10-08 12:59 UTC (History)
1 user (show)

See Also:
Host:
Target: x86-64
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2020-10-08 12:59:41 UTC
When an x86-64-v4 shared library is placed in the x86-64-v2 directory by
mistake on a x86-64-v2 machine, the program may run for a while and then
crashes on x86-64-v4 instructions.  The linker with -z x86-64-v[234]

https://sourceware.org/pipermail/binutils/2020-October/113633.html

can add an x86-64-v[234] marker.  In addition to EM_X86_64, the
GNU_PROPERTY_X86_ISA_1_V[234] marker can be used by ld.so to detect
the x86-64-v4 shared library placed in an x86-64-v2 directory to
avoid crashes on x86-64-v4 instructions.