mirror of https://github.com/ARMmbed/mbed-os.git
ARM linker: add --any_contingency option
When packing data into multiple regions using the `.ANY` directive, the linker can accidentally overfill an area. This doesn't normally happen because it defaults to `--any_placement=worst_fit`, which puts data in the region with most space. When we prioritise regions with `.ANY1`/`.ANY2`, it may totally fill an area, then fail to leave enough space for linker-generated veneers. We've just seen this error with the new K64F linker map. Adding `--any-contingency` makes it lower priority when a region is 98% full, avoiding this error. The option should not have any effect on targets with scatter files without prioritised `.ANY` directives.pull/10950/head
parent
810cb8de4a
commit
5ab714e604
|
@ -26,7 +26,8 @@
|
|||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++14"],
|
||||
"ld": ["--verbose", "--remove", "--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
|
||||
"ld": ["--verbose", "--remove", "--show_full_path", "--legacyalign",
|
||||
"--any_contingency", "--keep=os_cb_sections"]
|
||||
},
|
||||
"ARM": {
|
||||
"common": ["-c", "--gnu", "-Otime", "--split_sections",
|
||||
|
@ -36,7 +37,7 @@
|
|||
"asm": [],
|
||||
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
|
||||
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
|
||||
"ld": ["--show_full_path", "--keep=os_cb_sections"]
|
||||
"ld": ["--show_full_path", "--any_contingency", "--keep=os_cb_sections"]
|
||||
},
|
||||
"uARM": {
|
||||
"common": ["-c", "--gnu", "-Otime", "--split_sections",
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++14"],
|
||||
"ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
|
||||
"ld": ["--show_full_path", "--legacyalign", "--any_contingency",
|
||||
"--keep=os_cb_sections"]
|
||||
},
|
||||
"ARM": {
|
||||
"common": ["-c", "--gnu", "-Otime", "--split_sections",
|
||||
|
@ -33,7 +34,7 @@
|
|||
"asm": [],
|
||||
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
|
||||
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
|
||||
"ld": ["--show_full_path", "--keep=os_cb_sections"]
|
||||
"ld": ["--show_full_path", "--any_contingency", "--keep=os_cb_sections"]
|
||||
},
|
||||
"uARM": {
|
||||
"common": ["-c", "--gnu", "-Otime", "--split_sections",
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++14"],
|
||||
"ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
|
||||
"ld": ["--show_full_path", "--legacyalign", "--any_contingency",
|
||||
"--keep=os_cb_sections"]
|
||||
},
|
||||
"ARM": {
|
||||
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
|
||||
|
@ -33,7 +34,7 @@
|
|||
"asm": [],
|
||||
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
|
||||
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
|
||||
"ld": ["--show_full_path", "--keep=os_cb_sections"]
|
||||
"ld": ["--show_full_path", "--any_contingency", "--keep=os_cb_sections"]
|
||||
},
|
||||
"uARM": {
|
||||
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
|
||||
|
|
Loading…
Reference in New Issue