There is no way to dump SHT_LLVM_DEPENDENT_LIBRARIES sections
currently. This patch implements this.
The section is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-dependent-libraries-section-dependent-libraries
Differential D70665
[llvm-readobj] - Implement --dependent-libraries flag. grimar on Nov 25 2019, 5:14 AM. Authored by
Details There is no way to dump SHT_LLVM_DEPENDENT_LIBRARIES sections The section is described here:
Diff Detail Event TimelineComment Actions The llvm-readobj doc needs updating.
Comment Actions
Comment Actions I've been thinking about this, and I'm not convinced that the switch name should have "elf" in it. I'd prefer simply "--dependent-libraries". Although the option is currently only implemented for ELF, I don't know of any inherent reason it couldn't apply to COFF for example at a future point, and we'd then just need to add an alias to the switch. See also other switches such as --stack-sizes and --addrsig. I'd keep "elf" prefixes to switches that are inherently tied to the ELF file format, such as --elf-section-groups, or maybe where the same term means completely different things for different formats (I'm not sure about this one). I've subscribed @bd1976llvm who was heavily involved in getting the dependent libraries stuff implemented. He might have some thoughts too.
Comment Actions This llvm ELF feature had a discussion here http://lists.llvm.org/pipermail/llvm-dev/2019-March/131004.html . The feature originated from COFF https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=vs-2019 So I think this option can apply to COFF as well, though I know too little about COFF to say how that will going to work. @bd1976llvm is the expert. Comment Actions The feature certainly could be implemented for COFF, so I think changing the name of the command line option is reasonable. The strings in the .deplibs sections map to libraries in an implementation defined manner, so I refer to them as "specifiers". In COFF dependent libraries are specified via "directives" in the object files. It might be worth naming the option something like: --dependent-lib-directives (as directives works for the entries in an ELF .deplibs sections equally as well as specifiers) ? Comment Actions
Comment Actions The code change looks good.
|
section -> directives (in case it starts getting used by COFF)