scripts: build: gen_handles: exit on relocatable files
Print a clean error message when provided a relocatable file, instead of generating a source file which will cause compilation errors further away from the source. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
60aa9e1857
commit
86dd23e1eb
|
@ -121,6 +121,13 @@ def main():
|
|||
edt = pickle.load(f)
|
||||
|
||||
parsed_elf = ZephyrElf(args.kernel, edt, args.start_symbol)
|
||||
if parsed_elf.relocatable:
|
||||
# While relocatable elf files will load cleanly, the pointers pulled from
|
||||
# the symbol table are invalid (as expected, because the structures have not
|
||||
# yet been allocated addresses). Fixing this will require iterating over
|
||||
# the relocation sections to find the symbols those pointers will end up
|
||||
# referring to.
|
||||
sys.exit('Relocatable elf files are not yet supported')
|
||||
|
||||
if args.output_graphviz:
|
||||
# Try and output the dependency tree
|
||||
|
|
Loading…
Reference in a new issue