[Skiboot] [PATCH] mambo: Match whole string when looking up symbols with linsym/skisym

Michael Ellerman mpe at ellerman.id.au
Wed May 31 15:04:08 AEST 2017


Oliver O'Halloran <oohall at gmail.com> writes:

> On Wed, May 31, 2017 at 1:04 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
>> linsym/skisym use a regex to match the symbol name, and accepts a
>> partial match against the entry in the symbol map, which can lead to
>> somewhat confusing results, eg:
>>
>>   systemsim % linsym early_setup
>>   0xc000000000027890
>>   systemsim % linsym early_setup$
>>   0xc000000000aa8054
>>   systemsim % linsym early_setup_secondary
>>   0xc000000000027890
>>
>> I don't think that's the behaviour we want, so append a $ to the name so
>> that the symbol has to match against the whole entry, eg:
>>
>>   systemsim % linsym early_setup
>>   0xc000000000aa8054
>>
>> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
>
> Tested-by: Oliver O'Halloran <oohall at gmail.com>
>
> Although, come to think of it we'll have a similar issue with dot
> symbols since the symbol name is baked into the regex and dot matches
> anything.

Yeah. It would probably be better to just iterate over the lines of the
file and match the name, but that's a bit beyond my TCL skills.

cheers


More information about the Skiboot mailing list