device: optimize handles array
Optimize the handles array by making the following observations:
* The devicetree ordinal at index 0 in pass1 is discarded by
gen_handles.py, and therefore does not appear in the pass2 array.
* gen_handles.py does not need `DEVICE_HANDLE_ENDS` to determine the
end of the handle array, as that information is present in the .elf.
Therefore, instead of replacing the devicetree ordinal with an
additional `DEVICE_HANDLE_ENDS` at the end (to preserve lengths), we
can simply move the ordinal to the end and have it be the original
`DEVICE_HANDLE_ENDS` symbol. This reduces the size of the array by
one handle per device (2 bytes).
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2 files changed