Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline

Tom Tromey
2013-07-10T16:56:38Z

>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:

Yao> That is, after the hash table of minsyms of OBJFILE is built up, we
Yao> can iterate all minsyms, if symbol is _imp_x, look up x in the hash
Yao> table. If found, modify the found's type.

Yao> + for (i = objfile->minimal_symbol_count; i > 0; i--)

This should use ALL_OBJFILE_MSYMBOLS.

I'm mildly concerned that this exposes an implementation detail of the
minsym storage -- namely, it assumes that it is ok to modify a minsym
after the minsym is installed.

This approach would also block constification of the minsym API.

Neither of these seem like blocking considerations though. Presumably
bugs arising from the first would be caught in testing; and for the
second, casting away const would be obviously ok.

So, ok with the ALL_OBJFILE_MSYMBOLS change.

Tom