mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
create_fake_symbols() sizes each ANNOTATE_DATA_SPECIAL entry from the
offset of the next annotation, falling back to the end of the section
for the last entry. But the last entry is detected by a zero size,
which also happens for an *empty* entry: ALTERNATIVE(oldinstr, "", ft)
still annotates its zero-length replacement, at the same offset as the
next entry's annotation.
So every empty replacement gets a fake symbol spanning the entire rest
of .altinstr_replacement. That's harmless today only because
find_symbol_containing() picks the smaller of two overlapping symbols.
Track whether a next annotation was found rather than inferring it from
the size. A zero-length fake symbol is fine: find_symbol_containing()
skips those, so the properly sized symbol at the same offset still wins.
Fixes:
|
||
|---|---|---|
| .. | ||
| arch | ||
| Documentation | ||
| include/objtool | ||
| .gitignore | ||
| Build | ||
| builtin-check.c | ||
| builtin-klp.c | ||
| check.c | ||
| disas.c | ||
| elf.c | ||
| klp-checksum.c | ||
| klp-diff.c | ||
| klp-post-link.c | ||
| klp-symid.c | ||
| klp-sympos.c | ||
| Makefile | ||
| noreturns.h | ||
| objtool.c | ||
| orc_dump.c | ||
| orc_gen.c | ||
| signal.c | ||
| special.c | ||
| sync-check.sh | ||
| trace.c | ||
| weak.c | ||