The .file directive is changed to only have basename in D36018 for ELF.
But on AIX, we require the .file directive to also contain the directory info. This aligns with other AIX compiler like XLC and is required by some AIX tool like DBX.
Differential D99785
[XCOFF] make .file directive have directory info shchenz on Apr 1 2021, 8:53 PM. Authored by
Details
The .file directive is changed to only have basename in D36018 for ELF. But on AIX, we require the .file directive to also contain the directory info. This aligns with other AIX compiler like XLC and is required by some AIX tool like DBX.
Diff Detail
Unit Tests
Event TimelineComment Actions From what I understand, this is meant to fix a situation where dbx is unhappy when the file is not simply compiled in the directory where it resides (using its basename). However, this unhappiness extends even to the compiled-using-basename case when the filename contains "special characters". For example, a file with a tab character ends up with backslash escapes in the assembly (but the assembler on AIX doesn't interpret these): $ clang -mllvm -dwarf-inlined-strings=Enable a\ q.c -S -o - | grep -F .file .file "a\tq.c" Comment Actions @hubert.reinterpretcast thanks for providing the example. Yes, it is indeed an issue for the same name in symbol table and in dwinfo section. Comment Actions The file name conventions on AIX does not (and probably cannot) recommend against the use of "national characters". The character escape mechanism being applied is incorrect. The string constants in AIX assembly are mostly-raw strings, with double quotation marks in the string content being immediately repeated to indicate that the end-of-string has not been reached.
|