[AIX][PGO] Teach profile runtime to read build-id
authorWael Yehia <wyehia@ca.ibm.com>
Mon, 20 Mar 2023 19:51:17 +0000 (15:51 -0400)
committerWael Yehia <wyehia@ca.ibm.com>
Wed, 29 Mar 2023 15:15:07 +0000 (15:15 +0000)
commit0e2ed90516ee834ca78f4974a7aebcba1a302eb0
tree81775d31e86a82697443b3f68137912dfdde7f1c
parentd4879d769095d76ddf9484c50661feac96ce525a
[AIX][PGO] Teach profile runtime to read build-id

On AIX, the build-id can be embedded in a binary using the -mxcoff-build-id
compiler option. When present, the build id is stored as an ascii string at the
beginning of the string table in the loader section of the XCOFF file.

Reviewed By: stephenpeckham, daltenty

Differential Revision: https://reviews.llvm.org/D146976
compiler-rt/lib/profile/InstrProfilingInternal.h
compiler-rt/lib/profile/InstrProfilingPlatformAIX.c
compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
compiler-rt/lib/profile/InstrProfilingWriter.c
compiler-rt/test/profile/AIX/binary-id-shared.c [new file with mode: 0644]
compiler-rt/test/profile/AIX/binary-id.c [new file with mode: 0644]