[PATCH] D61343: [llvm-objcopy] Cache gnu_debuglink's target CRC

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 01:37:16 PDT 2019


jhenderson added a comment.

Whilst I don't necessarily object to this change, I do wonder as to its necessity. Have you seen this as an issue in practice? My understanding of the .gnu_debuglink section is that there should be a single entry in it in an executable, pointing at a single file containing debug information for that executable. Adding the section to relocatable object files (and therefore to archive members) makes no sense, since you don't debug those.



================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.cpp:502
+    if (!DebugOrErr)
+      return createStringError(errc::no_such_file_or_directory, "'%s': %s",
+                               Config.AddGnuDebugLink.str().c_str(),
----------------
Is "no_such_file_or_directory" the only way MemoryBuffer::getFile can file? What about things like "it's a directory" or "access denied"? If it isn't the only way, we shouldn't be using this misleading error code.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61343/new/

https://reviews.llvm.org/D61343





More information about the llvm-commits mailing list