Page MenuHomePhabricator

Make .file directive to have basename only

Authored by twoh on Jul 28 2017, 2:03 PM.



Currently LLVM puts directory along with the filename in .file directive, but this behavior doesn't match gcc. There's a no clear description about which one is right (, but one document ( suggests that STT_FILE symbol in elf file is expected to have basename only, which should have a same sting file .file directive according to (

This also affects badly on the build system that uses hashing, as the directory info could be differnt from developer to developer even when they're working on same file.

Diff Detail


Event Timeline

twoh created this revision.Jul 28 2017, 2:03 PM
twoh updated this revision to Diff 108711.Jul 28 2017, 2:10 PM

Delete unnecessary line from the test.

twoh added a comment.Aug 7 2017, 9:35 AM

Ping. Thanks!

This revision was automatically updated to reflect the committed changes.