Forum Stats

  • 3,727,533 Users
  • 2,245,406 Discussions
  • 7,852,848 Comments

Discussions

Studio 12.6/Solaris 11.3 x86 Can't discover PIE executables

RaiderOfTheLostSPARC
RaiderOfTheLostSPARC Member Posts: 255 Blue Ribbon

Hi,

known bug?

$ cat hello.c

#include <stdio.h>

int main(void) {

    printf("hello new world!\n");

    return 0;

}

$ cc -m64 -g -KPIC -ztype=pie hello.c

$ file a.out

a.out: ELF 64-bit LSB dynamic lib AMD64 Version 1 [SSE], position-independent executable, dynamically linked, not stripped

$ discover -vw - a.out

discover (info): Studio 12.6 Memory Error Discovery Tool 2.4 SunOS_i386 2017-05-30

discover (error): The instrumentation target needs to be an executable. a.out is a shared library.

Best Answer

  • Steve.Clamage-Oracle
    Steve.Clamage-Oracle Member Posts: 775
    edited July 2017 Accepted Answer

    Thanks for reporting this problem. It seems that "discover" was not updated in Studio 12.6 to recognize PIE programs.

    As a work-around, you can link the program as a normal executable so you can run discover, then re-link as a PIE when you are finished using discover.

    EDIT: I filed Bug 26526167 for the problem.

Answers

  • Steve.Clamage-Oracle
    Steve.Clamage-Oracle Member Posts: 775
    edited July 2017 Accepted Answer

    Thanks for reporting this problem. It seems that "discover" was not updated in Studio 12.6 to recognize PIE programs.

    As a work-around, you can link the program as a normal executable so you can run discover, then re-link as a PIE when you are finished using discover.

    EDIT: I filed Bug 26526167 for the problem.

This discussion has been closed.