On AIX, the build-id can be embedded in a binary using the -mxcoff-build-id=0xHEXSTRING compiler option.
The build-id, if present, is stored as an ascii string at the beginning of the string table in the loader section of the XCOFF file.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/profile/InstrProfilingPlatformAIX.c | ||
---|---|---|
24 | This check is unnecessary. 'n' is the length of the input. The caller allocates an output buffer that's big enough, so overflow can't occur. | |
29 | Since this function is only used when debugging, I don't see any reason to print 4 bytes at a time. | |
62 | The usual convention for using loadquery is to keep allocating a buffer until the call succeeds or malloc() fails. But If you're going to limit the buffer size to 64K, then why not allocate a 64K buffer right away when you call malloc()? Of remove the fixed size Buf[1024] and always call malloc. Also, I would use an integer (64000) instead of 1<<15. | |
compiler-rt/lib/profile/InstrProfilingWriter.c | ||
347 | BinaryIDPadding could be computed inside this function instead of passing it as a parameter. |
compiler-rt/lib/profile/InstrProfilingPlatformAIX.c | ||
---|---|---|
62 | I'll change to do one malloc of 64k. | |
compiler-rt/lib/profile/InstrProfilingWriter.c | ||
347 | This was an existing function so I wanted to do minimal changes. |
This check is unnecessary. 'n' is the length of the input. The caller allocates an output buffer that's big enough, so overflow can't occur.