Lines 15-21
exp_tf() {
Link Here
|
15 |
eval ${var}_${flag}=$(tf has ${flag} ${!var}) |
15 |
eval ${var}_${flag}=$(tf has ${flag} ${!var}) |
16 |
done |
16 |
done |
17 |
} |
17 |
} |
18 |
exp_tf FEATURES compressdebug installsources nostrip splitdebug |
18 |
exp_tf FEATURES compressdebug installsources nostrip splitdebug xattr |
19 |
exp_tf RESTRICT binchecks installsources strip |
19 |
exp_tf RESTRICT binchecks installsources strip |
20 |
|
20 |
|
21 |
if ! ___eapi_has_prefix_variables; then |
21 |
if ! ___eapi_has_prefix_variables; then |
Lines 30-35
if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
Link Here
|
30 |
${FEATURES_installsources} || exit 0 |
30 |
${FEATURES_installsources} || exit 0 |
31 |
fi |
31 |
fi |
32 |
|
32 |
|
|
|
33 |
PRESERVE_XATTR_PAX_FLAGS=false |
34 |
if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} && type -P setfattr >/dev/null ; then |
35 |
PRESERVE_XATTR_PAX_FLAGS=true |
36 |
fi |
37 |
|
33 |
# look up the tools we might be using |
38 |
# look up the tools we might be using |
34 |
for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do |
39 |
for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do |
35 |
v=${t%:*} # STRIP |
40 |
v=${t%:*} # STRIP |
Lines 292-297
do
Link Here
|
292 |
chmod u+w "${x}" |
297 |
chmod u+w "${x}" |
293 |
fi |
298 |
fi |
294 |
|
299 |
|
|
|
300 |
xt_pax_flags= |
301 |
if ${PRESERVE_XATTR_PAX_FLAGS} ; then |
302 |
xt_pax_flags="$(getfattr -n "user.pax.flags" --only-values "${x}" 2>/dev/null)" |
303 |
fi |
304 |
|
295 |
# only split debug info for final linked objects |
305 |
# only split debug info for final linked objects |
296 |
# or kernel modules as debuginfo for intermediatary |
306 |
# or kernel modules as debuginfo for intermediatary |
297 |
# files (think crt*.o from gcc/glibc) is useless and |
307 |
# files (think crt*.o from gcc/glibc) is useless and |
Lines 311-316
do
Link Here
|
311 |
process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS} |
321 |
process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS} |
312 |
fi |
322 |
fi |
313 |
|
323 |
|
|
|
324 |
if [[ ${xt_pax_flags} ]] && [[ ${#xt_pax_flags} -le 5 ]] && \ |
325 |
[[ -z ${xt_pax_flags//[-PpSsMmEeRr]} ]] ; then |
326 |
setfattr -n "user.pax.flags" -v "${xt_pax_flags}" "${x}" |
327 |
fi |
328 |
|
314 |
if ${was_not_writable} ; then |
329 |
if ${was_not_writable} ; then |
315 |
chmod u-w "${x}" |
330 |
chmod u-w "${x}" |
316 |
fi |
331 |
fi |