Bug#895574: lintian: binary-compiled-with-profiling-enabled test fails on Ubuntu's armhf
tags 895574 + moreinfo
thanks
Hi Jeremy,
Thanks for the report!
> armhf is a bit different than the other Ubuntu architectures because
> it uses a different kind of virtualization
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? :)
Best wishes,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
There are 30 section headers, starting at offset 0x1cc8:
Section Headers:
[Nr] Name
Type Addr Off Size ES Lk Inf Al
Flags
[ 0]
NULL 00000000 000000 000000 00 0 0 0
[00000000]:
[ 1] .interp
PROGBITS 00010154 000154 000019 00 0 0 1
[00000002]: ALLOC
[ 2] .note.ABI-tag
NOTE 00010170 000170 000020 00 0 0 4
[00000002]: ALLOC
[ 3] .note.gnu.build-id
NOTE 00010190 000190 000024 00 0 0 4
[00000002]: ALLOC
[ 4] .gnu.hash
GNU_HASH 000101b4 0001b4 000060 04 5 0 4
[00000002]: ALLOC
[ 5] .dynsym
DYNSYM 00010214 000214 0000f0 10 6 1 4
[00000002]: ALLOC
[ 6] .dynstr
STRTAB 00010304 000304 0000c2 00 0 0 1
[00000002]: ALLOC
[ 7] .gnu.version
VERSYM 000103c6 0003c6 00001e 02 5 0 2
[00000002]: ALLOC
[ 8] .gnu.version_r
VERNEED 000103e4 0003e4 000030 00 6 1 4
[00000002]: ALLOC
[ 9] .rel.dyn
REL 00010414 000414 000008 08 5 0 4
[00000002]: ALLOC
[10] .rel.plt
REL 0001041c 00041c 000038 08 5 22 4
[00000042]: ALLOC, INFO LINK
[11] .init
PROGBITS 00010454 000454 00000c 00 0 0 4
[00000006]: ALLOC, EXEC
[12] .plt
PROGBITS 00010460 000460 00006c 04 0 0 4
[00000006]: ALLOC, EXEC
[13] .text
PROGBITS 000104d0 0004d0 0001d8 00 0 0 8
[00000006]: ALLOC, EXEC
[14] .fini
PROGBITS 000106a8 0006a8 000008 00 0 0 4
[00000006]: ALLOC, EXEC
[15] .rodata
PROGBITS 000106b0 0006b0 000011 00 0 0 4
[00000002]: ALLOC
[16] .ARM.exidx
ARM_EXIDX 000106c4 0006c4 000008 00 13 0 4
[00000082]: ALLOC, LINK ORDER
[17] .eh_frame
PROGBITS 000106cc 0006cc 000004 00 0 0 4
[00000002]: ALLOC
[18] .init_array
INIT_ARRAY 00020f04 000f04 000004 04 0 0 4
[00000003]: WRITE, ALLOC
[19] .fini_array
FINI_ARRAY 00020f08 000f08 000004 04 0 0 4
[00000003]: WRITE, ALLOC
[20] .jcr
PROGBITS 00020f0c 000f0c 000004 00 0 0 4
[00000003]: WRITE, ALLOC
[21] .dynamic
DYNAMIC 00020f10 000f10 0000f0 08 6 0 4
[00000003]: WRITE, ALLOC
[22] .got
PROGBITS 00021000 001000 000048 04 0 0 4
[00000003]: WRITE, ALLOC
[23] .data
PROGBITS 00021048 001048 000008 00 0 0 4
[00000003]: WRITE, ALLOC
[24] .bss
NOBITS 00021050 001050 000008 00 0 0 4
[00000003]: WRITE, ALLOC
[25] .comment
PROGBITS 00000000 001050 00002d 01 0 0 1
[00000030]: MERGE, STRINGS
[26] .ARM.attributes
ARM_ATTRIBUTES 00000000 00107d 000033 00 0 0 1
[00000000]:
[27] .symtab
SYMTAB 00000000 0010b0 000780 10 28 92 4
[00000000]:
[28] .strtab
STRTAB 00000000 001830 00038e 00 0 0 1
[00000000]:
[29] .shstrtab
STRTAB 00000000 001bbe 00010a 00 0 0 1
[00000000]:
Elf file type is EXEC (Executable file)
Entry point 0x104d1
There are 9 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
EXIDX 0x0006c4 0x000106c4 0x000106c4 0x00008 0x00008 R 0x4
PHDR 0x000034 0x00010034 0x00010034 0x00120 0x00120 R E 0x4
INTERP 0x000154 0x00010154 0x00010154 0x00019 0x00019 R 0x1
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]
LOAD 0x000000 0x00010000 0x00010000 0x006d0 0x006d0 R E 0x10000
LOAD 0x000f04 0x00020f04 0x00020f04 0x0014c 0x00154 RW 0x10000
DYNAMIC 0x000f10 0x00020f10 0x00020f10 0x000f0 0x000f0 RW 0x4
NOTE 0x000170 0x00010170 0x00010170 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
GNU_RELRO 0x000f04 0x00020f04 0x00020f04 0x000fc 0x000fc R 0x1
Section to Segment mapping:
Segment Sections...
00 .ARM.exidx
01
02 .interp
03 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
04 .init_array .fini_array .jcr .dynamic .got .data .bss
05 .dynamic
06 .note.ABI-tag .note.gnu.build-id
07
08 .init_array .fini_array .jcr .dynamic
Dynamic section at offset 0xf10 contains 25 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000f (RPATH) Library rpath: [/usr/local/lib]
0x0000000c (INIT) 0x10454
0x0000000d (FINI) 0x106a8
0x00000019 (INIT_ARRAY) 0x20f04
0x0000001b (INIT_ARRAYSZ) 4 (bytes)
0x0000001a (FINI_ARRAY) 0x20f08
0x0000001c (FINI_ARRAYSZ) 4 (bytes)
0x6ffffef5 (GNU_HASH) 0x101b4
0x00000005 (STRTAB) 0x10304
0x00000006 (SYMTAB) 0x10214
0x0000000a (STRSZ) 194 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x21000
0x00000002 (PLTRELSZ) 56 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x1041c
0x00000011 (REL) 0x10414
0x00000012 (RELSZ) 8 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffe (VERNEED) 0x103e4
0x6fffffff (VERNEEDNUM) 1
0x6ffffff0 (VERSYM) 0x103c6
0x00000000 (NULL) 0x0
Symbol table '.dynsym' contains 15 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FUNC GLOBAL DEFAULT UND _mcleanup@GLIBC_2.4 (2)
2: 00000000 0 FUNC GLOBAL DEFAULT UND puts@GLIBC_2.4 (2)
3: 00000000 0 FUNC GLOBAL DEFAULT UND __monstartup@GLIBC_2.4 (2)
4: 00010641 60 FUNC GLOBAL DEFAULT 13 __libc_csu_init
5: 00000000 0 FUNC GLOBAL DEFAULT UND __cxa_atexit@GLIBC_2.4 (2)
6: 000104d1 0 FUNC GLOBAL DEFAULT 13 _start
7: 00010609 54 FUNC GLOBAL DEFAULT 13 main
8: 000106b0 0 NOTYPE GLOBAL DEFAULT 14 etext
9: 00000000 0 FUNC GLOBAL DEFAULT UND __gnu_mcount_nc@GLIBC_2.8 (3)
10: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2)
11: 0001067d 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
12: 00000000 0 FUNC GLOBAL DEFAULT UND strcpy@GLIBC_2.4 (2)
13: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2)
14: 00010519 64 FUNC GLOBAL DEFAULT 13 __gmon_start__
Symbol table '.symtab' contains 120 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00010154 0 SECTION LOCAL DEFAULT 1
2: 00010170 0 SECTION LOCAL DEFAULT 2
3: 00010190 0 SECTION LOCAL DEFAULT 3
4: 000101b4 0 SECTION LOCAL DEFAULT 4
5: 00010214 0 SECTION LOCAL DEFAULT 5
6: 00010304 0 SECTION LOCAL DEFAULT 6
7: 000103c6 0 SECTION LOCAL DEFAULT 7
8: 000103e4 0 SECTION LOCAL DEFAULT 8
9: 00010414 0 SECTION LOCAL DEFAULT 9
10: 0001041c 0 SECTION LOCAL DEFAULT 10
11: 00010454 0 SECTION LOCAL DEFAULT 11
12: 00010460 0 SECTION LOCAL DEFAULT 12
13: 000104d0 0 SECTION LOCAL DEFAULT 13
14: 000106a8 0 SECTION LOCAL DEFAULT 14
15: 000106b0 0 SECTION LOCAL DEFAULT 15
16: 000106c4 0 SECTION LOCAL DEFAULT 16
17: 000106cc 0 SECTION LOCAL DEFAULT 17
18: 00020f04 0 SECTION LOCAL DEFAULT 18
19: 00020f08 0 SECTION LOCAL DEFAULT 19
20: 00020f0c 0 SECTION LOCAL DEFAULT 20
21: 00020f10 0 SECTION LOCAL DEFAULT 21
22: 00021000 0 SECTION LOCAL DEFAULT 22
23: 00021048 0 SECTION LOCAL DEFAULT 23
24: 00021050 0 SECTION LOCAL DEFAULT 24
25: 00000000 0 SECTION LOCAL DEFAULT 25
26: 00000000 0 SECTION LOCAL DEFAULT 26
27: 00000000 0 FILE LOCAL DEFAULT ABS /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/gcrt1.o
28: 00010170 0 NOTYPE LOCAL DEFAULT 2 $d
29: 000104d0 0 NOTYPE LOCAL DEFAULT 13 $t
30: 00010508 0 NOTYPE LOCAL DEFAULT 13 $d
31: 000106c4 0 NOTYPE LOCAL DEFAULT 16 $d
32: 000106b0 0 NOTYPE LOCAL DEFAULT 15 $d
33: 00021048 0 NOTYPE LOCAL DEFAULT 23 $d
34: 00010518 0 NOTYPE LOCAL DEFAULT 13 $t
35: 00010544 0 NOTYPE LOCAL DEFAULT 13 $d
36: 00021050 0 NOTYPE LOCAL DEFAULT 24 $d
37: 00021050 4 OBJECT LOCAL DEFAULT 24 called.7928
38: 00000000 0 FILE LOCAL DEFAULT ABS /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o
39: 00010558 0 NOTYPE LOCAL DEFAULT 13 $a
40: 00010558 0 FUNC LOCAL DEFAULT 13 call_weak_fn
41: 00010574 0 NOTYPE LOCAL DEFAULT 13 $d
42: 00010454 0 NOTYPE LOCAL DEFAULT 11 $a
43: 000106a8 0 NOTYPE LOCAL DEFAULT 14 $a
44: 00000000 0 FILE LOCAL DEFAULT ABS /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o
45: 0001045c 0 NOTYPE LOCAL DEFAULT 11 $a
46: 000106ac 0 NOTYPE LOCAL DEFAULT 14 $a
47: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
48: 00020f0c 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__
49: 0001057d 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones
50: 0001057c 0 NOTYPE LOCAL DEFAULT 13 $t
51: 0001059c 0 NOTYPE LOCAL DEFAULT 13 $d
52: 000105a0 0 NOTYPE LOCAL DEFAULT 13 $t
53: 000105a1 0 FUNC LOCAL DEFAULT 13 register_tm_clones
54: 0002104c 0 NOTYPE LOCAL DEFAULT 23 $d
55: 000105cd 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
56: 00021054 1 OBJECT LOCAL DEFAULT 24 completed.10395
57: 00020f08 0 NOTYPE LOCAL DEFAULT 19 $d
58: 00020f08 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry
59: 000105e5 0 FUNC LOCAL DEFAULT 13 frame_dummy
60: 00020f04 0 NOTYPE LOCAL DEFAULT 18 $d
61: 00020f04 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry
62: 00021054 0 NOTYPE LOCAL DEFAULT 24 $d
63: 00000000 0 FILE LOCAL DEFAULT ABS basic.c
64: 000106b4 0 NOTYPE LOCAL DEFAULT 15 $d
65: 00010608 0 NOTYPE LOCAL DEFAULT 13 $t
66: 00000000 0 FILE LOCAL DEFAULT ABS elf-init.oS
67: 00010640 0 NOTYPE LOCAL DEFAULT 13 $t
68: 00010674 0 NOTYPE LOCAL DEFAULT 13 $d
69: 0001067c 0 NOTYPE LOCAL DEFAULT 13 $t
70: 00000000 0 FILE LOCAL DEFAULT ABS atexit.oS
71: 00010680 0 NOTYPE LOCAL DEFAULT 13 $t
72: 00010694 0 NOTYPE LOCAL DEFAULT 13 $d
73: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
74: 000106cc 0 NOTYPE LOCAL DEFAULT 17 $d
75: 000106cc 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__
76: 00020f0c 0 NOTYPE LOCAL DEFAULT 20 $d
77: 00020f0c 0 OBJECT LOCAL DEFAULT 20 __JCR_END__
78: 00000000 0 FILE LOCAL DEFAULT ABS
79: 00020f08 0 NOTYPE LOCAL DEFAULT 18 __init_array_end
80: 0002104c 0 OBJECT LOCAL DEFAULT 23 __dso_handle
81: 00020f10 0 OBJECT LOCAL DEFAULT 21 _DYNAMIC
82: 00020f04 0 NOTYPE LOCAL DEFAULT 18 __init_array_start
83: 00021000 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_
84: 000106a0 8 FUNC LOCAL DEFAULT 13 ____gmon_start___from_arm
85: 000106a0 0 NOTYPE LOCAL DEFAULT 13 $a
86: 000106a4 0 NOTYPE LOCAL DEFAULT 13 $d
87: 00010460 0 NOTYPE LOCAL DEFAULT 12 $a
88: 00010470 0 NOTYPE LOCAL DEFAULT 12 $d
89: 00010474 0 NOTYPE LOCAL DEFAULT 12 $a
90: 000104a4 0 NOTYPE LOCAL DEFAULT 12 $t
91: 000104a8 0 NOTYPE LOCAL DEFAULT 12 $a
92: 0001067d 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
93: 00021048 0 NOTYPE WEAK DEFAULT 23 data_start
94: 00021050 0 NOTYPE GLOBAL DEFAULT 24 __bss_start__
95: 00010681 28 FUNC GLOBAL HIDDEN 13 atexit
96: 00000000 0 FUNC GLOBAL DEFAULT UND _mcleanup@@GLIBC_2.4
97: 00021058 0 NOTYPE GLOBAL DEFAULT 24 _bss_end__
98: 00021050 0 NOTYPE GLOBAL DEFAULT 23 _edata
99: 000106a8 0 FUNC GLOBAL DEFAULT 14 _fini
100: 00021058 0 NOTYPE GLOBAL DEFAULT 24 __bss_end__
101: 00000000 0 FUNC GLOBAL DEFAULT UND __monstartup@@GLIBC_2.4
102: 00000000 0 FUNC GLOBAL DEFAULT UND strcpy@@GLIBC_2.4
103: 00021048 0 NOTYPE GLOBAL DEFAULT 23 __data_start
104: 00000000 0 FUNC GLOBAL DEFAULT UND puts@@GLIBC_2.4
105: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4
106: 00010519 64 FUNC GLOBAL DEFAULT 13 __gmon_start__
107: 000106b0 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
108: 00010641 60 FUNC GLOBAL DEFAULT 13 __libc_csu_init
109: 00000000 0 FUNC GLOBAL DEFAULT UND __cxa_atexit@@GLIBC_2.4
110: 00021058 0 NOTYPE GLOBAL DEFAULT 24 _end
111: 000104d1 0 FUNC GLOBAL DEFAULT 13 _start
112: 00021058 0 NOTYPE GLOBAL DEFAULT 24 __end__
113: 00021050 0 NOTYPE GLOBAL DEFAULT 24 __bss_start
114: 00010609 54 FUNC GLOBAL DEFAULT 13 main
115: 000106b0 0 NOTYPE GLOBAL DEFAULT 14 etext
116: 00021050 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__
117: 00000000 0 FUNC GLOBAL DEFAULT UND __gnu_mcount_nc@@GLIBC_2.8
118: 00000000 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4
119: 00010454 0 FUNC GLOBAL DEFAULT 11 _init
Version symbols section '.gnu.version' contains 15 entries:
Addr: 00000000000103c6 Offset: 0x0003c6 Link: 5 (.dynsym)
000: 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
004: 1 (*global*) 2 (GLIBC_2.4) 1 (*global*) 1 (*global*)
008: 1 (*global*) 3 (GLIBC_2.8) 2 (GLIBC_2.4) 1 (*global*)
00c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 1 (*global*)
Version needs section '.gnu.version_r' contains 1 entry:
Addr: 0x00000000000103e4 Offset: 0x0003e4 Link: 6 (.dynstr)
000000: Version: 1 File: libc.so.6 Cnt: 2
0x0010: Name: GLIBC_2.8 Flags: none Version: 3
0x0020: Name: GLIBC_2.4 Flags: none Version: 2
Reply to: