summaryrefslogtreecommitdiffstats
path: root/libebl/ebl-hooks.h
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2017-07-20 22:34:29 +0200
committerMark Wielaard <[email protected]>2017-07-24 12:20:01 +0200
commit55cb7dfa7e9afb3660b21e51434641c7287baf11 (patch)
tree9fc5ed4d912e682084cf97dca3b655be0905b6c0 /libebl/ebl-hooks.h
parent1609679b1ef3611c71a08900c2f6b94bb97d454d (diff)
strip: Deal with ARM data marker symbols pointing to debug sections.
ARM data marker symbols "$d" indicate the start of a sequence of data items in a section. For data only sections no data marker symbol is necessary, but may be put pointing to the start of the section. binutils however has a bug which places a data marker symbol somewhere inside the section (at least for .debug_frame). https://sourceware.org/bugzilla/show_bug.cgi?id=21809 When strip finds a symbol pointing to a debug section that would be put into the .debug file then it will copy over the whole symbol table. This isn't necessary because the symbol is redundant. Add an ebl hook to recognize data marker symbols with implementations for arm and aarch64. Use it in strip to strip such symbols from the symbol table if they point to a debug section. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libebl/ebl-hooks.h')
-rw-r--r--libebl/ebl-hooks.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
index b7253748..f3a0e64a 100644
--- a/libebl/ebl-hooks.h
+++ b/libebl/ebl-hooks.h
@@ -1,5 +1,5 @@
/* Backend hook signatures internal interface for libebl.
- Copyright (C) 2000-2011, 2013, 2014, 2016 Red Hat, Inc.
+ Copyright (C) 2000-2011, 2013, 2014, 2016, 2017 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -121,6 +121,9 @@ bool EBLHOOK(relative_reloc_p) (int);
bool EBLHOOK(check_special_symbol) (Elf *, GElf_Ehdr *, const GElf_Sym *,
const char *, const GElf_Shdr *);
+/* Check if this is a data marker symbol. e.g. '$d' symbols for ARM. */
+bool EBLHOOK(data_marker_symbol) (const GElf_Sym *sym, const char *sname);
+
/* Check whether only valid bits are set on the st_other symbol flag.
Standard ST_VISIBILITY have already been masked off. */
bool EBLHOOK(check_st_other_bits) (unsigned char st_other);