Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225636

SA can't handle prelinked libraries

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b02
    • OS:
      linux

      Backports

        Description

        I attempted to open the core which is generated by RHEL 6, but it could not .
        I got debug log from SA with LIBSAPROC_DEBUG=1 as below:

        ```
        libsaproc DEBUG: first link map is at 0x3fd6c22188
        libsaproc DEBUG: path /lib64/libpthread.so.0 substituted for /lib64/libpthread.so.0
        libsaproc DEBUG: reading library /lib64/libpthread.so.0 @ 0x0 [ 0x0 ]
        libsaproc DEBUG: address conflict @ 0x0 (existing map size = 129808, size = 93908, flags = 5)
        libsaproc DEBUG: can't read shared object's segments
        ```

        The OS which generated the core is set to enable prelink, and libpthread is prelinked.
        According to GDB implementation, load address of prelinked library should be calculated by offset of link_map.l_ld and the address of .dynamic section.

        https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/solib-svr4.c;h=2828c96c68355931332c1704035e9a0d8f691fad;hb=HEAD#l285

        I attached the patch for this issue (sa-prelink.patch).

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ysuenaga Yasumasa Suenaga
                Reporter:
                ysuenaga Yasumasa Suenaga
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: