diff options
| author | Amlal El Mahrouss <113760121+Amlal-ElMahrouss@users.noreply.github.com> | 2024-04-06 09:30:37 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <113760121+Amlal-ElMahrouss@users.noreply.github.com> | 2024-04-06 09:30:37 +0200 |
| commit | 2e05351b31d152d7c7a2282305b994a301c745d4 (patch) | |
| tree | fa9e29b5c88581a88f9d8484788f15542a54c961 /Sources | |
| parent | a542cd26ddb06a3e7f626c1e37a3071913ca32cb (diff) | |
Remove unused types, use kPefStart as a standard entrypoint for PEF programs.
Diffstat (limited to 'Sources')
| -rw-r--r-- | Sources/64asm.cc | 4 | ||||
| -rw-r--r-- | Sources/i64asm.cc | 6 | ||||
| -rw-r--r-- | Sources/link.cc | 6 | ||||
| -rw-r--r-- | Sources/ppcasm.cc | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Sources/64asm.cc b/Sources/64asm.cc index 1a059ab..704a3f2 100644 --- a/Sources/64asm.cc +++ b/Sources/64asm.cc @@ -333,7 +333,7 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - if (name.find("__start") != std::string::npos) { + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } @@ -390,7 +390,7 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - if (name == "__start") { + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } diff --git a/Sources/i64asm.cc b/Sources/i64asm.cc index 7edfd15..d7e8524 100644 --- a/Sources/i64asm.cc +++ b/Sources/i64asm.cc @@ -388,8 +388,8 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - - if (name == "__start") { + + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } @@ -454,7 +454,7 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - if (name == "__start") { + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } diff --git a/Sources/link.cc b/Sources/link.cc index c3dab29..afde5c3 100644 --- a/Sources/link.cc +++ b/Sources/link.cc @@ -51,14 +51,14 @@ #define kWhite "\e[0;97m" #define kStdOut (std::cout << kWhite) -#define kPefDeaultOrg (uint64_t)0x10000 +#define kPefDeaultOrg kPefBaseOrigin #define kPefLinkerNumId 0x5046FF #define kPefAbiId "Container:Abi:" -enum { kAbiMpUx = 0x5046 /* PF */ }; +enum { kStandardAbi = 0x5046 /* PF */ }; static std::string kOutput; -static Int32 kAbi = kAbiMpUx; +static Int32 kAbi = kStandardAbi; static Int32 kSubArch = kPefNoSubCpu; static Int32 kArch = CompilerKit::kPefArch64000; static Bool kFatBinaryEnable = false; diff --git a/Sources/ppcasm.cc b/Sources/ppcasm.cc index 2108e14..9f3a61b 100644 --- a/Sources/ppcasm.cc +++ b/Sources/ppcasm.cc @@ -332,7 +332,7 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - if (name.find("__start") != std::string::npos) { + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } @@ -389,7 +389,7 @@ static bool asm_read_attributes(std::string &line) { // this is a special case for the start stub. // we want this so that ld can find it. - if (name == "__start") { + if (name == kPefStart) { kCurrentRecord.fKind = CompilerKit::kPefCode; } |
