Use perl script instead of editbin to rename object file sections.

This commit is contained in:
Dr. Stephen Henson 2007-03-27 00:03:42 +00:00
parent 793364457b
commit 6693e26927
2 changed files with 10 additions and 11 deletions

13
CHANGES
View file

@ -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.

View file

@ -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";