Messages in this thread | | | From | jim.cromie@gmail ... | Date | Tue, 29 Oct 2019 15:25:33 -0600 | Subject | Re: [PATCH 04/16] dyndbg: rename __verbose section to __dyndbg |
| |
On Tue, Oct 29, 2019 at 2:37 PM Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote: > > On 29/10/2019 21.00, Jim Cromie wrote: > > dyndbg populates its callsite info into __verbose section, change that > > to a more specific and descriptive name, __dyndbg. > > Yeah, that has always bugged me. Ack to that part. > > > Also, per checkpatch: > > move extern struct _ddebug __(start|stop)__dyndbg[] to header file > > Hm, why? checkpatch should often be ignored. Since we only refer to > those symbols in the .c file, there's no reason to pollute every other > translation unit with those declarations. Having declarations in a > header makes sense when the actual entity gets defined in some .c file > (which hopefully also includes the header). But these are defined by the > linker, so there's no type safety to be had. >
checkpatch wasnt in a mood to explain itself, but the other simplification seemed good, credit by association
I guess the action-at-a-distance feel to the linker magic and the extern qualifier, swung me toward heeding the advice. OTOH, as you note, only dyndbg should be mucking with the symbols.
> > simplify __attribute(..) to __section(__dyndbg) declaration. > > Makes sense, since you're munching the thing anyway. > > Rasmus
| |