Is there one default offset of one sub addrmap? #175
-
Here is one example , i found the addr of sub1 not start with the end of sub0. is there one default of sub map ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The default address packing behavior is to align objects to offsets based on their size, rounded up to the next power-of-two. Therefore the
Alternatively, you can assign the addresses explicitly:
I prefer explicit address allocation since it is more obvious how addresses will be allocated. |
Beta Was this translation helpful? Give feedback.
The default address packing behavior is to align objects to offsets based on their size, rounded up to the next power-of-two. Therefore the
sub1
instance is allocated to an address of 0x200.If you want tight packing, you can use the
addressing = compact;
property.Also, in your example there is no need to use Perl preprocessing. Instead you can use an array of registers:
Alternatively, you can assign the addresses e…