fipsld, incore: switch to new cross-compile support.
This commit is contained in:
parent
9a480169cd
commit
6a0ea5d239
28
fips/fipsld
28
fips/fipsld
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005-2007 The OpenSSL Project.
|
# Copyright (c) 2005-2011 The OpenSSL Project.
|
||||||
#
|
#
|
||||||
# Depending on output file name, the script either embeds fingerprint
|
# Depending on output file name, the script either embeds fingerprint
|
||||||
# into libcrypto.so or static application. "Static" refers to static
|
# into libcrypto.so or static application. "Static" refers to static
|
||||||
@ -127,12 +127,15 @@ lib*|*.dll) # must be linking a shared lib...
|
|||||||
"${PREMAIN_C}" \
|
"${PREMAIN_C}" \
|
||||||
${_WL_PREMAIN} "$@"
|
${_WL_PREMAIN} "$@"
|
||||||
|
|
||||||
# generate signature...
|
if [ "x${FIPS_SIG}" != "x" ]; then
|
||||||
if [ -z "${FIPS_SIG}" ]; then
|
# embed signature
|
||||||
SIG=`"${PREMAIN_DSO}" "${TARGET}"`
|
"${FIPS_SIG}" "${TARGET}"
|
||||||
else
|
[ $? -ne 42 ] && exit $?
|
||||||
SIG=`"${FIPS_SIG}" -dso "${TARGET}"`
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# generate signature...
|
||||||
|
SIG=`"${PREMAIN_DSO}" "${TARGET}"`
|
||||||
|
|
||||||
/bin/rm -f "${TARGET}"
|
/bin/rm -f "${TARGET}"
|
||||||
if [ -z "${SIG}" ]; then
|
if [ -z "${SIG}" ]; then
|
||||||
echo "unable to collect signature"; exit 1
|
echo "unable to collect signature"; exit 1
|
||||||
@ -172,12 +175,15 @@ lib*|*.dll) # must be linking a shared lib...
|
|||||||
"${PREMAIN_C}" \
|
"${PREMAIN_C}" \
|
||||||
${_WL_PREMAIN} "$@"
|
${_WL_PREMAIN} "$@"
|
||||||
|
|
||||||
# generate signature...
|
if [ "x${FIPS_SIG}" != "x" ]; then
|
||||||
if [ -z "${FIPS_SIG}" ]; then
|
# embed signature
|
||||||
SIG=`"${TARGET}"`
|
"${FIPS_SIG}" "${TARGET}"
|
||||||
else
|
[ $? -ne 42 ] && exit $?
|
||||||
SIG=`"${FIPS_SIG}" -exe "${TARGET}"`
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# generate signature...
|
||||||
|
SIG=`"${TARGET}"`
|
||||||
|
|
||||||
/bin/rm -f "${TARGET}"
|
/bin/rm -f "${TARGET}"
|
||||||
if [ -z "${SIG}" ]; then
|
if [ -z "${SIG}" ]; then
|
||||||
echo "unable to collect signature"; exit 1
|
echo "unable to collect signature"; exit 1
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
@e_ident{magic,class,data,version,osabi,abiver,pad}=
|
@e_ident{magic,class,data,version,osabi,abiver,pad}=
|
||||||
unpack("a4C*",$elf);
|
unpack("a4C*",$elf);
|
||||||
|
|
||||||
|
$!=42; # signal fipsld to revert to two-step link
|
||||||
die "not ELF file" if ($e_ident{magic} ne chr(0177)."ELF");
|
die "not ELF file" if ($e_ident{magic} ne chr(0177)."ELF");
|
||||||
|
|
||||||
my $elf_bits = $e_ident{class}*32; # 32 or 64
|
my $elf_bits = $e_ident{class}*32; # 32 or 64
|
||||||
@ -377,7 +378,7 @@ $FIPS_text_endX = $exe->Lookup("FIPS_text_endX");
|
|||||||
if (!$legacy_mode) {
|
if (!$legacy_mode) {
|
||||||
if (!$FIPS_text_startX || !$FIPS_text_endX) {
|
if (!$FIPS_text_startX || !$FIPS_text_endX) {
|
||||||
print STDERR "@ARGV[$#ARGV] is not cross-compiler aware.\n";
|
print STDERR "@ARGV[$#ARGV] is not cross-compiler aware.\n";
|
||||||
exit(1);
|
exit(42); # signal fipsld to revert to two-step link
|
||||||
}
|
}
|
||||||
|
|
||||||
$FINGERPRINT_ascii_value
|
$FINGERPRINT_ascii_value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user