On Wed, Apr 18, 2018 at 07:09:38PM +0100, Chris Lamb wrote:
>
>>>I suspect the underlying problem is that we are not detecting
>>>profiling information on armhf correctly. The relevant code is:
>>>
>>>  
>>> https://salsa.debian.org/lintian/lintian/blob/master/checks/binaries.pm#L192-207
>>>
>>>I have attached the "readelf -WltdVs" output of "basic.c" compiled
>>>on the harris.debian.org porterbox.
>>>
>>>Whilst I see a "GLIBC_" section, I do see an mcount:
>>>
>>>    117: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
>>> __gnu_mcount_nc@@GLIBC_2.8
>>>
>>>Can someone with some ELF knowledge chime in here? :)

I think I've sussed it after a lot of digging - the regex you're using
is simply too tight and won't match that:

      if ($sec =~ /^GLIBC_.*/ and $sym =~ m{\A _?+ _?+ mcount \Z}xsm){

That's not going to match "__gnu_mcount_nc" at all. Simple fix:

      if ($sec =~ /^GLIBC_.*/ and $sym =~ m{\A _?+ _?+ (gnu_)?+mcount(_nc)?+ 
\Z}xsm) {

works both on armhf and amd64. Wow, debugging lintian tests is a lot of effort!

-- 
Steve McIntyre, Cambridge, UK.                                st...@einval.com
"Managing a volunteer open source project is a lot like herding
 kittens, except the kittens randomly appear and disappear because they
 have day jobs." -- Matt Mackall

Reply via email to