@@ -146,9 +146,9 @@ struct ddebug_class_user {
/* encapsulate linker provided built-in (or module) dyndbg data */
struct _ddebug_info {
- struct _ddebug *descs;
- struct ddebug_class_map *classes;
- struct ddebug_class_user *class_users;
+ struct _ddebug *descs __counted_by(num_descs);
+ struct ddebug_class_map *classes __counted_by(num_classes);
+ struct ddebug_class_user *class_users __counted_by(num_class_users);
unsigned int num_descs;
unsigned int num_classes;
unsigned int num_class_users;
@@ -49,9 +49,9 @@ extern struct ddebug_class_user __stop___dyndbg_class_users[];
struct ddebug_table {
struct list_head link;
const char *mod_name;
- struct _ddebug *ddebugs;
- struct ddebug_class_map *classes;
- struct ddebug_class_user *class_users;
+ struct _ddebug *ddebugs __counted_by(num_ddebugs);
+ struct ddebug_class_map *classes __counted_by(num_classes);
+ struct ddebug_class_user *class_users __counted_by(num_class_users);
unsigned int num_ddebugs, num_classes, num_class_users;
};
Tell the compiler about our vectors (array,length), in 2 places: h: struct _ddebug_info, which keeps refs to the __dyndbg_* ELF/DATA sections, these are all vectors with a length. c: struct ddebug_table, which has sub-refs into _ddebug_info.* Signed-off-by: Jim Cromie <jim.cromie@gmail.com> --- include/linux/dynamic_debug.h | 6 +++--- lib/dynamic_debug.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)