summaryrefslogtreecommitdiff
path: root/chapter21/src/main/java/com
diff options
context:
space:
mode:
authorXmiliaH <45106915+XmiliaH@users.noreply.github.com>2025-03-25 18:44:41 +0100
committerGitHub <noreply@github.com>2025-03-25 10:44:41 -0700
commit5fd3508bd3c45ed83757b47caa7a24361bec71cb (patch)
tree456db64024c496b78fd16486a850b7d0f17cdbf1 /chapter21/src/main/java/com
parent1f87fba4ee6b874eed6c3652e3e8a25b5b0726aa (diff)
downloadSimple-5fd3508bd3c45ed83757b47caa7a24361bec71cb.tar.gz
Simple-5fd3508bd3c45ed83757b47caa7a24361bec71cb.zip
Call Simple function from C (#179)
* Call simple function from c * Small fix * Use different test values
Diffstat (limited to 'chapter21/src/main/java/com')
-rw-r--r--chapter21/src/main/java/com/seaofnodes/simple/codegen/ElfFile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter21/src/main/java/com/seaofnodes/simple/codegen/ElfFile.java b/chapter21/src/main/java/com/seaofnodes/simple/codegen/ElfFile.java
index 5bf83542..6c8a1fc1 100644
--- a/chapter21/src/main/java/com/seaofnodes/simple/codegen/ElfFile.java
+++ b/chapter21/src/main/java/com/seaofnodes/simple/codegen/ElfFile.java
@@ -283,7 +283,7 @@ public class ElfFile {
// populate function symbols
encodeFunctions(symbols, text);
// populate big constants
- encodeConstants(symbols, rdata);
+ // encodeConstants(symbols, rdata);
// create .text relocations
DataSection text_rela = new DataSection(".rela.text", 4 /* SHT_RELA */);
@@ -301,7 +301,7 @@ public class ElfFile {
write8(text_rela._contents, -4);
}
// relocations to constants
- for (Map.Entry<Node,Type> e : _code._encoding._bigCons.entrySet()) {
+ if (false) for (Map.Entry<Node,Type> e : _code._encoding._bigCons.entrySet()) {
int nid = e.getKey()._nid;
int sym_id = _bigCons.get(e.getValue())._index;
int offset = _code._encoding._opStart[nid] + _code._encoding._opLen[nid] - 4;