Wireshark-bugs: [Wireshark-bugs] [Bug 11901] New: dpkg-buildpackage relocation R_X86_64_PC32 aga
Date: Thu, 17 Dec 2015 08:52:11 +0000
Bug ID 11901
Summary dpkg-buildpackage relocation R_X86_64_PC32 against symbol
Product Wireshark
Version 2.0.0
Hardware x86
OS Debian
Status UNCONFIRMED
Severity Normal
Priority Low
Component Build process
Assignee bugzilla-admin@wireshark.org
Reporter sv@its-v.de

Created attachment 14154 [details]
Disable PIE hardening flags

Build Information:
Debian Wheezy 64bit
cmake 2.8.9
git commit 9a73b82 aka wireshark-2.0.0
--
[ The fix for #11617 is included ]

Building on Debian Wheezy using dpkg-buildpackage fails with

Linking C shared library ../run/libwsutil.so
/usr/bin/ld: CMakeFiles/wsutil.dir/privileges.c.o: relocation R_X86_64_PC32
against symbol `started_with_special_privs' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

I tracked it down to the PIE hardening flags[1]. They are enabled in
debian/rules:

    export DEB_BUILD_MAINT_OPTIONS = hardening=+all

The default flags for Wheezy are:

    dpkg-buildflags: status: hardening features: bindnow=no format=yes
fortify=yes pie=no relro=yes stackprotector=yes

I was able to build with the attached patch, basically enabling -Bsymbolic.
Although I am not sure if that fix is correct or if we really need PIE with
libraries as they should be relocatable already, since they are libraries, see
[2],[3].

An alternative solution would be to not enable all hardening flags, or at least
not enable PIE.

FWIW, the problem does not appear on Debian Wheezy 32 bit.

[1]
https://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_PIE_.28gcc.2Fg.2B-.2B-_-fPIE_-pie.29
[2] https://www.technovelty.org/c/what-exactly-does-bsymblic-do.html
[3] https://www.technovelty.org/c/what-exactly-does-bsymblic-do-update.html


You are receiving this mail because:
  • You are watching all bug changes.