|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] symbols: don't omit "end" symbols upon mixed code / data aliases
commit af2dbe260f3d5bdd5d47dacc87bfcc449bf91c24
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Jan 26 11:49:31 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jan 26 11:49:31 2026 +0100
symbols: don't omit "end" symbols upon mixed code / data aliases
At the example of _sinitext - that symbol has four aliases on x86:
__init_begin, __2M_init_start, __2M_rodata_end, and whatever the first
function in .init.text. With the GNU toolchain all of them are marked
'T' or 't'. With Clang/LLVM, however, some are marked 'r'. Since, to
save space, we want fake "end" symbols only for text, right now
want_symbol_end() has a respective check. That is getting in the way,
however, when the final of those symbols is 'r'. Remove the check and
instead zap the size for anything that is non-code.
Fixes: 6eede548df21 ('symbols: avoid emitting "end" symbols for data items')
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/tools/symbols.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index a2b46d655c..509394d5a4 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -165,6 +165,10 @@ static int read_symbol(FILE *in, struct sym_entry *s)
else if (str[0] == '$')
goto skip_tail;
+ /* We want fake "end" symbols only for text / code. */
+ if (toupper((uint8_t)stype) != 'T')
+ s->size = 0;
+
/* include the type field in the symbol name, so that it gets
* compressed together */
s->len = strlen(str) + 1;
@@ -316,7 +320,6 @@ static int compare_name_orig(const void *p1, const void *p2)
static bool want_symbol_end(unsigned int idx)
{
return table[idx].size &&
- toupper(table[idx].type) == 'T' &&
(idx + 1 == table_cnt ||
table[idx].addr + table[idx].size < table[idx + 1].addr);
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |