Change in relocation of debug info

Simon Marchi simon.marchi@polymtl.ca
Thu Jun 3 19:02:48 GMT 2021


On 2021-06-03 2:54 p.m., Rodney M. Bates wrote:
> 
> Thanks.  Using -f=no-pie has gotten me going for now.  My build process
> has been supplying -fPIC for ages, to the older gcc, so I don't fully
> understand why it wasn't happening all along, but this works for now.

-fPIC is used at the compile step to produce code in the .o files that
_can_ be linked in a position-independent executable (or shared
library).  But whether the output executable is position dependent or
not ultimately depends on the link step, whether -pie or -no-pie is
passed.  And if neither are passed, it depends on the default setting of
the linker.  That default setting was "no pie", but has changed to "pie"
pretty much everywhere in the last few years.

Simon


More information about the Gdb mailing list