From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id CAEF83858D28 for ; Tue, 10 Oct 2023 12:36:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAEF83858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1696941395; bh=oReQRd5QDYLJ0VtCahwxAslyboeMP4tG5ekCK24vGao=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dLaYjkcS+3f+IeiiMVHFYcjB9cb1On7PYpIR06bPxMyIu6mdL573lmas8ImA+HWgf KlIJ2wovK9kjbZVKlIvgqvJcfqYV4c4/IhhtZ9MQsgTBokjlC6QQca4uK2tS0D+iai iWr1XCKbZz82KE1Cw9rIENsygt8uiNKPh40XEE2Y= Received: from [192.168.124.13] (unknown [113.140.11.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 3AA1266C19; Tue, 10 Oct 2023 08:36:34 -0400 (EDT) Message-ID: Subject: Re: What caused my executable file not to run on a Linux of old version 2.4.36.1 From: Xi Ruoyao To: Dingjun Chen , Kai Ruottu , Jonathan Wakely Cc: gcc-help Date: Tue, 10 Oct 2023 20:36:31 +0800 In-Reply-To: References: <2abfaf68-fe2c-f151-6c7f-14bb1bf8ce03@wippies.com> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-10-10 at 10:28 +0000, Dingjun Chen wrote: >=20 > Hi, Ruoyao and Kai,=C2=A0 >=20 > The kernel is too old and Please see errors occurred below. You > mentioned "because the executable may use symbols which don't exist in > the old Glibc" and You are right.=C2=A0 How to fix it?=C2=A0 I've told you: Build a cross compiler and use the root FS of the target board as the sysroot. > By the way, the GNU ld command is 64-bit. However I want to build 32- > bit executables.=C2=A0 The 64-bit ld can link 32-bit executables (with -m elf_i386). > dingjun@G02515:~/DAQ_XYZCross2_cmake/build$ objdump -f /usr/bin/ld > /usr/bin/ld: =C2=A0 =C2=A0 file format elf64-x86-64 > architecture: i386:x86-64, flags 0x00000150: > HAS_SYMS, DYNAMIC, D_PAGED > start address 0x0000000000048630 >=20 > Can I fix such an error with 32-bit ld? No. > Which GNU C/C++ compiler version can offer us a 32-bit ld to link the > objects?=C2=A0 ld is not a part of GCC. > I look forward to your help!=C2=A0 But now this is just being annoying. You are lacking some common knowledge about how a program is linked and executed. gcc-help is not for teaching these common knowledge. Try to find a textbook. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University