aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-08-22 11:21:48 +0930
committerAlan Modra <amodra@gmail.com>2019-08-22 14:14:23 +0930
commitbaf46cd78048e1b959462567556e1de1ef6b9039 (patch)
tree26bc51513545bf742a1f392731b34a21ac2e40de /include
parent65d20a7403f2a2a6b20572e007f43037306d2a09 (diff)
downloadgdb-baf46cd78048e1b959462567556e1de1ef6b9039.zip
gdb-baf46cd78048e1b959462567556e1de1ef6b9039.tar.gz
gdb-baf46cd78048e1b959462567556e1de1ef6b9039.tar.bz2
ARM CMSE symbols
This patch removes use of st_target_internal to cache the result of comparing symbol names against CMSE_PREFIX. The problem with setting a bit in st_target_internal in swap_symbol_in is that calling bfd_elf_sym_name from swap_symbol_in requires symtab_hdr, and you don't know for sure whether swap_symbol_in is operating on dynsyms (and thus elf_tdata (abfd)->dynsymtab_hdr should be used) or on the normal symtab (thus elf_tdata (abfd)->symtab_hdr). You can make an educated guess based on abfd->flags & DYNAMIC but that relies on knowing a lot about calls to bfd_elf_get_elf_syms, and is fragile in the face of possible future changes. include/ * elf/arm.h (ARM_GET_SYM_CMSE_SPCL, ARM_SET_SYM_CMSE_SPCL): Delete. bfd/ * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL, instead recognize CMSE_PREFIX in symbol name. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL. (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/elf/arm.h7
2 files changed, 4 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 1813cb3..e779c17 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2019-08-22 Alan Modra <amodra@gmail.com>
+
+ * elf/arm.h (ARM_GET_SYM_CMSE_SPCL, ARM_SET_SYM_CMSE_SPCL): Delete.
+
2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
* elf/mips.h (SHT_GNU_XHASH): New define.
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 5cb9970..75fb5e2 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -399,11 +399,4 @@ enum arm_st_branch_type {
| ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
#endif
-/* Get or set whether a symbol is a special symbol of an entry function of CMSE
- secure code. */
-#define ARM_GET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
- (((SYM_TARGET_INTERNAL) >> 2) & 1)
-#define ARM_SET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
- (SYM_TARGET_INTERNAL) |= 4
-
#endif /* _ELF_ARM_H */