From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 912F93858CDA; Fri, 2 Dec 2022 03:08:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 912F93858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669950513; bh=d9olgunaneTQqNA+seyF7Vh6cq5Ibv8c4ELVs36Y1Sw=; h=From:To:Subject:Date:From; b=Sq5y/6SZHffoltJvIGfp60kOZkDOhSFzQ3gAQm9Po1tIzR2vS1OHR/odTuzxHDvJd QOnsUR7hfmkc9PLsTIG24XFfNVHYVYHzgN/w6/b6hndow3lYKDU7o6v2b6oIae9QER XBYjJI3rHoeIUDoDFUzNa15Vw4J/UlK60b9VAwaI= From: "linzhuorong at huawei dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/29840] New: elf_machine_dynamic compile error when compiling glibc with --enable-static-pie option turned on Date: Fri, 02 Dec 2022 03:08:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: linzhuorong at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29840 Bug ID: 29840 Summary: elf_machine_dynamic compile error when compiling glibc with --enable-static-pie option turned on Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: linzhuorong at huawei dot com Target Milestone: --- The patch that caused the error: https://sourceware.org/git/?p=3Dglibc.git;a=3Dcommit;h=3Dbca0f5cbc9257c1332= 2b99e55235c4f21ba0bd82 Error when compiling glibc with gcc-10.3.0 compiler with --enable-static-pie enabled I think Static executables do not have symbol _DYNAMIC Log: /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/arm-linux-glibc/lib/gcc/arm-linux-gnueabi/10.3.0/../../../../arm-lin= ux-gnueabi/bin/ld: /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/obj/build-glibc/libc.a(dl-reloc-static-pie.o): in function elf_machine_rel': /home/XXXX/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/gli= bc-2.34/elf/../sysdeps/arm/dl-machine.h:440: undefined reference to _DYNAMIC' /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/arm-linux-glibc/lib/gcc/arm-linux-gnueabi/10.3.0/../../../../arm-lin= ux-gnueabi/bin/ld: /home/XXXX/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/gli= bc-2.34/elf/../sysdeps/arm/dl-machine.h:440: undefined reference to _DYNAMIC' /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/arm-linux-glibc/lib/gcc/arm-linux-gnueabi/10.3.0/../../../../arm-lin= ux-gnueabi/bin/ld: /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/obj/build-glibc/elf/sln: hidden symbol _DYNAMIC' isn't defined /home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bui= ld_dir/arm-linux-glibc/lib/gcc/arm-linux-gnueabi/10.3.0/../../../../arm-lin= ux-gnueabi/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [/home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bu= ild_dir/obj/build-glibc/elf/sln] Error 1 ../Rules:293: recipe for target '/home/XXXX/workspace/compiler/gcc/build/arm-linux-glibc/arm_linux_glibc_bu= ild_dir/obj/build-glibc/elf/sln' failed make[2]: Leaving directory '/home/XXXX/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/gl= ibc-2.34/elf' make[1]: *** [elf/subdir_install] Error 2 Makefile:478: recipe for target 'elf/subdir_install' failed make[1]: Leaving directory '/home/XXXX/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/gl= ibc-2.34' Makefile:12: recipe for target 'install' failed make: *** [install] Error 2 ~/workspace/compiler/gcc/build/arm-linux-glibc ~/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/platform ~/workspace/compiler/gcc/build/arm-linux-glibc cd ./secure_c/src && make make[1]: Entering directory '/home/XXXX/workspace/compiler/gcc/open_source/arm-linux-glibc-build_src/pl= atform/secure_c/src' --=20 You are receiving this mail because: You are on the CC list for the bug.=