This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13022] probe module("*").function("*") does not work on arm


http://sourceware.org/bugzilla/show_bug.cgi?id=13022

--- Comment #7 from William Cohen <wcohen at redhat dot com> 2011-10-13 18:52:32 UTC ---
There is something wrong with the way the elfutils is reading in the
module section data Below is the output of eu-readelf and the various
sections in find_section().  The section->refs[n] in find_section
violate the ordered and non-overlapping assumptions made in the
find_section() binary search.

A couple things different on the arm eu-readelf versus x86: the Addr
column has non-zero values and the offsets(Off) are not monotonically
increasing.

$ eu-readelf -S ./kernel/fs/ext3/ext3.ko
There are 50 section headers, starting at offset 0x15f874:

Section Headers:
[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf
Al
[ 0]                      NULL         00000000 000000 000000  0        0   0 
0
[ 1] .note.gnu.build-id   NOTE         00000000 000034 000024  0 A      0   0 
4
[ 2] .text                PROGBITS     00000024 000058 0134bc  0 AX     0   0 
4
[ 3] .rel.text            REL          00000000 160044 003ca8  8       48   2 
4
[ 4] .exit.text           PROGBITS     00000000 013514 000030  0 AX     0   0 
4
[ 5] .rel.exit.text       REL          00000000 163cec 000028  8       48   4 
4
[ 6] .init.text           PROGBITS     00000000 013544 0000e0  0 AX     0   0 
4
[ 7] .rel.init.text       REL          00000000 163d14 000060  8       48   6 
4
[ 8] .rodata              PROGBITS     000000e0 013624 000ce0  0 A      0   0 
4
[ 9] .rel.rodata          REL          00000000 163d74 000520  8       48   8 
4
[10] .rodata.str1.1       PROGBITS     00000000 014304 002865  1 AMS    0   0 
1
[11] .ARM.extab.exit.text PROGBITS     00000000 016b6c 00000c  0 A      0   0 
4
[12] .ARM.exidx.exit.text ARM_EXIDX    00000000 016b78 000008  0 AL     4   0 
4
[13] .rel.ARM.exidx.exit.text REL          00000000 164294 000018  8       48 
12  4
[14] .ARM.extab.init.text PROGBITS     00000000 016b80 000018  0 A      0   0 
4
[15] .ARM.exidx.init.text ARM_EXIDX    00000000 016b98 000010  0 AL     6   0 
4
[16] .rel.ARM.exidx.init.text REL          00000000 1642ac 000030  8       48 
15  4
[17] .modinfo             PROGBITS     00000000 016ba8 0000f8  0 A      0   0 
4
[18] .ARM.extab           PROGBITS     00000000 016ca0 0009d8  0 A      0   0 
4
[19] .ARM.exidx           ARM_EXIDX    00000000 017678 000688  0 AL     2   0 
4
[20] .rel.ARM.exidx       REL          00000000 1642dc 000da0  8       48  19 
4
[21] .data                PROGBITS     00000688 017d00 000088  0 WA     0   0 
4
[22] .rel.data            REL          00000000 16507c 0000e8  8       48  21 
4
[23] .gnu.linkonce.this_module PROGBITS     00000000 017d88 000158  0 WA     0 
 0  4
[24] .rel.gnu.linkonce.this_module REL          00000000 165164 000010  8      
48  23  4
[25] .bss                 NOBITS       00000158 017ee0 000008  0 WA     0   0 
4
[26] .note.GNU-stack      PROGBITS     00000000 017ee0 000000  0        0   0 
1
[27] .ARM.attributes      ARM_ATTRIBUTES 00000000 017ee0 00002d  0        0   0
 1
[28] .comment             PROGBITS     00000000 017f0d 000384  1 MS     0   0 
1
[29] .debug_aranges       PROGBITS     00000000 018291 000258  0        0   0 
1
[30] .rel.debug_aranges   REL          00000000 165174 000138  8       48  29 
4
[31] .debug_pubnames      PROGBITS     00000000 0184e9 0009dc  0        0   0 
1
[32] .rel.debug_pubnames  REL          00000000 1652ac 000098  8       48  31 
4
[33] .debug_info          PROGBITS     00000000 018ec5 0a80ff  0        0   0 
1
[34] .rel.debug_info      REL          00000000 165344 0593b0  8       48  33 
4
[35] .debug_abbrev        PROGBITS     00000000 0c0fc4 005730  0        0   0 
1
[36] .debug_line          PROGBITS     00000000 0c66f4 00ba2e  0        0   0 
1
[37] .rel.debug_line      REL          00000000 1be6f4 0000a8  8       48  36 
4
[38] .debug_frame         PROGBITS     00000000 0d2124 0031b4  0        0   0 
4
[39] .rel.debug_frame     REL          00000000 1be79c 000d40  8       48  38 
4
[40] .debug_str           PROGBITS     00000000 0d52d8 059b7f  1 MS     0   0 
1
[41] .debug_loc           PROGBITS     00000000 12ee57 019834  0        0   0 
1
[42] .rel.debug_loc       REL          00000000 1bf4dc 004c78  8       48  41 
4
[43] .debug_pubtypes      PROGBITS     00000000 14868b 013aab  0        0   0 
1
[44] .rel.debug_pubtypes  REL          00000000 1c4154 0000a0  8       48  43 
4
[45] .debug_ranges        PROGBITS     00000000 15c136 003550  0        0   0 
1
[46] .rel.debug_ranges    REL          00000000 1c41f4 000a20  8       48  45 
4
[47] .shstrtab            STRTAB       00000000 15f686 0001ec  0        0   0 
1
[48] .symtab              SYMTAB       00000000 1c4c14 003db0 16       49 667 
4
[49] .strtab              STRTAB       00000000 1c89c4 00269e  0        0   0 
1


(gdb) s
dwfl_module_relocate_address (mod=0xbe05a0, addr=0x7e81aaf4)
    at derelocate.c:363
...
(gdb) print sections->count
$8 = 16
(gdb) print sections->refs[0]
$9 = {scn = 0xbe40a8, relocs = 0xbe4130, name = 0x2de616b8 ".text", 
  start = 36, end = 79072}
(gdb) print sections->refs[1]
$10 = {scn = 0xbe43d8, relocs = 0xbe4460, name = 0x2de616e0 ".rodata", 
  start = 224, end = 3520}
(gdb) print sections->refs[2]
$11 = {scn = 0xbe4ce0, relocs = 0x0, name = 0x2de6179e ".bss", start = 344, 
  end = 352}
(gdb) print sections->refs[3]
$12 = {scn = 0xbe4ac0, relocs = 0xbe4b48, name = 0x2de6177a ".data", 
  start = 1672, end = 1808}
(gdb) print sections->refs[4]
$13 = {scn = 0xbe4020, relocs = 0x0, name = 0x2de616a1 ".note.gnu.build-id", 
  start = 65536, end = 65572}
(gdb) print sections->refs[5]
$14 = {scn = 0xbe41b8, relocs = 0xbe4240, name = 0x2de61701 ".exit.text", 
  start = 79072, end = 79120}
(gdb) print sections->refs[6]
$15 = {scn = 0xbe42c8, relocs = 0xbe4350, name = 0x2de6172f ".init.text", 
  start = 79120, end = 79344}
(gdb) print sections->refs[7]
$16 = {scn = 0xbe44e8, relocs = 0x0, name = 0x2de616e8 ".rodata.str1.1", 
  start = 79344, end = 89685}
(gdb) print sections->refs[8]
$17 = {scn = 0xbe4570, relocs = 0x0, name = 0x2de616f7 ".ARM.extab.exit.text", 
  start = 89688, end = 89700}
(gdb) print sections->refs[9]
$18 = {scn = 0xbe45f8, relocs = 0xbe4680, 
  name = 0x2de61710 ".ARM.exidx.exit.text", start = 89700, end = 89708}
(gdb) print sections->refs[10]
$19 = {scn = 0xbe4708, relocs = 0x0, name = 0x2de61725 ".ARM.extab.init.text", 
  start = 89708, end = 89732}
(gdb) print sections->refs[11]
$20 = {scn = 0xbe4790, relocs = 0xbe4818, 
  name = 0x2de6173e ".ARM.exidx.init.text", start = 89732, end = 89748}
(gdb) print sections->refs[12]
$21 = {scn = 0xbe48a0, relocs = 0x0, name = 0x2de61753 ".modinfo", 
  start = 89748, end = 89996}
(gdb) print sections->refs[13]
$22 = {scn = 0xbe4928, relocs = 0x0, name = 0x2de6175c ".ARM.extab", 
  start = 89996, end = 92516}
(gdb) print sections->refs[14]
$23 = {scn = 0xbe49b0, relocs = 0xbe4a38, name = 0x2de6176b ".ARM.exidx", 
  start = 92516, end = 94188}
(gdb) print sections->refs[15]
$24 = {scn = 0xbe4bd0, relocs = 0xbe4c58, 
  name = 0x2de61784 ".gnu.linkonce.this_module", start = 94188, end = 94532}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]