Handle module entry point special case for self-relocated modules. (Replace references of original module entry point with _ModuleEntryPoint)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1512 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2006-09-11 12:17:47 +00:00
parent 06d1ff5b98
commit d47b990060
1 changed files with 3 additions and 2 deletions

View File

@ -88,9 +88,10 @@ public final class SourceFileReplacer implements Common.ForDoAll {
private class CLaplace extends Common.Laplace {
public String operation(String wholeline) {
boolean addr8 = false;
// remove EFI_DRIVER_ENTRY_POINT
wholeline = wholeline.replaceAll("(EFI_\\w+_ENTRY_POINT)", MigrationTool.MIGRATIONCOMMENT + " $1");
wholeline = wholeline.replaceAll("(EFI_[A-Z]+_ENTRY_POINT\\s*\\(\\s*" + mi.entrypoint + "\\s*\\)\\s*;)", MigrationTool.MIGRATIONCOMMENT + " $1");
// redefine module entry point for some self-relocated modules
wholeline = wholeline.replaceAll (mi.entrypoint + "([^{]*?})", "_ModuleEntryPoint" + "$1");
// remove R8 library contractor
wholeline = wholeline.replaceAll ("(\\b(?:Efi|Dxe)InitializeDriverLib\\b)", MigrationTool.MIGRATIONCOMMENT + " $1");
// Add Library Class for potential reference of gBS, gRT & gDS.