Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-21170

gdb: Unclear relationship between DSO load address and "info share"

    • None
    • Low
    • rhel-sst-pt-perf-debug
    • ssg_platform_tools
    • 1
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • None

      What were you trying to do that didn't work?

      I'm looking at info share as a way to obtain the load address of shared objects. This data is helpful to make sense of addresses if shared objects lack debugging information. Having a convenient command for this helps in support scenarios.

      Please provide the package NVR for which bug is seen:

      gdb-10.2-11.el9.x86_64

      How reproducible:

      Always.

      Steps to reproduce

      1. gdb -p $$
      2. info share
      3. print/x _rtld_global._dl_rtld_map.l_addr

      Expected results

      info share prints the page-aligned load address of shared objects.

      Actual results

      (gdb) info share
      From                To                  Syms Read   Shared Object Library
      0x00007f2d5b58d570  0x00007f2d5b59a05c  Yes (*)     /lib64/libtinfo.so.6
      0x00007f2d5b228700  0x00007f2d5b39b1ed  Yes         /lib64/libc.so.6
      0x00007f2d5b5be090  0x00007f2d5b5e3ac3  Yes         /lib64/ld-linux-x86-64.so.2
      (*): Shared library is missing debugging information.
      (gdb) print/x _rtld_global._dl_rtld_map.l_addr
      $2 = 0x7f2d5b5bc000
      

      Note how the load addresses of the shared objects are not page-aligned.

              keiths@redhat.com Keith Seitz
              fweimer@redhat.com Florian Weimer
              Keith Seitz Keith Seitz
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: