From b7724f6f55b7859c7f3173146b85680862f6cd49 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 22 Jul 2011 10:13:52 +0000 Subject: [PATCH] util/incore: make transition smoother. --- util/incore | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/util/incore b/util/incore index ee495ee352..4adb7e0573 100755 --- a/util/incore +++ b/util/incore @@ -370,17 +370,22 @@ $FIPS_rodata_start = $exe->Lookup("FIPS_rodata_start") or die; $FIPS_rodata_end = $exe->Lookup("FIPS_rodata_end") or die; $FIPS_signature = $exe->Lookup("FIPS_signature") or die; -if (!$legacy_mode) { - $FIPS_text_start = $exe->Lookup("FIPS_text_startX"); - $FIPS_text_end = $exe->Lookup("FIPS_text_endX"); +# new cross-compile support +$FIPS_text_startX = $exe->Lookup("FIPS_text_startX"); +$FIPS_text_endX = $exe->Lookup("FIPS_text_endX"); - if (!$FIPS_text_start || !$FIPS_text_end) { +if (!$legacy_mode) { + if (!$FIPS_text_startX || !$FIPS_text_endX) { print STDERR "@ARGV[$#ARGV] is not cross-compiler aware.\n"; exit(1); } $FINGERPRINT_ascii_value = $exe->Lookup("FINGERPRINT_ascii_value") or die; + +} elsif ($FIPS_text_startX && $FIPS_text_endX) { + $FIPS_text_start = $FIPS_text_startX; + $FIPS_text_end = $FIPS_text_endX; } sysopen(FD,@ARGV[$#ARGV],$legacy_mode?0:2) or die "$!"; # 2 is read/write -- 2.40.0