mbox

[0/2] Bug 28954 - add Linux Kernel symbol namespace support

Message ID 20220314181312.3436802-1-gprocida@google.com
Headers

Message

Giuliano Procida March 14, 2022, 6:13 p.m. UTC
  Hi Dodji.

These two patches aim to add kernel symbol namespace support. There
are two bits of this that could be debated (and easily changed).

A. choice of XML attribute name

I've chosen "ns", mostly because "namespace" implies C++ namespace
everywhere else.

B. choice of representation

There are several possible levels of distinction of presence:

1. Non-kernel symbols cannot be exported to a namespace.
2. Kernel symbols can be exported globally and not to namespace.
3. Kernel symbols can be exported to a named namespace.

And there is the option of treating the empty namespace name string
specially. I've chosen to represent namespace internally as
optional<string> and not distinguish between cases 1 and 2.

Regards.

Giuliano Procida (2):
  optional: add operator== and operator!=
  add Linux kernel symbol namespace support

 include/abg-cxx-compat.h | 16 +++++++++++++
 include/abg-ir.h         |  9 ++++++++
 src/abg-comp-filter.cc   | 39 +++++++++++++++++++++++++++++++-
 src/abg-ir.cc            | 27 +++++++++++++++++++++-
 src/abg-reader.cc        |  7 ++++++
 src/abg-reporter-priv.cc | 12 ++++++++++
 src/abg-symtab-reader.cc | 49 ++++++++++++++++++++++++++++++++++++++++
 src/abg-writer.cc        |  4 ++++
 8 files changed, 161 insertions(+), 2 deletions(-)