diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-09-11 12:17:47 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-09-11 12:17:47 +0000 |
commit | d47b990060f9701ddb2e9cd0e09a9cb51378bd0b (patch) | |
tree | 9e4d28089674a779170a365a906546e2f6378508 | |
parent | 06d1ff5b981e7808c5499b74cea4857cd8e5f957 (diff) | |
download | edk2-platforms-d47b990060f9701ddb2e9cd0e09a9cb51378bd0b.tar.xz |
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
-rw-r--r-- | Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java b/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java index 446c5e4426..2f2579e64e 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java @@ -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.
|