* [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine @ 2022-03-17 20:40 eric.boehm at broadcom dot com 2022-03-20 23:19 ` [Bug general/28975] " mark at klomp dot org 2022-03-24 11:34 ` mark at klomp dot org 0 siblings, 2 replies; 3+ messages in thread From: eric.boehm at broadcom dot com @ 2022-03-17 20:40 UTC (permalink / raw) To: elfutils-devel https://sourceware.org/bugzilla/show_bug.cgi?id=28975 Bug ID: 28975 Summary: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: general Assignee: unassigned at sourceware dot org Reporter: eric.boehm at broadcom dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- run-large-elf-file.sh should not run if it is a 32-bit cross-compile on a 64-bit machine. The shell script checks long_bit=$(getconf LONG_BIT) which will return 64 even if it is a 32-bit compile Here's a patch which is a bit of a hack. There are probably more appropriate ways to fix this. This affects versions 0.181-0.186 --- elfutils-0.181/tests/run-large-elf-file.sh.orig 2020-09-08 04:45:06.000000000 -0700 +++ elfutils-0.181/tests/run-large-elf-file.sh 2022-03-17 12:23:53.967607000 -0700 @@ -21,3 +21,8 @@ # ELF files. -long_bit=$(getconf LONG_BIT) +if [[ $CC =~ "-m32" ]] +then + long_bit=32 +else + long_bit=$(getconf LONG_BIT) +fi echo "long_bit: $long_bit" -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug general/28975] run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine 2022-03-17 20:40 [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine eric.boehm at broadcom dot com @ 2022-03-20 23:19 ` mark at klomp dot org 2022-03-24 11:34 ` mark at klomp dot org 1 sibling, 0 replies; 3+ messages in thread From: mark at klomp dot org @ 2022-03-20 23:19 UTC (permalink / raw) To: elfutils-devel https://sourceware.org/bugzilla/show_bug.cgi?id=28975 Mark Wielaard <mark at klomp dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org Assignee|unassigned at sourceware dot org |mark at klomp dot org Ever confirmed|0 |1 Last reconfirmed| |2022-03-20 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Mark Wielaard <mark at klomp dot org> --- You are right, we should (also) test that the test binary itself is 64bits. I would propose adding something like this: # The test binary also needs to be 64bits itself elfclass=64 testrun ${abs_top_builddir}/src/readelf -h ${abs_builddir}/addsections | grep ELF32 \ && elfclass=32 echo elfclass: $elfclass if test $elfclass -ne 64; then echo "Only 64bit binaries can create > 4GB ELF files" exit 77 fi Full patch: https://sourceware.org/pipermail/elfutils-devel/2022q1/004752.html -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug general/28975] run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine 2022-03-17 20:40 [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine eric.boehm at broadcom dot com 2022-03-20 23:19 ` [Bug general/28975] " mark at klomp dot org @ 2022-03-24 11:34 ` mark at klomp dot org 1 sibling, 0 replies; 3+ messages in thread From: mark at klomp dot org @ 2022-03-24 11:34 UTC (permalink / raw) To: elfutils-devel https://sourceware.org/bugzilla/show_bug.cgi?id=28975 Mark Wielaard <mark at klomp dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #2 from Mark Wielaard <mark at klomp dot org> --- commit d85945f1056641180e03fb48ab770b893125786e Author: Mark Wielaard <mark@klomp.org> Date: Mon Mar 21 00:34:24 2022 +0100 configure: Don't check whether -m64 works for 32bit host biarch check Running a 32bit backtrace test against a 64bit binary doesn't work. Only a 64bit binary can backtrace a 32bit binary. So disable the biarch check that inserts -m64 for a 32bit host. https://sourceware.org/bugzilla/show_bug.cgi?id=24158 Signed-off-by: Mark Wielaard <mark@klomp.org> -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-24 11:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-03-17 20:40 [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine eric.boehm at broadcom dot com 2022-03-20 23:19 ` [Bug general/28975] " mark at klomp dot org 2022-03-24 11:34 ` mark at klomp dot org
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).