Package: qemu-user-static
Version: 1:7.2+dfsg-7+deb12u2
Followup-For: Bug #1053101

After several experiments and using `readelf -l` to check that there is
no INTERP Program Header and testing with

qemu-7.2+dfsg/b/user-static/qemu-aarch64 -d page 
sid-aarch64/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1  --verify 
sid-aarch64/usr/bin/aarch64-linux-gnu-g++-13

I am reasonably confident that removing --disable-pie is the solution
for this.

The only caveat is the tests are specific to amd64 host and aarch64
target and I cannot test all the other potential combinations for a
regression.

However I've included a debdiff with the proposed change.
diff -Nru qemu-7.2+dfsg/debian/changelog qemu-7.2+dfsg/debian/changelog
--- qemu-7.2+dfsg/debian/changelog      2023-08-17 10:33:57.000000000 +0100
+++ qemu-7.2+dfsg/debian/changelog      2023-11-26 09:26:24.000000000 +0000
@@ -1,3 +1,9 @@
+qemu (1:7.2+dfsg-7+deb12u2.1) UNRELEASED; urgency=medium
+
+  * user-static: build position independent executable. Closes: #1053101.
+
+ -- Tj <deb...@iam.tj>  Sun, 26 Nov 2023 09:26:24 +0000
+
 qemu (1:7.2+dfsg-7+deb12u2) bookworm; urgency=medium
 
   * d/rules: add the forgotten --enable-virtfs for the xen build.
diff -Nru qemu-7.2+dfsg/debian/rules qemu-7.2+dfsg/debian/rules
--- qemu-7.2+dfsg/debian/rules  2023-08-17 10:33:57.000000000 +0100
+++ qemu-7.2+dfsg/debian/rules  2023-11-26 09:26:24.000000000 +0000
@@ -363,7 +363,7 @@
        cd b/user-static && \
            ../../configure ${common_configure_opts} \
                --extra-cflags="${extra-cflags}$(if $(filter 
${DEB_HOST_ARCH},arm64), -fno-pie -no-pie,)" \
-               --static --disable-pie --disable-system --disable-xen \
+               --static --disable-system --disable-xen \
                --target-list="$(addsuffix -linux-user,${user_targets})"
        touch $@
 build-user-static: b/user-static/built

Reply via email to