This is an archive of the discontinued LLVM Phabricator instance.

Make .file directive to have basename only
ClosedPublic

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

Details

Summary

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 (https://sourceware.org/binutils/docs/as/File.html#File), but one document (https://sourceware.org/gdb/current/onlinedocs/stabs/ELF-Linker-Relocation.html) 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 (https://docs.oracle.com/cd/E26502_01/html/E28388/eoiyg.html).

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.

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.