diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-10-11 16:14:01 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-10-11 16:14:01 +0200 |
| commit | 0850f0a8d66af028e32a79063cdad328b70db909 (patch) | |
| tree | 8c1fa49d5476e706e94a7af62ce37b12ef65e32d /lib/Language/Elna/RiscV/ElfWriter.hs | |
| parent | 87f183baad01f2b572f5f9051895b5876a56dd4c (diff) | |
| download | elna-0850f0a8d66af028e32a79063cdad328b70db909.tar.gz | |
Implement if statements with equality
Diffstat (limited to 'lib/Language/Elna/RiscV/ElfWriter.hs')
| -rw-r--r-- | lib/Language/Elna/RiscV/ElfWriter.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Language/Elna/RiscV/ElfWriter.hs b/lib/Language/Elna/RiscV/ElfWriter.hs index d3b0e94..52a92ea 100644 --- a/lib/Language/Elna/RiscV/ElfWriter.hs +++ b/lib/Language/Elna/RiscV/ElfWriter.hs @@ -236,8 +236,8 @@ riscv32Elf code objectHandle = text , st_info = stInfo STB_GLOBAL STT_FUNC } result = - ( encoded <> encoded' - , relocations <> relocations' + ( encoded' + , relocations' , ElfHeaderResult (names <> Text.encodeUtf8 labelName <> "\0") (Vector.snoc symbols newEntry) , definitions' ) @@ -260,6 +260,9 @@ riscv32Elf code objectHandle = text | RiscV.RBranch symbolName _ _ _ <- instructionType -> Just -- R_RISCV_BRANCH $ UnresolvedRelocation (Text.encodeUtf8 symbolName) offset 16 + | RiscV.RJal _ symbolName <- instructionType + -> Just -- R_RISCV_JAL + $ UnresolvedRelocation (Text.encodeUtf8 symbolName) offset 17 RiscV.CallInstruction symbolName -> Just -- R_RISCV_CALL_PLT $ UnresolvedRelocation (Text.encodeUtf8 symbolName) offset 19 |
