Andrew Haines wrote:
On 10/22/2015 08:08 PM, Mark Morgan Lloyd wrote:
If a program is linked with GNU ld using the --build-id option, how
can it retrieve the value at runtime?
I've never done it but maybe a place to start is use the elfreader unit
in fcl-res to open ParamStr(0) and read the data from the
.note.gnu.build-id section.
Thanks, I'll take a look. I'm looking for something that I can put as a
"magic number" at the bottom of some shared memory, and the build-id is
ideal since it can be set to a fixed value during debugging.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal