Does it specified in some spec or GNU ld just work so?
PIE is not part of any formal specification.
It is a use already permitted by the generic ELF specification.
The essential meaning of a PIE is that it is an ET_DYN object that has an
e_entry address that works normally.
The presence of a DT_DEBUG is a necessary feature for the well-specified
techniques for debugging dynamically-linked executables to work normally.
Hence, a PIE has a DT_DEBUG.
Since PIE is a GNU invention, what we say it means is what the
specification is. We say it's an ET_DYN file with a DT_DEBUG entry.
Thanks,
Roland