Skip to content

Commit d804ee3

Browse files
carlocaionecarlescufi
authored andcommitted
gen_kobject_list.py: Add support for 64-bit addresses
Currently the python script is assuming we only have objects on 32-bit addresses. This is obviously wrong for 64-bit platforms. Fix this. Signed-off-by: Carlo Caione <[email protected]>
1 parent 064d450 commit d804ee3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/gen_kobject_list.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,14 @@ def find_kobjects(elf, syms):
598598
(name, hex(opcode)))
599599
continue
600600

601-
addr = (loc.value[1] | (loc.value[2] << 8) |
602-
(loc.value[3] << 16) | (loc.value[4] << 24))
601+
if "CONFIG_64BIT" in syms:
602+
addr = ((loc.value[1] << 0 ) | (loc.value[2] << 8) |
603+
(loc.value[3] << 16) | (loc.value[4] << 24) |
604+
(loc.value[5] << 32) | (loc.value[6] << 40) |
605+
(loc.value[7] << 48) | (loc.value[8] << 56))
606+
else:
607+
addr = ((loc.value[1] << 0 ) | (loc.value[2] << 8) |
608+
(loc.value[3] << 16) | (loc.value[4] << 24))
603609

604610
if addr == 0:
605611
# Never linked; gc-sections deleted it

0 commit comments

Comments
 (0)