# HG changeset patch # User jascui # Date 1289894187 -28800 # Node ID 8e0eb519ef53fe16bf3536d33623e5926f342a08 # Parent 2c32f186fa1f5beed6cc140c8bca8bd4b9fae3d6# Parent 240a07ea3a138652e784101a7aececa8870fe6f1 Solve incorrect handling of ExportName=SymbolName@Ordinal syntax diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/elftools/elftran/elf_reloc.cpp --- a/bintools/elftools/elftran/elf_reloc.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/elftools/elftran/elf_reloc.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -128,7 +128,7 @@ checkreloc(aElfFile, *data, codeRelocs[i]->r_offset); //*data=FixAddress(aElfFile, *data, codeRelocs[i]); } -// fix defect + for (TInt j=0; jr_offset); diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/EvalidCompare.pm --- a/bintools/evalid/EvalidCompare.pm Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/EvalidCompare.pm Tue Nov 16 15:56:27 2010 +0800 @@ -62,7 +62,8 @@ 'Unknown library' => 'identical', 'chm file' => 'chm_file', 'Header file' => 'header', - 'Distribution Policy' => 'distpol' + 'Distribution Policy' => 'distpol', + 'Rofs image' => 'img' ); @@ -83,7 +84,8 @@ ignore => {filter => \&FilterAll}, chm_file => {expandor => 'hh -decompile %TEMPDIR% %FILE%', rawretry => 1}, header => {filter => \&FilterCVSTags}, - distpol => {filter => \&DistributionPolicyFilter} + distpol => {filter => \&DistributionPolicyFilter}, + img => {expandor => 'readimage -z %TEMPDIR% %FILE%', rawretry => 1} ); @@ -93,6 +95,7 @@ my $log; my $verbose; +my $keepgoing; my $toRoot; my $dumpDir; @@ -108,6 +111,8 @@ my $file2 = shift; $verbose = defined($_[0]) ? shift : 0; $log = defined($_[0]) ? shift : *STDOUT; + $keepgoing = defined($_[0]) ? shift : 0; + # Try binary compare first (to keep semantics the same as evalid)... if (DoCompareFiles($file1, $file2, 'unknown format')) { return 1,'identical'; @@ -354,6 +359,11 @@ return "chm file"; } + if ($typeBuf =~/^(ROFS|ROFx)/) { + # img file + return "Rofs image"; + } + if ($file =~ m/\.(iby|h|hby|hrh|oby|rsg|cpp)$/i) { return "Header file"; } @@ -811,34 +821,62 @@ }, $tempdir2; #Work out the if the two file lists are different + my @tmpfiles; foreach my $file (sort keys %iFileList1) { if (! defined $iFileList2{$file}) { # If the filename does not exist in the second filelist the compressed files cannot be the same. print ($log "Did not find $file in $file2\n") if ($verbose); - return 0; + if(!$keepgoing){ + return 0; + }else{ + push @tmpfiles, $file; + } } else { delete $iFileList2{$file} } } + foreach my $file (@tmpfiles) + { + delete $iFileList1{$file}; + } # There are extra files in the second compressed file therefore the compressed files cannot be the same. if (scalar(keys %iFileList2) > 0) { print ($log "$file2 contained more files than $file1\n") if ($verbose); - return 0; + if (!$keepgoing){ + return 0; + }else{ + foreach my $file (sort keys %iFileList2){ + print ($log "Dig not find $file in $file1\n") if ($verbose); + } + } } print($log "Comparing content\n") if ($verbose); #filelist1 and filelist2 contain all the same filenames, now compare the contents of each file - my $same = -1; # Variable to store collated result of comparison, assume an error + my $same = 1; # Variable to store collated result of comparison, assume an error foreach my $file (keys %iFileList1) { - my $type; - ($same, $type) = CompareFiles($tempdir1.$file,$tempdir2.$file, $verbose, $log); + my $tmpsame; + my $type; + ($tmpsame, $type) = CompareFiles($tempdir1.$file,$tempdir2.$file, $verbose, $log, $keepgoing); print ($log "Comparing $tempdir1.$file against $tempdir2.$file\n") if ($verbose); - last if ($same == 0); # do not bother comparing more files if one of the expanded files is different. + if (!$keepgoing){ + if ($tmpsame == 0){ # do not bother comparing more files if one of the expanded files is different. + $same = 0; + last; + } + }else{ + if ($tmpsame == 0){ + print ($log "Failed\n\n") if ($verbose); + $same = 0; + }else{ + print ($log "OK\n\n") if ($verbose); + } + } } #Cleanup the temporary directories diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/EvalidCompare.pm.bak --- a/bintools/evalid/EvalidCompare.pm.bak Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/EvalidCompare.pm.bak Tue Nov 16 15:56:27 2010 +0800 @@ -62,7 +62,8 @@ 'Unknown library' => 'identical', 'chm file' => 'chm_file', 'Header file' => 'header', - 'Distribution Policy' => 'distpol' + 'Distribution Policy' => 'distpol', + 'Rofs image' => 'img' ); @@ -83,7 +84,8 @@ ignore => {filter => \&FilterAll}, chm_file => {expandor => 'hh -decompile %TEMPDIR% %FILE%', rawretry => 1}, header => {filter => \&FilterCVSTags}, - distpol => {filter => \&DistributionPolicyFilter} + distpol => {filter => \&DistributionPolicyFilter}, + img => {expandor => 'readimage -z %TEMPDIR% %FILE%', rawretry => 1} ); @@ -93,6 +95,7 @@ my $log; my $verbose; +my $keepgoing; my $toRoot; my $dumpDir; @@ -108,6 +111,8 @@ my $file2 = shift; $verbose = defined($_[0]) ? shift : 0; $log = defined($_[0]) ? shift : *STDOUT; + $keepgoing = defined($_[0]) ? shift : 0; + # Try binary compare first (to keep semantics the same as evalid)... if (DoCompareFiles($file1, $file2, 'unknown format')) { return 1,'identical'; @@ -240,7 +245,7 @@ open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n"; binmode (FILE); - while ($typeBuf =~ /^.{48}([0-9 ]{9})\x60\x0A(......)/s) { + while ($typeBuf =~ /^.{48}([0-9 ]{9}).\x60\x0A(......)/s) { # $1 is the size of the archive member, $2 is first 6 bytes of the file # There may be several different sorts of file in the archive, and we # need to scan through until we find a type we recognize: @@ -354,6 +359,11 @@ return "chm file"; } + if ($typeBuf =~/^(ROFS|ROFx)/) { + # img file + return "Rofs image"; + } + if ($file =~ m/\.(iby|h|hby|hrh|oby|rsg|cpp)$/i) { return "Header file"; } @@ -811,34 +821,62 @@ }, $tempdir2; #Work out the if the two file lists are different + my @tmpfiles; foreach my $file (sort keys %iFileList1) { if (! defined $iFileList2{$file}) { # If the filename does not exist in the second filelist the compressed files cannot be the same. print ($log "Did not find $file in $file2\n") if ($verbose); - return 0; + if(!$keepgoing){ + return 0; + }else{ + push @tmpfiles, $file; + } } else { delete $iFileList2{$file} } } + foreach my $file (@tmpfiles) + { + delete $iFileList1{$file}; + } # There are extra files in the second compressed file therefore the compressed files cannot be the same. if (scalar(keys %iFileList2) > 0) { print ($log "$file2 contained more files than $file1\n") if ($verbose); - return 0; + if (!$keepgoing){ + return 0; + }else{ + foreach my $file (sort keys %iFileList2){ + print ($log "Dig not find $file in $file1\n") if ($verbose); + } + } } print($log "Comparing content\n") if ($verbose); #filelist1 and filelist2 contain all the same filenames, now compare the contents of each file - my $same = -1; # Variable to store collated result of comparison, assume an error + my $same = 1; # Variable to store collated result of comparison, assume an error foreach my $file (keys %iFileList1) { - my $type; - ($same, $type) = CompareFiles($tempdir1.$file,$tempdir2.$file, $verbose, $log); - print ($log "Comparing $tempdir1.$file against $tempdir2.$file\n") if ($verbose); - last if ($same == 0); # do not bother comparing more files if one of the expanded files is different. + my $tmpsame; + my $type; + ($tmpsame, $type) = CompareFiles($tempdir1.$file,$tempdir2.$file, $verbose, $log, $keepgoing); + print ($log "Comparing $tempdir1.$file against $tempdir2.$file, $tmpsame, $keepgoing\n") if ($verbose); + if (!$keepgoing){ + if ($tmpsame == 0){ # do not bother comparing more files if one of the expanded files is different. + $same = 0; + last; + } + }else{ + if ($tmpsame == 0){ + print ($log "Failed\n\n") if ($verbose); + $same = 0; + }else{ + print ($log "OK\n\n") if ($verbose); + } + } } #Cleanup the temporary directories diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/evalid.pl --- a/bintools/evalid/evalid.pl Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/evalid.pl Tue Nov 16 15:56:27 2010 +0800 @@ -27,13 +27,14 @@ my $passed=0; my $failed=0; -GetOptions("c", "v", "l=s", "g", "f", "m", "u", "x=s@", "i=s@", "d=s"); +GetOptions("c", "v", "l=s", "k", "g", "f", "m", "u", "x=s@", "i=s@", "d=s"); $opt_v = $opt_v; # To keep -w quiet. $opt_g = $opt_g; # To keep -w quiet. $opt_f = $opt_f; # To keep -w quiet. $opt_m = $opt_m; # To keep -w quiet. $opt_u = $opt_u; # To keep -w quiet. $opt_d = $opt_d; # To keep -w quiet. +$opt_k = $opt_k; # To keep -w quiet. unless ((@ARGV > 1) && (@ARGV < 4)) { @@ -61,6 +62,7 @@ -v -- verbose information about failed comparisons -c -- print results to standard output -l -- append results to + -k -- keep going The default is equivalent to "-l evalid.lis" @@ -311,7 +313,7 @@ return; } - my ($same, $type) = EvalidCompare::CompareFiles($left, $right, $opt_v, $log); + my ($same, $type) = EvalidCompare::CompareFiles($left, $right, $opt_v, $log, $opt_k); if ($same) { identical($left, $right, $type); diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/evalid.txt --- a/bintools/evalid/evalid.txt Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/evalid.txt Tue Nov 16 15:56:27 2010 +0800 @@ -238,3 +238,18 @@ When using the MD5 comparing functionality EVALID processes the contents of the temporary directory using the standard EVALID process but amalgamates the results in to one MD5 signiture. + +-------- +(ROFS IMAGE file) + +EVALID applies "readimage -z" to each file expanding it to a temporary directory and then compares +the contents of the temporary directory using the following process: + +When directly comparing two Rofs image files EVALID will first compare the file listing of the temporary +directories and return failed if the file listing is not identical. +If the file listing are identical it will then compare the contents of the two temporary directories +using the normal EVALID process. + +When "-k" (keepgoing) option is specified, EVALID will first compare the file listing. If "-v" option sepcified, +list the files which do not exist in both directories. Then it will compare the contents of the directories. +If "-v" option specified, it will report the result for every file in the directories. diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/left/fail/Image_file/rofs.img Binary file bintools/evalid/left/fail/Image_file/rofs.img has changed diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/left/ok/Image_file/rofs.img Binary file bintools/evalid/left/ok/Image_file/rofs.img has changed diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/right/fail/Image_file/rofs.img Binary file bintools/evalid/right/fail/Image_file/rofs.img has changed diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/right/ok/Image_file/rofs.img Binary file bintools/evalid/right/ok/Image_file/rofs.img has changed diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/tools_evalid.history.xml --- a/bintools/evalid/tools_evalid.history.xml Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/tools_evalid.history.xml Tue Nov 16 15:56:27 2010 +0800 @@ -19,6 +19,10 @@ + + EVALID : add Rofs image file comparison support + + EVALID : evalid not so happy identifying libs created by new mwldsym2.exe diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/evalid/tools_evalid.history.xml.bak --- a/bintools/evalid/tools_evalid.history.xml.bak Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/evalid/tools_evalid.history.xml.bak Tue Nov 16 15:56:27 2010 +0800 @@ -18,6 +18,14 @@ + + + EVALID : add Rofs image file comparison support + + + + EVALID : evalid not so happy identifying libs created by new mwldsym2.exe + EVALID : x86 static library comparisons sometimes fail when they shouldn't diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/rcomp/src/messages.cpp --- a/bintools/rcomp/src/messages.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/rcomp/src/messages.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -252,8 +252,8 @@ Add(new Message(LT_044_Message, LT_044, "044", true, KWarning)); /* This warning has been added to hopefully fix a long standing defect where labels which - * have not been declared are silently included in the emitted resource file. More - * details at defect INC061459 */ + * have not been declared are silently included in the emitted resource file. + */ const String LT_045_Message = "the following label is used but has not been declared: "; Add(new Message(LT_045_Message, LT_045, "045", true, KWarning)); diff -r 2c32f186fa1f -r 8e0eb519ef53 bintools/rcomp/src/rcompl.cpp --- a/bintools/rcomp/src/rcompl.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/bintools/rcomp/src/rcompl.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -236,7 +236,7 @@ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... + * instead of setting up a fresh yyin. */ static int yy_did_buffer_switch_on_eof; diff -r 2c32f186fa1f -r 8e0eb519ef53 deprecated/buildtools/romkiteka2/include/featuredatabase.xml diff -r 2c32f186fa1f -r 8e0eb519ef53 deprecated/etouch/etouch.cpp --- a/deprecated/etouch/etouch.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/deprecated/etouch/etouch.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -21,7 +21,7 @@ #endif //__MSVCDOTNET__ #if defined(__VC32__) || defined(__TOOLS2__) - #include + #include #else #include #endif diff -r 2c32f186fa1f -r 8e0eb519ef53 e32tools/elf2e32/source/e32imagefile.cpp --- a/e32tools/elf2e32/source/e32imagefile.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/e32tools/elf2e32/source/e32imagefile.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -495,7 +495,7 @@ aRelocsSize = Align(rsize + sizeof(E32RelocSection), sizeof(uint32)); uint32 aBase = (*aRelocList.begin())->iSegment->p_vaddr; - //add for cleanup to be done later.. + cleanupStack.push_back(aRelocs); aRelocs = new char [aRelocsSize]; memset(aRelocs, 0, aRelocsSize); diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/readimage/src/image_handler.cpp --- a/imgtools/romtools/readimage/src/image_handler.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/readimage/src/image_handler.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -290,7 +290,6 @@ * @fn ImageHandler::ReadBareImage * @brief this function processes image type under the condition of that if an image is given without header which means the image is not self-described * @return type of the image. - * @note this function is introduced for handling issues raised by DEF129908 */ EImageType ImageHandler::ReadBareImage(ifstream& aIfs) { TRomHeader romHdr ; diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/rofsbuild/fsnode.cpp --- a/imgtools/romtools/rofsbuild/fsnode.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/rofsbuild/fsnode.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -287,8 +287,7 @@ TShortDirEntry* entry = reinterpret_cast(aClusterData); if(iParent != NULL) { //Make - GetShortEntry(entry); - //TODO: Add comments to avoid mistaken deleting. + GetShortEntry(entry); memcpy(entry->DIR_Name,". ",sizeof(entry->DIR_Name)); entry ++ ; iParent->GetShortEntry(entry); diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/rofsbuild/r_obey.cpp --- a/imgtools/romtools/rofsbuild/r_obey.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/rofsbuild/r_obey.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -46,7 +46,7 @@ #include #else #include -#include //TODO: check under MinGW4 + stlport 5.2 +#include #include #endif diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/rombuild/r_global.cpp --- a/imgtools/romtools/rombuild/r_global.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/rombuild/r_global.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -44,7 +44,7 @@ SCapabilitySet gPlatSecDisabledCaps={{0}}; SCapabilitySet gPlatSecAllCaps={{0}}; SDemandPagingConfig gDemandPagingConfig={0,0,0,{0}}; -TBool gGenInc=EFalse; // Default to no generate INC file. DEF095619 +TBool gGenInc=EFalse; // Default to no generate INC file. TInt gLogLevel=0; // Information is logged based on logging level. // The default is 0. So all the existing logs are generated as if gLogLevel == 0. // If any extra information is required, the log level must be appropriately supplied. diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/rombuild/r_global.h --- a/imgtools/romtools/rombuild/r_global.h Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/rombuild/r_global.h Tue Nov 16 15:56:27 2010 +0800 @@ -80,7 +80,7 @@ extern SCapabilitySet gPlatSecDisabledCaps; extern SCapabilitySet gPlatSecAllCaps; extern SDemandPagingConfig gDemandPagingConfig; -extern TBool gGenInc; // DEF095619 +extern TBool gGenInc; extern TBool gEnableStdPathWarning; extern TInt gLogLevel; extern TBool gLowMem; diff -r 2c32f186fa1f -r 8e0eb519ef53 imgtools/romtools/rombuild/rombuild.cpp --- a/imgtools/romtools/rombuild/rombuild.cpp Tue Nov 16 15:54:07 2010 +0800 +++ b/imgtools/romtools/rombuild/rombuild.cpp Tue Nov 16 15:56:27 2010 +0800 @@ -75,7 +75,7 @@ " -compressionmethod method one of none|inflate|bytepair to set the compression\n" " -no-sorted-romfs do not add sorted entries arrays (6.1 compatible)\n" " -oby-charset= used character set in which OBY was written\n" - " -geninc to generate include file for licensee tools to use\n" // DEF095619 + " -geninc to generate include file for licensee tools to use\n" " -loglevel level of information to log (valid levels are 0,1,2,3,4).\n" //Tools like Visual ROM builder need the host/ROM filenames, size & if the file is hidden. " -wstdpath warn if destination path provided for a file is not a standard path\n" " -argfile= specify argument-file name containing list of command-line arguments to rombuild\n" @@ -296,7 +296,7 @@ } else if (stricmp(arg, "no-sorted-romfs")==0) gSortedRomFs=EFalse; - else if (stricmp(arg, "geninc")==0) // DEF095619 + else if (stricmp(arg, "geninc")==0) gGenInc=ETrue; else if (stricmp(arg, "wstdpath")==0) // Warn if destination path provided for a file gEnableStdPathWarning=ETrue; // is not a standard path as per platsec diff -r 2c32f186fa1f -r 8e0eb519ef53 sbsv1/buildsystem/extension/syslibs/test/charconv_testpostbuild.mk --- a/sbsv1/buildsystem/extension/syslibs/test/charconv_testpostbuild.mk Tue Nov 16 15:54:07 2010 +0800 +++ b/sbsv1/buildsystem/extension/syslibs/test/charconv_testpostbuild.mk Tue Nov 16 15:56:27 2010 +0800 @@ -11,10 +11,7 @@ # Contributors: # # Description: -# This postbuild script is only called when a Test Build is done. It deletes the KDDI/AU versions of the shiftjis and j5 plugin RSC file, so -# that only the Docomo versions remain. This removed ambiguity over which one will load during tests - a seperate version of the KDDI/AU -# plugins is created for test build, with a unique UID number so they may coexist for test purposes. -# +# This postbuild script is only called when a Test Build is done. # TMPROOT:=$(subst \,/,$(EPOCROOT))