[PATCH] D70665: [llvm-readobj] - Implement --elf-dependent-libs flag.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 01:48:02 PST 2019


jhenderson added a subscriber: bd1976llvm.
jhenderson added a comment.

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 at: llvm/test/tools/llvm-readobj/elf-dependent-libraries.test:36
+# MIX-NEXT:   abc
+# MIX-EMPTY:
+# MIX-NEXT:   warning: '[[FILE]]': SHT_LLVM_DEPENDENT_LIBRARIES section at index 4 is broken: section [index 4] has a sh_offset (0xffff0000) + sh_size (0x4) that cannot be represented
----------------
Is there a clean way of not having this empty line? I'm not sure there's any benefit to it. It's not a big deal though if it makes the code significantly more complex.


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

https://reviews.llvm.org/D70665





More information about the llvm-commits mailing list