blob: 4afa7b55d32c5432b7e34d81e0bba6be78564d5e [file] [log] [blame]
Adithya Baglodyff631012018-11-26 21:52:42 +05301#!/usr/bin/env python3
2#
3# Copyright (c) 2018 Intel Corporation.
4#
5# SPDX-License-Identifier: Apache-2.0
6#
7
8# This script will relocate .text, .rodata, .data and .bss sections from required files
9# and places it in the required memory region. This memory region and file
10# are given to this python script in the form of a string.
11# Example of such a string would be:
12# SRAM2:/home/xyz/zephyr/samples/hello_world/src/main.c,\
13# SRAM1:/home/xyz/zephyr/samples/hello_world/src/main2.c
14# To invoke this script:
15# python3 gen_relocate_app.py -i input_string -o generated_linker -c generated_code
16# Configuration that needs to be sent to the python script.
17# if the memory is like SRAM1/SRAM2/CCD/AON then place full object in
18# the sections
19# if the memory type is appended with _DATA / _TEXT/ _RODATA/ _BSS only the
20# selected memory is placed in the required memory region. Others are
21# ignored.
22# NOTE: multiple regions can be appended together like SRAM2_DATA_BSS
23# this will place data and bss inside SRAM2
24
25import sys
26import argparse
27import os
28import glob
29import warnings
30from elftools.elf.elffile import ELFFile
31
32# This script will create linker comands for text,rodata data, bss section relocation
33
34PRINT_TEMPLATE = """
35 KEEP(*({0}))
36"""
37
38SECTION_LOAD_MEMORY_SEQ = """
39 __{0}_{1}_rom_start = LOADADDR(_{2}_{3}_SECTION_NAME);
40"""
41
Wentong Wuc8f43b92019-05-14 01:04:06 +080042LOAD_ADDRESS_LOCATION_FLASH = """
43#ifdef CONFIG_XIP
44GROUP_DATA_LINK_IN({0}, FLASH)
45#else
46GROUP_DATA_LINK_IN({0}, {0})
47#endif
48"""
Adithya Baglodyff631012018-11-26 21:52:42 +053049LOAD_ADDRESS_LOCATION_BSS = "GROUP_LINK_IN({0})"
50
Wentong Wu743a1842019-05-14 00:30:52 +080051MPU_RO_REGION_START = """
52
53 _{0}_mpu_ro_region_start = {1}_ADDR;
54
55"""
56
57MPU_RO_REGION_END = """
58
Wentong Wu743a1842019-05-14 00:30:52 +080059 _{0}_mpu_ro_region_end = .;
60
61"""
62
Adithya Baglodyff631012018-11-26 21:52:42 +053063# generic section creation format
64LINKER_SECTION_SEQ = """
65
66/* Linker section for memory region {2} for {3} section */
67
Kumar Gala4da0f8b2019-03-14 18:39:36 -050068 SECTION_PROLOGUE(_{2}_{3}_SECTION_NAME,,)
Adithya Baglodyff631012018-11-26 21:52:42 +053069 {{
70 . = ALIGN(4);
71 {4}
72 . = ALIGN(4);
73 }} {5}
74 __{0}_{1}_end = .;
75 __{0}_{1}_start = ADDR(_{2}_{3}_SECTION_NAME);
76 __{0}_{1}_size = SIZEOF(_{2}_{3}_SECTION_NAME);
77"""
78
Wentong Wufa7ce3f2019-07-02 01:18:40 +080079LINKER_SECTION_SEQ_MPU = """
80
81/* Linker section for memory region {2} for {3} section */
82
83 SECTION_PROLOGUE(_{2}_{3}_SECTION_NAME,,)
84 {{
85 __{0}_{1}_start = .;
86 {4}
Wentong Wu09af98a2019-09-19 21:40:29 +080087#if {6}
88 . = ALIGN({6});
89#else
Wentong Wufa7ce3f2019-07-02 01:18:40 +080090 MPU_ALIGN(__{0}_{1}_size);
Wentong Wu09af98a2019-09-19 21:40:29 +080091#endif
Wentong Wufa7ce3f2019-07-02 01:18:40 +080092 __{0}_{1}_end = .;
93 }} {5}
94 __{0}_{1}_size = __{0}_{1}_end - __{0}_{1}_start;
95"""
96
Adithya Baglodyff631012018-11-26 21:52:42 +053097SOURCE_CODE_INCLUDES = """
98/* Auto generated code. Do not modify.*/
99#include <zephyr.h>
100#include <linker/linker-defs.h>
101#include <kernel_structs.h>
Stephanos Ioannidis2d746042019-10-25 00:08:21 +0900102#include <string.h>
Adithya Baglodyff631012018-11-26 21:52:42 +0530103"""
104
105EXTERN_LINKER_VAR_DECLARATION = """
106extern char __{0}_{1}_start[];
107extern char __{0}_{1}_rom_start[];
Adithya Baglody65f79cd2018-12-17 14:21:34 +0530108extern char __{0}_{1}_size[];
Adithya Baglodyff631012018-11-26 21:52:42 +0530109"""
110
111
112DATA_COPY_FUNCTION = """
113void data_copy_xip_relocation(void)
114{{
115{0}
116}}
117"""
118
119BSS_ZEROING_FUNCTION = """
120void bss_zeroing_relocation(void)
121{{
122{0}
123}}
124"""
125
126MEMCPY_TEMPLATE = """
127 (void)memcpy(&__{0}_{1}_start, &__{0}_{1}_rom_start,
Adithya Baglody65f79cd2018-12-17 14:21:34 +0530128 (u32_t) &__{0}_{1}_size);
129
Adithya Baglodyff631012018-11-26 21:52:42 +0530130"""
131
132MEMSET_TEMPLATE = """
133 (void)memset(&__{0}_bss_start, 0,
Adithya Baglody65f79cd2018-12-17 14:21:34 +0530134 (u32_t) &__{0}_bss_size);
Adithya Baglodyff631012018-11-26 21:52:42 +0530135"""
136
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000137
Adithya Baglodyff631012018-11-26 21:52:42 +0530138def find_sections(filename, full_list_of_sections):
139 with open(filename, 'rb') as obj_file_desc:
140 full_lib = ELFFile(obj_file_desc)
141 if not full_lib:
Ulf Magnusson50b9b122019-09-07 14:41:01 +0200142 sys.exit("Error parsing file: " + filename)
Adithya Baglodyff631012018-11-26 21:52:42 +0530143
144 sections = [x for x in full_lib.iter_sections()]
145
Adithya Baglodyff631012018-11-26 21:52:42 +0530146 for section in sections:
147
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000148 if ".text." in section.name:
Adithya Baglodyff631012018-11-26 21:52:42 +0530149 full_list_of_sections["text"].append(section.name)
150
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000151 if ".rodata." in section.name:
Adithya Baglodyff631012018-11-26 21:52:42 +0530152 full_list_of_sections["rodata"].append(section.name)
153
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000154 if ".data." in section.name:
Adithya Baglodyff631012018-11-26 21:52:42 +0530155 full_list_of_sections["data"].append(section.name)
156
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000157 if ".bss." in section.name:
Adithya Baglodyff631012018-11-26 21:52:42 +0530158 full_list_of_sections["bss"].append(section.name)
159
160 # Common variables will be placed in the .bss section
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000161 # only after linking in the final executable. This "if" finds
Adithya Baglodyff631012018-11-26 21:52:42 +0530162 # common symbols and warns the user of the problem.
163 # The solution to which is simply assigning a 0 to
164 # bss variable and it will go to the required place.
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000165 if ".symtab" in section.name:
Adithya Baglodyff631012018-11-26 21:52:42 +0530166 symbols = [x for x in section.iter_symbols()]
167 for symbol in symbols:
168 if symbol.entry["st_shndx"] == 'SHN_COMMON':
169 warnings.warn("Common variable found. Move "+
170 symbol.name + " to bss by assigning it to 0/NULL")
171
172 return full_list_of_sections
173
174
175def assign_to_correct_mem_region(memory_type,
176 full_list_of_sections, complete_list_of_sections):
177 all_regions = False
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000178 iteration_sections = {"text": False, "rodata": False, "data": False, "bss": False}
Adithya Baglodyff631012018-11-26 21:52:42 +0530179 if "_TEXT" in memory_type:
180 iteration_sections["text"] = True
181 memory_type = memory_type.replace("_TEXT", "")
182 if "_RODATA" in memory_type:
183 iteration_sections["rodata"] = True
184 memory_type = memory_type.replace("_RODATA", "")
185 if "_DATA" in memory_type:
186 iteration_sections["data"] = True
187 memory_type = memory_type.replace("_DATA", "")
188 if "_BSS" in memory_type:
189 iteration_sections["bss"] = True
190 memory_type = memory_type.replace("_BSS", "")
191 if not (iteration_sections["data"] or iteration_sections["bss"] or
192 iteration_sections["text"] or iteration_sections["rodata"]):
193 all_regions = True
194
Wentong Wu09af98a2019-09-19 21:40:29 +0800195 pos = memory_type.find('_')
196 if pos in range(len(memory_type)):
197 align_size = int(memory_type[pos+1:])
198 memory_type = memory_type[:pos]
199 mpu_align[memory_type] = align_size
200
Adithya Baglodyff631012018-11-26 21:52:42 +0530201 if memory_type in complete_list_of_sections:
202 for iter_sec in ["text", "rodata", "data", "bss"]:
203 if ((iteration_sections[iter_sec] or all_regions) and
204 full_list_of_sections[iter_sec] != []):
205 complete_list_of_sections[memory_type][iter_sec] += (
206 full_list_of_sections[iter_sec])
207 else:
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000208 # new memory type was found. in which case just assign the
Adithya Baglodyff631012018-11-26 21:52:42 +0530209 # full_list_of_sections to the memorytype dict
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000210 tmp_list = {"text": [], "rodata": [], "data": [], "bss": []}
Adithya Baglodyff631012018-11-26 21:52:42 +0530211 for iter_sec in ["text", "rodata", "data", "bss"]:
212 if ((iteration_sections[iter_sec] or all_regions) and
213 full_list_of_sections[iter_sec] != []):
214 tmp_list[iter_sec] = full_list_of_sections[iter_sec]
215
216 complete_list_of_sections[memory_type] = tmp_list
217
218 return complete_list_of_sections
219
220
221def print_linker_sections(list_sections):
222 print_string = ''
Marc Herbert6ccd0262019-06-24 12:20:18 -0700223 for section in sorted(list_sections):
Adithya Baglodyff631012018-11-26 21:52:42 +0530224 print_string += PRINT_TEMPLATE.format(section)
225 return print_string
226
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000227
Adithya Baglodyff631012018-11-26 21:52:42 +0530228def string_create_helper(region, memory_type,
229 full_list_of_sections, load_address_in_flash):
230 linker_string = ''
231 if load_address_in_flash:
232 load_address_string = LOAD_ADDRESS_LOCATION_FLASH.format(memory_type)
233 else:
234 load_address_string = LOAD_ADDRESS_LOCATION_BSS.format(memory_type)
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000235 if full_list_of_sections[region]:
Adithya Baglodyff631012018-11-26 21:52:42 +0530236 # Create a complete list of funcs/ variables that goes in for this
237 # memory type
238 tmp = print_linker_sections(full_list_of_sections[region])
Ulf Magnusson11d98ae2019-09-03 14:29:31 +0200239 if memory_type == 'SRAM' and region in {'data', 'bss'}:
Wentong Wu743a1842019-05-14 00:30:52 +0800240 linker_string += tmp
241 else:
Wentong Wufa7ce3f2019-07-02 01:18:40 +0800242 if memory_type != 'SRAM' and region == 'rodata':
Wentong Wu09af98a2019-09-19 21:40:29 +0800243 align_size = 0
244 if memory_type in mpu_align.keys():
245 align_size = mpu_align[memory_type]
246
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000247 linker_string += LINKER_SECTION_SEQ_MPU.format(memory_type.lower(), region, memory_type.upper(),
Wentong Wu09af98a2019-09-19 21:40:29 +0800248 region.upper(), tmp, load_address_string, align_size)
Wentong Wufa7ce3f2019-07-02 01:18:40 +0800249 else:
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000250 linker_string += LINKER_SECTION_SEQ.format(memory_type.lower(), region, memory_type.upper(),
251 region.upper(), tmp, load_address_string)
Adithya Baglodyff631012018-11-26 21:52:42 +0530252
Wentong Wu743a1842019-05-14 00:30:52 +0800253 if load_address_in_flash:
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000254 linker_string += SECTION_LOAD_MEMORY_SEQ.format(memory_type.lower(), region, memory_type.upper(),
255 region.upper())
Adithya Baglodyff631012018-11-26 21:52:42 +0530256 return linker_string
257
258
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000259def generate_linker_script(linker_file, sram_data_linker_file, sram_bss_linker_file, complete_list_of_sections):
Adithya Baglodyff631012018-11-26 21:52:42 +0530260 gen_string = ''
Wentong Wu743a1842019-05-14 00:30:52 +0800261 gen_string_sram_data = ''
262 gen_string_sram_bss = ''
Marc Herbert6ccd0262019-06-24 12:20:18 -0700263
264 for memory_type, full_list_of_sections in \
265 sorted(complete_list_of_sections.items()):
Wentong Wu743a1842019-05-14 00:30:52 +0800266
267 if memory_type != "SRAM":
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000268 gen_string += MPU_RO_REGION_START.format(memory_type.lower(), memory_type.upper())
269 gen_string += string_create_helper("text", memory_type, full_list_of_sections, 1)
270 gen_string += string_create_helper("rodata", memory_type, full_list_of_sections, 1)
Wentong Wu743a1842019-05-14 00:30:52 +0800271 if memory_type != "SRAM":
272 gen_string += MPU_RO_REGION_END.format(memory_type.lower())
273
274 if memory_type == 'SRAM':
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000275 gen_string_sram_data += string_create_helper("data", memory_type, full_list_of_sections, 1)
276 gen_string_sram_bss += string_create_helper("bss", memory_type, full_list_of_sections, 0)
Wentong Wu743a1842019-05-14 00:30:52 +0800277 else:
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000278 gen_string += string_create_helper("data", memory_type, full_list_of_sections, 1)
279 gen_string += string_create_helper("bss", memory_type, full_list_of_sections, 0)
Adithya Baglodyff631012018-11-26 21:52:42 +0530280
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000281 # finally writing to the linker file
Adithya Baglodyff631012018-11-26 21:52:42 +0530282 with open(linker_file, "a+") as file_desc:
283 file_desc.write(gen_string)
284
Wentong Wu743a1842019-05-14 00:30:52 +0800285 with open(sram_data_linker_file, "a+") as file_desc:
286 file_desc.write(gen_string_sram_data)
287
288 with open(sram_bss_linker_file, "a+") as file_desc:
289 file_desc.write(gen_string_sram_bss)
290
Adithya Baglodyff631012018-11-26 21:52:42 +0530291
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000292def generate_memcpy_code(memory_type, full_list_of_sections, code_generation):
Adithya Baglodyff631012018-11-26 21:52:42 +0530293 all_sections = True
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000294 generate_section = {"text": False, "rodata": False, "data": False, "bss": False}
Adithya Baglodyff631012018-11-26 21:52:42 +0530295 for section_name in ["_TEXT", "_RODATA", "_DATA", "_BSS"]:
296 if section_name in memory_type:
297 generate_section[section_name.lower()[1:]] = True
298 memory_type = memory_type.replace(section_name, "")
299 all_sections = False
300
301 if all_sections:
302 generate_section["text"] = True
303 generate_section["rodata"] = True
304 generate_section["data"] = True
305 generate_section["bss"] = True
306
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000307 # add all the regions that needs to be copied on boot up
Adithya Baglodyff631012018-11-26 21:52:42 +0530308 for mtype in ["text", "rodata", "data"]:
Wentong Wu743a1842019-05-14 00:30:52 +0800309 if memory_type == "SRAM" and mtype == "data":
310 continue
311
Adithya Baglodyff631012018-11-26 21:52:42 +0530312 if full_list_of_sections[mtype] and generate_section[mtype]:
313 code_generation["copy_code"] += MEMCPY_TEMPLATE.format(memory_type.lower(), mtype)
314 code_generation["extern"] += EXTERN_LINKER_VAR_DECLARATION.format(
315 memory_type.lower(), mtype)
316
317 # add for all the bss data that needs to be zeored on boot up
Wentong Wu743a1842019-05-14 00:30:52 +0800318 if full_list_of_sections["bss"] and generate_section["bss"] and memory_type != "SRAM":
Adithya Baglodyff631012018-11-26 21:52:42 +0530319 code_generation["zero_code"] += MEMSET_TEMPLATE.format(memory_type.lower())
320 code_generation["extern"] += EXTERN_LINKER_VAR_DECLARATION.format(
321 memory_type.lower(), "bss")
322
323 return code_generation
324
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000325
Adithya Baglodyff631012018-11-26 21:52:42 +0530326def dump_header_file(header_file, code_generation):
327 code_string = ''
328 # create a dummy void function if there is no code to generate for
329 # bss/data/text regions
330
331 code_string += code_generation["extern"]
332
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000333 if code_generation["copy_code"]:
Adithya Baglodyff631012018-11-26 21:52:42 +0530334 code_string += DATA_COPY_FUNCTION.format(code_generation["copy_code"])
335 else:
336 code_string += DATA_COPY_FUNCTION.format("void;")
337 if code_generation["zero_code"]:
338 code_string += BSS_ZEROING_FUNCTION.format(code_generation["zero_code"])
339 else:
340 code_string += BSS_ZEROING_FUNCTION.format("return;")
341
Adithya Baglodyff631012018-11-26 21:52:42 +0530342 with open(header_file, "w") as header_file_desc:
343 header_file_desc.write(SOURCE_CODE_INCLUDES)
344 header_file_desc.write(code_string)
345
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000346
Adithya Baglodyff631012018-11-26 21:52:42 +0530347def parse_args():
348 global args
349 parser = argparse.ArgumentParser(
350 description=__doc__,
351 formatter_class=argparse.RawDescriptionHelpFormatter)
352 parser.add_argument("-d", "--directory", required=True,
353 help="obj file's directory")
354 parser.add_argument("-i", "--input_rel_dict", required=True,
355 help="input src:memory type(sram2 or ccm or aon etc) string")
356 parser.add_argument("-o", "--output", required=False, help="Output ld file")
Wentong Wu743a1842019-05-14 00:30:52 +0800357 parser.add_argument("-s", "--output_sram_data", required=False,
358 help="Output sram data ld file")
359 parser.add_argument("-b", "--output_sram_bss", required=False,
360 help="Output sram bss ld file")
Adithya Baglodyff631012018-11-26 21:52:42 +0530361 parser.add_argument("-c", "--output_code", required=False,
362 help="Output relocation code header file")
363 parser.add_argument("-v", "--verbose", action="count", default=0,
364 help="Verbose Output")
365 args = parser.parse_args()
366
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000367
368# return the absolute path for the object file.
Adithya Baglodyff631012018-11-26 21:52:42 +0530369def get_obj_filename(searchpath, filename):
370 # get the object file name which is almost always pended with .obj
371 obj_filename = filename.split("/")[-1] + ".obj"
372
Ulf Magnusson12ba9df2019-03-19 19:28:24 +0100373 for dirpath, _, files in os.walk(searchpath):
Adithya Baglodyff631012018-11-26 21:52:42 +0530374 for filename1 in files:
375 if filename1 == obj_filename:
376 if filename.split("/")[-2] in dirpath.split("/")[-1]:
377 fullname = os.path.join(dirpath, filename1)
378 return fullname
379
380
381# Create a dict with key as memory type and files as a list of values.
382def create_dict_wrt_mem():
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000383 # need to support wild card *
Adithya Baglodyff631012018-11-26 21:52:42 +0530384 rel_dict = dict()
385 if args.input_rel_dict == '':
Ulf Magnusson50b9b122019-09-07 14:41:01 +0200386 sys.exit("Disable CONFIG_CODE_DATA_RELOCATION if no file needs relocation")
Adithya Baglodyff631012018-11-26 21:52:42 +0530387 for line in args.input_rel_dict.split(';'):
388 mem_region, file_name = line.split(':')
389
390 file_name_list = glob.glob(file_name)
391 if not file_name_list:
392 warnings.warn("File: "+file_name+" Not found")
393 continue
394 if mem_region == '':
395 continue
396 if args.verbose:
397 print("Memory region ", mem_region, " Selected for file:", file_name_list)
398 if mem_region in rel_dict:
399 rel_dict[mem_region].extend(file_name_list)
400 else:
401 rel_dict[mem_region] = file_name_list
402
403 return rel_dict
404
405
406def main():
Wentong Wu09af98a2019-09-19 21:40:29 +0800407 global mpu_align
408 mpu_align = {}
Adithya Baglodyff631012018-11-26 21:52:42 +0530409 parse_args()
410 searchpath = args.directory
411 linker_file = args.output
Wentong Wu743a1842019-05-14 00:30:52 +0800412 sram_data_linker_file = args.output_sram_data
413 sram_bss_linker_file = args.output_sram_bss
Adithya Baglodyff631012018-11-26 21:52:42 +0530414 rel_dict = create_dict_wrt_mem()
415 complete_list_of_sections = {}
416
417 # Create/or trucate file contents if it already exists
418 # raw = open(linker_file, "w")
419
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000420 # for each memory_type, create text/rodata/data/bss sections for all obj files
421 for memory_type, files in rel_dict.items():
422 full_list_of_sections = {"text": [], "rodata": [], "data": [], "bss": []}
Adithya Baglodyff631012018-11-26 21:52:42 +0530423
424 for filename in files:
425 obj_filename = get_obj_filename(searchpath, filename)
426 # the obj file wasn't found. Probably not compiled.
427 if not obj_filename:
428 continue
429
430 full_list_of_sections = find_sections(obj_filename, full_list_of_sections)
431
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000432 # cleanup and attach the sections to the memory type after cleanup.
Adithya Baglodyff631012018-11-26 21:52:42 +0530433 complete_list_of_sections = assign_to_correct_mem_region(memory_type,
434 full_list_of_sections,
435 complete_list_of_sections)
436
Wentong Wu743a1842019-05-14 00:30:52 +0800437 generate_linker_script(linker_file, sram_data_linker_file,
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000438 sram_bss_linker_file, complete_list_of_sections)
Marc Herbert6ccd0262019-06-24 12:20:18 -0700439
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000440 code_generation = {"copy_code": '', "zero_code": '', "extern": ''}
441 for mem_type, list_of_sections in sorted(complete_list_of_sections.items()):
Adithya Baglodyff631012018-11-26 21:52:42 +0530442 code_generation = generate_memcpy_code(mem_type,
443 list_of_sections, code_generation)
444
445 dump_header_file(args.output_code, code_generation)
446
Håkon Øye Amundsen4e135012019-08-15 08:36:15 +0000447
Adithya Baglodyff631012018-11-26 21:52:42 +0530448if __name__ == '__main__':
449 main()