<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Are you sure you need to supply those flags at all?  Are you using a
    recent enough Linux Distribution?  I haven't build GDAL 2.3 in a
    long time (it is very old), I suppose it is possible it is doing
    something strange disabling PIE in the build system.<br>
    <br>
    My build of GDAL 3.1 on Debian 10 built PIE executable by default
    (without me specifying any special compiler options).<br>
    <br>
    For my GDAL 3.1 build:<br>
    <tt>$ readelf -l gdalinfo</tt><tt><br>
    </tt><tt>
    </tt><tt><br>
    </tt><tt>
      Elf file type is DYN (Shared object file)</tt><tt><br>
    </tt><tt>
      ...</tt><tt><br>
    </tt><tt>
    </tt><tt><br>
    </tt><tt>
    </tt><br>
    <br>
    It looks like gcc/g++ in Debian 10 default to building PIE.  I'd
    expect similar vintage Ubuntu derivatives would do the same:<br>
    <br>
    <tt>$ cat a.c</tt><tt><br>
    </tt><tt>int main() { return 0; }</tt><tt><br>
    </tt><tt>$ gcc a.c</tt><tt><br>
    </tt><tt>$ file a.out</tt><tt><br>
    </tt><tt>a.out: ELF 64-bit LSB </tt><tt><b>pie executable</b></tt><tt>,
      x86-64, version 1 (SYSV), dynamically linked, interpreter
      /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0,
      BuildID[sha1]=fde557ade69c32cd2554ee888bc892175ae86867, not
      stripped</tt><tt><br>
    </tt><tt>$ readelf -l a.out</tt><tt><br>
    </tt><tt><br>
    </tt><tt>Elf file type is DYN (Shared object file)</tt><tt><br>
    </tt><tt>...</tt><tt><br>
    </tt><br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 8/5/20 9:55 AM, Brian M Hamlin
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:11e9df3a-edfb-ab57-0b79-08407471e74d@light42.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi Kavitha -</p>
      <p>  In general, specialized security work is outside of the scope
        of the <i>educational mission</i> at OSGeoLive project.</p>
      <p> ASLR is a security layer ?  from Google search..</p>
      <p>"<span style="color: rgb(34, 34, 34); font-family: Roboto,
          arial, sans-serif; font-size: 16px; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          font-weight: 400; letter-spacing: normal; orphans: 2;
          text-align: left; text-indent: 0px; text-transform: none;
          white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-text-stroke-width: 0px; background-color: rgb(255,
          255, 255); text-decoration-style: initial;
          text-decoration-color: initial; display: inline !important;
          float: none;">Address Space Layout Randomization (</span><b
          style="color: rgb(34, 34, 34); font-family: Roboto, arial,
          sans-serif; font-size: 16px; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          letter-spacing: normal; orphans: 2; text-align: left;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
          background-color: rgb(255, 255, 255); text-decoration-style:
          initial; text-decoration-color: initial;">ASLR</b><span
          style="color: rgb(34, 34, 34); font-family: Roboto, arial,
          sans-serif; font-size: 16px; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          font-weight: 400; letter-spacing: normal; orphans: 2;
          text-align: left; text-indent: 0px; text-transform: none;
          white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-text-stroke-width: 0px; background-color: rgb(255,
          255, 255); text-decoration-style: initial;
          text-decoration-color: initial; display: inline !important;
          float: none;">) is a computer security technique which
          involves randomly positioning the base address of an
          executable and the position of libraries, heap, and stack, in
          a process's address space"</span></p>
      <div class="moz-cite-prefix">Security is a concern at OSGeoLive,
        but not the primary concern. If you seek direct consulting
        hours, please consider a time+money budget to bring in
        additional skillsets.</div>
      <div class="moz-cite-prefix"><br>
      </div>
      <div class="moz-cite-prefix">If you find a solution, please do not
        hesitate to share the results with the GDAL project and Ubuntu
        upstream, for better specialized security in the future. <br>
      </div>
      <div class="moz-cite-prefix"><br>
      </div>
      <div class="moz-cite-prefix">  others may have different resources
        for you on this topic<br>
      </div>
      <div class="moz-cite-prefix">  best regards  --Brian<br>
      </div>
      <div class="moz-cite-prefix"><br>
      </div>
      <div class="moz-cite-prefix"><br>
      </div>
      <div class="moz-cite-prefix">On 8/5/20 7:32 AM, Kavitha K wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CACLbJJf4EqLvfa6Kvpb-nnREs3mGCKh5_7Df-tZTuJvTOV_JaA@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div dir="ltr">Hi All,
          <div> We are trying to compile the gdal 2.3.2 source with ASLR
            . But we are seeing the<br>
             Elf file type as EXEC (Executable file) instead DYN.<br>
            <br>
             Please help us whether gdal build is supported the
            compilation with "-Fpie -pie -fPIC".<br>
            <br>
             Steps which we followed:<br>
            <br>
             cp gdalDevKits/gdal-2.3.2.tar.gz .<br>
            <br>
             tar -xvf gdal-2.3.2.tar.gz<br>
            <br>
             cd gdal-2.3.2<br>
            <br>
             env CFLAGS="-Fpie -pie -fPIC" ./configure<br>
            <br>
             make install<br>
            <br>
             cd /usr/local/bin<br>
            <br>
             readelf -l gdaltransform<br>
            <br>
             Elf file type is EXEC (Executable file)<br>
            <br>
             Entry point 0x40<br>
          </div>
          <div>Thanks,</div>
          <div>Kavitha</div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
osgeolive mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osgeolive@lists.osgeo.org" moz-do-not-send="true">osgeolive@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/osgeolive" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/osgeolive</a>
</pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
osgeolive mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osgeolive@lists.osgeo.org">osgeolive@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/osgeolive">https://lists.osgeo.org/mailman/listinfo/osgeolive</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>