Roland McGrath <[email protected]> writes: > I'm not very happy about readelf encoding all this format knowledge. > That's what we have libebl for. If the Ebl_Core_Item format needs to be > extended to handle these new note types, then that is what we should be > doing rather than hard-coding format knowledge in readelf.
FWIW, yesterday I spent some time playing with the idea of representing this with typed Dwarf expressions. This would work, I think, but it's verbose, presumably error-prone, and many things that are trivial in C end up being pain--such as looking up terminating zero in a list of strings (as comes up in NT_FILE). Some of that could be alleviated by having a library of common Dwarf subprograms, but at that point the whole scheme gets fairly complex. Moreover, it's not clear we'd get anything much out of this--we could just as well just stick a callback pointer to the item structure. So, scratch. Thanks, PM
