I don't mind the separation, but, I don't see what makes this target specific still. I really think that we should have this be out-side of the target specific content, but having this in LLVM instead of the readobj tool makes sense. At the very least, I think that we need to fix the big endian case.
You should be able to use ulittle_* to decode this even on a big endian host. I don't see why the content being in little endian should prevent the host tools from running on big endian.