diff --git a/s390-tools-2.3.0-zipl-pie.patch b/s390-tools-2.3.0-zipl-pie.patch new file mode 100644 index 0000000..f07e7fd --- /dev/null +++ b/s390-tools-2.3.0-zipl-pie.patch @@ -0,0 +1,19 @@ +commit d87a3499ac4bb3f834982506c5b00d6470e1f015 +Author: Dan Horák +Date: Fri Apr 13 10:51:00 2018 +0200 + + compute the bootloader stage size to workaround PIE + +diff --git a/zipl/src/boot.c b/zipl/src/boot.c +index 9daf47b..279d246 100644 +--- a/zipl/src/boot.c ++++ b/zipl/src/boot.c +@@ -21,7 +21,7 @@ + #include "error.h" + #include "misc.h" + +-#define DATA_SIZE(x) ((size_t) (&_binary_##x##_bin_size)) ++#define DATA_SIZE(x) ((size_t) (&_binary_##x##_bin_end - &_binary_##x##_bin_start)) + #define DATA_ADDR(x) (&_binary_##x##_bin_start) + + #define STAGE2_MAX_SIZE 0x3000 diff --git a/s390utils.spec b/s390utils.spec index f3254d1..08d8f85 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,7 +5,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Group: System Environment/Base Version: 2.3.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -28,6 +28,9 @@ Source16: ccw_init Source17: ccw.udev Source21: normalize_dasd_arg +# https://bugzilla.redhat.com/show_bug.cgi?id=1566140 +Patch0: s390-tools-2.3.0-zipl-pie.patch + Patch1000: cmsfs-1.1.8-warnings.patch Patch1001: cmsfs-1.1.8-kernel26.patch Patch1002: cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch @@ -53,7 +56,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %setup -q -n s390-tools-%{version} -a 4 -a 6 # Fedora/RHEL changes -# none +%patch0 -p1 -b .zipl-pie # # cmsfs @@ -785,6 +788,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Apr 13 2018 Dan Horák - 2:2.3.0-3 +- fix building zipl with PIE (#1566140) + * Mon Mar 12 2018 Dan Horák - 2:2.3.0-2 - fix LDFLAGS injection (#1552661)