mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
ldgen: fix sections info parsing
Fixes an issure where the first part of an object file name is not included, due to matching the rule for a section entry previously. Reduce depedency on matching literal strings in sections which might change depending on toolchain (ex. matching 'elf32-xtensa-le') Make sure parsing rule succeeds for the entirety of the sections info string by adding 'parseAll=True'. Add test for sections info parsing.
This commit is contained in:
@@ -1422,6 +1422,19 @@ entries:
|
||||
self.assertListEqual(actual["flash_text"], expected["flash_text"])
|
||||
self.assertListEqual(actual["iram0_text"], expected["iram0_text"])
|
||||
|
||||
def test_sections_info_parsing(self):
|
||||
|
||||
self.sections_info = SectionsInfo()
|
||||
|
||||
with open("data/sections_parse.info") as sections_info_file_obj:
|
||||
self.sections_info.add_sections_info(sections_info_file_obj)
|
||||
|
||||
sections = self.sections_info.get_obj_sections("libsections_parse.a", "croutine")
|
||||
self.assertEqual(set(sections), set([".text", ".data", ".bss"]))
|
||||
|
||||
sections = self.sections_info.get_obj_sections("libsections_parse.a", "FreeRTOS-openocd")
|
||||
self.assertEqual(set(sections), set([".literal.prvCheckPendingReadyList"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user