diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2016-09-14 16:02:17 +0100 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2016-09-14 16:03:43 +0100 |
commit | 4f90d84b2f2995829d6af475077598d45ef1d127 (patch) | |
tree | e745bdc7c37b3878e45e4a333f22ab397570ea5a /bfd/elf32-arm.c | |
parent | e6d042fe27102cb789407ccb2ec1663aa9c65129 (diff) | |
download | gdb-4f90d84b2f2995829d6af475077598d45ef1d127.zip gdb-4f90d84b2f2995829d6af475077598d45ef1d127.tar.gz gdb-4f90d84b2f2995829d6af475077598d45ef1d127.tar.bz2 |
Fix ld --gc-section segfault with ARMv8-M entry function in absolute section
bfd/
2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Only mark section
not already marked.
ld/
2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
* testsuite/ld-arm/cmse-veneers.s: Add a test for ARMv8-M Security
Extensions entry functions in absolute section.
* testsuite/ld-arm/cmse-veneers.rd: Adapt expected output accordingly.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 5275cae..6e68be1 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -14906,7 +14906,8 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, if (ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal)) { cmse_sec = cmse_hash->root.root.u.def.section; - if (!_bfd_elf_gc_mark (info, cmse_sec, gc_mark_hook)) + if (!cmse_sec->gc_mark && + !_bfd_elf_gc_mark (info, cmse_sec, gc_mark_hook)) return FALSE; } } |