--- ceph-15.1.0/src/common/crc32c_intel_fast_asm.s.orig 2020-03-04 14:37:33.431024436 -0500 +++ ceph-15.1.0/src/common/crc32c_intel_fast_asm.s 2020-03-04 15:11:22.859388783 -0500 @@ -40,6 +40,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ; crcB3 MACRO to implement crc32 on 3 %%bSize-byte blocks %macro crcB3 3 %define %%bSize %1 ; 1/3 of buffer size @@ -672,3 +673,22 @@ ; inform linker that this doesn't require executable stack section .note.GNU-stack noalloc noexec nowrite progbits %endif + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +SECTION .note.gnu.property align=8 noexec ; section number 22, const + + db 04H, 00H, 00H, 00H, 20H, 00H, 00H, 00H ; 0000 _ .... ... + db 05H, 00H, 00H, 00H, 47H, 4EH, 55H, 00H ; 0008 _ ....GNU. + db 00H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0010 _ ........ + db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0018 _ ........ + db 01H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0020 _ ........ + db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0028 _ ........ + db 04H, 00H, 00H, 00H, 10H, 00H, 00H, 00H ; 0030 _ ........ + db 05H, 00H, 00H, 00H, 47H, 4EH, 55H, 00H ; 0038 _ ....GNU. + db 02H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0040 _ ........ + db 03H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0048 _ ........ + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --- ceph-15.1.0/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-03-04 15:13:06.577071783 -0500 +++ ceph-15.1.0/src/common/crc32c_intel_fast_zero_asm.s 2020-03-04 15:13:49.873356953 -0500 @@ -654,3 +654,22 @@ ; inform linker that this doesn't require executable stack section .note.GNU-stack noalloc noexec nowrite progbits %endif + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +SECTION .note.gnu.property align=8 noexec ; section number 22, const + + db 04H, 00H, 00H, 00H, 20H, 00H, 00H, 00H ; 0000 _ .... ... + db 05H, 00H, 00H, 00H, 47H, 4EH, 55H, 00H ; 0008 _ ....GNU. + db 00H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0010 _ ........ + db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0018 _ ........ + db 01H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0020 _ ........ + db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0028 _ ........ + db 04H, 00H, 00H, 00H, 10H, 00H, 00H, 00H ; 0030 _ ........ + db 05H, 00H, 00H, 00H, 47H, 4EH, 55H, 00H ; 0038 _ ....GNU. + db 02H, 00H, 00H, 0C0H, 04H, 00H, 00H, 00H ; 0040 _ ........ + db 03H, 00H, 00H, 00H, 00H, 00H, 00H, 00H ; 0048 _ ........ + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --- ceph-15.1.0/src/yasm-wrapper.orig 2020-03-09 12:57:37.603837466 -0400 +++ ceph-15.1.0/src/yasm-wrapper 2020-03-09 13:02:31.496796609 -0400 @@ -1,10 +1,11 @@ -#!/bin/sh -e +#!/bin/sh # libtool and yasm do not get along. # filter out any crap that libtool feeds us that yasm does not understand. #echo $0: got $* new="" touch="" +object="" while [ -n "$*" ]; do case "$1" in -f ) @@ -29,6 +30,12 @@ touch="$1" shift ;; + -o ) + shift + object="$1" + new="$new -o $1" + shift + ;; * ) new="$new $1" shift @@ -39,6 +46,25 @@ #echo $0: yasm $new yasm $new +INDEXOFNOTEGNUPROPLINE=$(readelf -S -W ${object} | grep ".note.gnu.property") + +if [ -n "${INDEXOFNOTEGNUPROPLINE}" ]; then + + STARTOFSECTHDRLINE=$(readelf -h ${object} | grep "Start of section headers:") + SIZEOFSECTHDRLINE=$(readelf -h ${object} | grep "Size of section headers:") + + STARTOFSECTHDR=$(echo ${STARTOFSECTHDRLINE} | cut -d ' ' -f 5) + SIZEOFSECTHDR=$(echo ${SIZEOFSECTHDRLINE} | cut -d ' ' -f 5) + INDEXOFNOTEGNUPROPFRAG=$(echo ${INDEXOFNOTEGNUPROPLINE} | cut -d '.' -f 1) + + INDEXOFNOTEGNUPROP=$(echo ${INDEXOFNOTEGNUPROPFRAG} | grep -Eo "[[:digit:]]+") + + OFFSET=$(( ${STARTOFSECTHDR} + 4 + ( ${SIZEOFSECTHDR} * ${INDEXOFNOTEGNUPROP} ) )) + + printf '\x07' | dd of=${object} bs=1 seek=${OFFSET} count=1 conv=notrunc &> /dev/null + +fi + [ -n "$touch" ] && touch $touch true