https://bugs.kde.org/show_bug.cgi?id=476277

            Bug ID: 476277
           Summary: valgrind not able to startup in arm 64board using
                    32bit tool chain
    Classification: Developer tools
           Product: valgrind
           Version: 3.21.0
          Platform: RedHat Enterprise Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: ramakanth.var...@gmail.com
  Target Milestone: ---

Created attachment 162689
  --> https://bugs.kde.org/attachment.cgi?id=162689&action=edit
strace and readelf output

SUMMARY

I got valgrind cross compiled using the arm toolchain of i386 ( vendor given)
on a target board aarch64.

We observe for two of the packages could able to run with valgrind .

where as with others I get below error .

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      index
valgrind:  in an object with soname matching:   ld-linux.so.3
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux.so.3
valgrind:
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:
valgrind:  Cannot continue -- exiting now.  Sorry.


In above I see like when I do readelf -S ./lib/libc.so.6

 [63] .debug_aranges    PROGBITS        00000000 131558 000240 00      0   0  8
  [64] .debug_info       PROGBITS        00000000 131798 001571 00      0   0 
1
  [65] .debug_abbrev     PROGBITS        00000000 132d09 0003dd 00      0   0 
1
  [66] .debug_line       PROGBITS        00000000 1330e6 000e17 00      0   0 
1
  [67] .debug_frame      PROGBITS        00000000 133f00 002608 00      0   0 
4
  [68] .debug_str        PROGBITS        00000000 136508 0012f8 01  MS  0   0 
1
  [69] .debug_loc        PROGBITS        00000000 137800 00039b 00      0   0 
1

readelf -S /lib/ld-linux.so.3 , it shows 

  [21] .debug_aranges    PROGBITS        00000000 0218f0 0000a0 00      0   0 
8
  [22] .debug_info       PROGBITS        00000000 021990 000a81 00      0   0 
1
  [23] .debug_abbrev     PROGBITS        00000000 022411 0001b2 00      0   0 
1
  [24] .debug_line       PROGBITS        00000000 0225c3 00037f 00      0   0 
1
  [25] .debug_frame      PROGBITS        00000000 022944 000608 00      0   0 
4
  [26] .debug_str        PROGBITS        00000000 022f4c 0011cf 01  MS  0   0 
1
  [27] .debug_loc        PROGBITS        00000000 02411b 0002fb 00      0   0 
1


STEPS TO REPRODUCE
1. valgrind invocatin with the cross compiled binary in the target board . 


OBSERVED RESULT
valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:

EXPECTED RESULT
To give the mem check report when valgrind is invoked with binaries in the
target board.

SOFTWARE/OS VERSIONS
TARGET Board: arm aarch64 -- endian ?
Host Machine: X86 
Tool Chain: Vendor Given tool chain  of 32 bit 
Target Board OS: Linux aarch64 
Host Machine OS: Centos - 7.9
Valgrind Version: 3.21
GCC version : arm-buildroot-linux-gnueabi-gcc.br_real (Buildroot 2021.02.4)
10.3.0
GLIBC: crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25

ADDITIONAL INFORMATION
1. straceoutput
2. readelf ld linux
3. readelf use dynamic symbols output

Please go over the details, if any thing missed do let me know.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to