From 6693e26927802ada60c270cd2a26ebfe0ac8b6d3 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 27 Mar 2007 00:03:42 +0000 Subject: [PATCH] Use perl script instead of editbin to rename object file sections. --- CHANGES | 13 +++++++------ util/pl/VC-32.pl | 8 +++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 1b5fdc0765..7b55b2c2c6 100644 --- a/CHANGES +++ b/CHANGES @@ -6,12 +6,13 @@ *) Modify VC++ build system to rename .text and .rdata segments in FIPS sources to .fipst${a,b,c}, and $fipsr${a,b,c} and place them - in a static library fipscanister.lib. These are then combined by the - VC++ linker into a single segment in suffix order but without the - suffix (i.e. .fipst and .fipsr). This serves the same purpose as - fipscanister.o on other platforms but has the advantage that it can - be created using only standard VC++ utilities. - [Steve Henson] + in a static library fipscanister.lib using a perl script. These are + then combined by the VC++ linker into a single segment in suffix + order but without the suffix (i.e. .fipstx, .fipsrd and .fipsda). + This serves the same purpose as fipscanister.o on other platforms + but has the advantage that it can be created using only standard VC++ + utilities. + [Steve Henson and Andy Polyakov] *) Modify WIN32 build system to forward references functions implemented in FIPS DLL. diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index e6257ea149..9902205839 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -403,12 +403,10 @@ sub do_rlink_rule $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs \$(FIPS_SHA1_EXE)\n"; - $ret.="\teditbin /SECTION:.text=.fipst\$\$a /SECTION:.rdata=.fipsr\$\$a $rl_start\n"; - $ret.="\teditbin /SECTION:.text=.fipst\$\$b /SECTION:.rdata=.fipsr\$\$b @<<\n\t$rl_mid\n<<\n"; - $ret.="\teditbin /SECTION:.text=.fipst\$\$c /SECTION:.rdata=.fipsr\$\$c $rl_end\n"; + $ret.="\t\$(PERL) ms\\segrenam.pl \$\$a $rl_start\n"; + $ret.="\t\$(PERL) ms\\segrenam.pl \$\$b $rl_mid\n"; + $ret.="\t\$(PERL) ms\\segrenam.pl \$\$c $rl_end\n"; $ret.="\t\$(MKLIB) $lfile$target @<<\n\t$files\n<<\n"; - #$ret.="\t\$(MKCANISTER) $target <<\n"; - #$ret.="INPUT($files)\n<<\n"; $ret.="\t\$(FIPS_SHA1_EXE) $target > ${target}.sha1\n"; $ret.="\t\$(PERL) util${o}copy.pl -stripcr fips-1.0${o}fips_premain.c \$(LIB_D)${o}fips_premain.c\n"; $ret.="\t\$(CP) fips-1.0${o}fips_premain.c.sha1 \$(LIB_D)${o}fips_premain.c.sha1\n"; -- 2.25.1