This is what ld64 does, and also what we already do for most of the
other load commands. I'm not aware of a good way to test this, but I
don't think it really matters.
Differential Revision: https://reviews.llvm.org/
D141462
}
uint32_t getSize() const override {
- return alignTo(sizeof(dylib_command) + path.size() + 1, 8);
+ return alignToPowerOf2(sizeof(dylib_command) + path.size() + 1,
+ target->wordSize);
}
void writeTo(uint8_t *buf) const override {
class LCLoadDylinker final : public LoadCommand {
public:
uint32_t getSize() const override {
- return alignTo(sizeof(dylinker_command) + path.size() + 1, 8);
+ return alignToPowerOf2(sizeof(dylinker_command) + path.size() + 1,
+ target->wordSize);
}
void writeTo(uint8_t *buf) const override {