Future WorkI'd set this aside for now and we can return to it later. I think it could
-----------
I don't see an easy way to support multiple homonym <object, name>
symbols with unique <position> values in the current livepatch module
Elf format. The only solutions that come to mind right now include
renaming homonym symbols somehow to retain the relocation->symbol
relationship when separate object files are combined. Perhaps an
intermediate linker step could make annotated symbols unique in some way
to achieve this. /thinking out loud
be quite rare in practice.
I was thinking about renaming the symbol too. We can extend the symbolI think this could work well, but (sorry if I understood Joe's idea
naming convention we have now and deal with it in klp_resolve_symbols(),
but maybe Josh will come up with something clever and cleaner.
wrongly) not as a linker step. Instead of modifying the linker, I think
we could create another tool and plug it into the kbuild pipeline prior
to the livepatch module linking. This way, we would parse the .o elf
files, check for homonyms and rename them based on a convention that is
later understood by klp-convert, as suggested.
If I am not missing something, this would fix the case where we have
homonyms pointing to the same or different positions, without additional
user intervention other then adding the SYMPOS annotations.
If you consider this to be useful I can start experiencing.