diff options
author | Mark Wielaard <mark@klomp.org> | 2017-07-20 22:34:29 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-07-24 12:20:01 +0200 |
commit | 55cb7dfa7e9afb3660b21e51434641c7287baf11 (patch) | |
tree | 9fc5ed4d912e682084cf97dca3b655be0905b6c0 /libebl/libebl.h | |
parent | 1609679b1ef3611c71a08900c2f6b94bb97d454d (diff) | |
download | elfutils-55cb7dfa7e9afb3660b21e51434641c7287baf11.tar.gz |
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 <mark@klomp.org>
Diffstat (limited to 'libebl/libebl.h')
-rw-r--r-- | libebl/libebl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libebl/libebl.h b/libebl/libebl.h index 87896e4a..882bdb99 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -1,5 +1,5 @@ /* Interface for libebl. - Copyright (C) 2000-2010, 2013, 2014, 2015, 2016 Red Hat, Inc. + Copyright (C) 2000-2010, 2013, 2014, 2015, 2016, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -156,6 +156,10 @@ extern bool ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym, const char *name, const GElf_Shdr *destshdr); +/* Check if this is a data marker symbol. e.g. '$d' symbols for ARM. */ +extern bool ebl_data_marker_symbol (Ebl *ebl, const GElf_Sym *sym, + const char *sname); + /* Check whether only valid bits are set on the st_other symbol flag. */ extern bool ebl_check_st_other_bits (Ebl *ebl, unsigned char st_other); |