public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "slyfox at inbox dot ru" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27318] New: glibc fails to load binaries when built with -march=sandybridge: CPU ISA level is lower than required Date: Tue, 02 Feb 2021 19:48:46 +0000 [thread overview] Message-ID: <bug-27318-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=27318 Bug ID: 27318 Summary: glibc fails to load binaries when built with -march=sandybridge: CPU ISA level is lower than required Product: glibc Version: 2.33 Status: UNCONFIRMED Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: slyfox at inbox dot ru CC: hjl.tools at gmail dot com Target Milestone: --- The system uses binutils-2.36 and gcc-11 (master). Configure glibc as: $ ../glibc/configure --host=x86_64-pc-linux-gnu CC="x86_64-pc-linux-gnu-gcc -march=sandybridge" --prefix=/usr --disable-werror $ ./elf/ld.so ./libc.so ./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3 The CPU is `Intel(R) Core(TM) i7-2700K CPU @ 3.50GHz` (sandbybridge + AES). After adding a bit of debug glibc contains ISA_1_V3 level (too high) while CPU contains ISA_1_V2 level (ok). I patched glibc slightly to get ISA levels: --- a/sysdeps/x86/dl-prop.h +++ b/sysdeps/x86/dl-prop.h @@ -54,8 +54,8 @@ dl_isa_level_check (struct link_map *m, const char *program) != l->l_x86_isa_1_needed) { if (program) - _dl_fatal_printf ("%s: CPU ISA level is lower than required\n", - *l->l_name != '\0' ? l->l_name : program); + _dl_fatal_printf ("%s: (p) CPU ISA level is lower than required: needed: %d; got: %d\n", + *l->l_name != '\0' ? l->l_name : program, l->l_x86_isa_1_needed, cpu_features->isa_1); else _dl_signal_error (0, l->l_name, "dlopen", N_("CPU ISA level is lower than required")); I suspect that binutils somehow managed to infer too high ISA level for final binary. $ readelf -a elf/ld.so | tail -n 5 Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature used: x86, x87, XMM, YMM, ZMM, FXSR, XSAVE, XSAVEC x86 ISA used: x86-64-baseline, x86-64-v3, x86-64-v4 $ LANG=C h readelf -a libc.so | tail -n 5 Displaying notes found in: .note.ABI-tag Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 3.2.0 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-02-02 19:48 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-02 19:48 slyfox at inbox dot ru [this message] 2021-02-02 20:19 ` [Bug dynamic-link/27318] " fweimer at redhat dot com 2021-02-02 20:54 ` slyfox at inbox dot ru 2021-02-02 21:11 ` hjl.tools at gmail dot com 2021-02-02 21:19 ` hjl.tools at gmail dot com 2021-02-02 21:52 ` hjl.tools at gmail dot com 2021-02-08 1:46 ` xry111 at mengyan1223 dot wang 2021-02-08 2:27 ` xry111 at mengyan1223 dot wang 2021-02-08 7:18 ` slyfox at inbox dot ru 2021-03-01 14:54 ` schwab@linux-m68k.org 2021-03-06 16:49 ` hjl.tools at gmail dot com 2021-03-16 22:28 ` sam at gentoo dot org 2021-04-27 17:16 ` sourceware at mattwhitlock dot name 2021-04-27 17:22 ` fweimer at redhat dot com 2021-04-27 17:47 ` sourceware at mattwhitlock dot name 2023-08-17 4:18 ` sam at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27318-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).