[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to fix code blocks?
From: |
Marc Nieper-Wißkirchen |
Subject: |
How to fix code blocks? |
Date: |
Mon, 2 Jan 2023 15:47:19 +0100 |
For purposes of dynamically calling code, I need the following layout
of the assembled code:
0x00: 16-byte header
0x10: entry point #1
0x20: entry point #2
I want to use the new align/skip instructions for this. My code
generator currently looks like this:
align (16)
header:
skip (16)
entry1:
jump label1
align (16)
entry2:
...
label1:
jump entry2 ; or some other code
However, with setup, GNU lightning often "optimizes" the block order
so that entry1 is no longer at the correct offset. How can I reliably
prohibit this? Putting skip (1) after the second align (16) seems to
help in my experiments.
Thanks,
Marc
- How to fix code blocks?,
Marc Nieper-Wißkirchen <=